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 return a running trial with no data for target trial #3330

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,9 @@ def get_target_trial_index(experiment: Experiment) -> int | None:
running_trials = [
assert_is_instance(trial, BatchTrial)
for trial in experiment.trials_by_status[TrialStatus.RUNNING]
# handles case where there is a running trial without data,
# which we wouldn't want as the target trial
if not trial.lookup_data().df.empty
]
sorted_running_trials = _sort_trials(trials=running_trials, trials_are_running=True)
# Priority 1: Any running long-run trial
Expand Down
Loading