We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 558694f commit 462599aCopy full SHA for 462599a
dreadnode/optimization/stop.py
@@ -63,10 +63,11 @@ def score_value(
63
"""
64
65
def stop(trials: list[Trial]) -> bool: # noqa: PLR0911
66
- if not trials:
+ finished_trials = [t for t in trials if t.status == "finished"]
67
+ if not finished_trials:
68
return False
69
- trial = trials[-1]
70
+ trial = finished_trials[-1]
71
value_to_check = trial.scores.get(metric_name) if metric_name else trial.score
72
if value_to_check is None:
73
0 commit comments