Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not plot running or early stopped trials in Scatter, ParallelCoordinates #3423

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ax/analysis/plotly/parallel_coordinates.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ def _prepare_data(experiment: Experiment, metric: str) -> pd.DataFrame:
}
for trial in experiment.trials.values()
for arm in trial.arms
# Do not plot running or early stopped trials since their terminal point does
# not represent full fidelity.
if trial.status.is_terminal and not trial.status.is_early_stopped
]

return pd.DataFrame.from_records(records).dropna()
Expand Down
8 changes: 7 additions & 1 deletion ax/analysis/plotly/scatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,13 @@ def _prepare_data(

# Filter for only rows with the relevant metric names
metric_name_mask = data["metric_name"].isin([x_metric_name, y_metric_name])
filtered = data[metric_name_mask][
# Do not plot running or early stopped trials since their terminal point does not
# represent full fidelity.
status_mask = data["trial_index"].apply(
lambda trial_index: experiment.trials[trial_index].status.is_terminal
and not experiment.trials[trial_index].status.is_early_stopped
)
filtered = data[metric_name_mask & status_mask][
["trial_index", "arm_name", "metric_name", "mean"]
]

Expand Down