Skip to content

Commit

Permalink
Update tests/visualization_tests/test_timeline.py
Browse files Browse the repository at this point in the history
Co-authored-by: Shuhei Watanabe <[email protected]>
  • Loading branch information
2 people authored and gen740 committed Jul 12, 2024
1 parent 07c6a96 commit 8136f41
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/visualization_tests/test_timeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ def test_get_timeline_plot_with_killed_running_trials(
def _objective_with_sleep(trial: optuna.Trial) -> float:
sleep_start_datetime = datetime.datetime.now()
# Spin waiting is used here because high accuracy is necessary even in weak VM.
# Please check the motivation of the bugfix in https://github.com/optuna/optuna/pull/5549/
while datetime.datetime.now() - sleep_start_datetime < datetime.timedelta(seconds=0.1):
pass
assert datetime.datetime.now() - sleep_start_datetime < datetime.timedelta(seconds=0.19)
Expand Down

0 comments on commit 8136f41

Please sign in to comment.