Skip to content

Commit

Permalink
fix: exception for trail worsening warning
Browse files Browse the repository at this point in the history
  • Loading branch information
mdtanker committed Nov 19, 2024
1 parent bebaa67 commit 313f847
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/invert4geom/optimization.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,13 +546,16 @@ def _warn_limits_better_than_trial_multi_params(
# if study direction is maximize
if study.direction == optuna.study.StudyDirection.MAXIMIZE:
# if current trial is worse than either limit, log a warning
if trial.values[0] < min(scores):
log.info(
msg,
trial.number,
trial.params,
trial.values[0],
)
try:
if trial.values[0] < min(scores):
log.info(
msg,
trial.number,
trial.params,
trial.values[0],
)
except TypeError:
pass
else:
pass

Expand Down

0 comments on commit 313f847

Please sign in to comment.