Skip to content

Commit

Permalink
Fix duration calculation in Convergence_checker_optuna
Browse files Browse the repository at this point in the history
  • Loading branch information
RichieHakim committed Mar 24, 2024
1 parent b3ccbf5 commit f196f8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bnpm/optimization.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def check(
else:
duration = 0
elif self.duration_type == 'trials':
duration = sum([t.duration.total_seconds() for t in study.trials])
duration = sum([t.duration.total_seconds() for t in study.trials if t.duration is not None])
else:
raise ValueError(f"duration_type '{self.duration_type}' not recognized")

Expand Down

0 comments on commit f196f8a

Please sign in to comment.