Skip to content

Commit

Permalink
make test_time_limit even more loose (#451)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #451

Sometimes test_time_limit will fail on very fast devices (https://github.com/facebookresearch/aepsych/actions/runs/11827946255/attempts/1).

We make this test even more loose and add extra logging to help debug in future.

Reviewed By: crasanders

Differential Revision: D65923982

fbshipit-source-id: 49751b6140f899a4ff9837ba05f41724aa6b2503
  • Loading branch information
JasonKChow authored and crasanders committed Nov 14, 2024
1 parent e05716a commit 5ab7a03
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/generators/test_optimize_acqf_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ def test_time_limits(self):
short = end - start

# very loose test because fit time is only approximately computed
self.assertTrue(long > short)
# on very fast machines, short sometimes actually wins, but hopefully not by
# much
self.assertTrue(long - short > -0.05, f"Long time: {long}, short time: {short}")

def test_instantiate_eubo(self):
config = """
Expand Down

0 comments on commit 5ab7a03

Please sign in to comment.