Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RichieHakim committed Mar 18, 2024
1 parent e5b8425 commit e023960
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bnpm/optimization.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,5 +320,6 @@ def check(
study.stop()

if self.verbose:
print(f'Trial num: {self.num_trial}. Duration: {duration:.3f}s. Best value: {self.best:3e}. Current value:{trial.value:3e}') if self.verbose else None
best, value = (f"{val:3e}" for val in [self.best, trial.value] if val is not None)
print(f'Trial num: {self.num_trial}. Duration: {duration:.3f}s. Best value: {best:3e}. Current value: {value:3e}') if self.verbose else None
self.num_trial += 1

0 comments on commit e023960

Please sign in to comment.