Skip to content

Commit

Permalink
Simplify ax/analysis/plotly directory structure (#2684)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #2684

Having separate sub-directories for each analysis makes the directory structure & import paths overly verbose. It also necessitates adding an `__init__.py` file for each sub-directory, which is easy to miss and can lead to `module not found` errors elsewhere (see D61607199).

This diff eliminates the separate sub-directory for the parallel coordinates analysis.

Reviewed By: mpolson64

Differential Revision: D61611408

fbshipit-source-id: 3e91c860993f887cac994fff59950511e6c221b2
  • Loading branch information
saitcakmak authored and facebook-github-bot committed Aug 21, 2024
1 parent 84b307d commit 8801c79
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 10 deletions.
4 changes: 1 addition & 3 deletions ax/analysis/plotly/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@

# pyre-strict

from ax.analysis.plotly.parallel_coordinates.parallel_coordinates import (
ParallelCoordinatesPlot,
)
from ax.analysis.plotly.parallel_coordinates import ParallelCoordinatesPlot
from ax.analysis.plotly.plotly_analysis import PlotlyAnalysis, PlotlyAnalysisCard

__all__ = ["PlotlyAnalysis", "PlotlyAnalysisCard", "ParallelCoordinatesPlot"]
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import pandas as pd
from ax.analysis.analysis import AnalysisCardLevel
from ax.analysis.plotly.parallel_coordinates.parallel_coordinates import (
from ax.analysis.plotly.parallel_coordinates import (
_get_parameter_dimension,
_select_metric,
ParallelCoordinatesPlot,
Expand Down
4 changes: 1 addition & 3 deletions ax/service/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@

import ax.service.utils.early_stopping as early_stopping_utils
from ax.analysis.analysis import Analysis, AnalysisCard
from ax.analysis.plotly.parallel_coordinates.parallel_coordinates import (
ParallelCoordinatesPlot,
)
from ax.analysis.plotly.parallel_coordinates import ParallelCoordinatesPlot
from ax.core.base_trial import BaseTrial, TrialStatus
from ax.core.experiment import Experiment
from ax.core.generation_strategy_interface import GenerationStrategyInterface
Expand Down
4 changes: 1 addition & 3 deletions ax/service/tests/scheduler_test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
from unittest.mock import call, Mock, patch, PropertyMock

import pandas as pd
from ax.analysis.plotly.parallel_coordinates.parallel_coordinates import (
ParallelCoordinatesPlot,
)
from ax.analysis.plotly.parallel_coordinates import ParallelCoordinatesPlot

from ax.core.arm import Arm
from ax.core.base_trial import BaseTrial, TrialStatus
Expand Down
8 changes: 8 additions & 0 deletions sphinx/source/analysis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,11 @@ Healthcheck Analysis
:members:
:undoc-members:
:show-inheritance:

Parallel Coordinates Analysis
~~~~~~~~~~~~~~~

.. automodule:: ax.analysis.plotly.parallel_coordinates
:members:
:undoc-members:
:show-inheritance:

0 comments on commit 8801c79

Please sign in to comment.