emukit icon indicating copy to clipboard operation
emukit copied to clipboard

`test_optimization_with_linear_constraint` in integration tests is flaky.

Open mmahsereci opened this issue 2 years ago • 6 comments

Test fails about 50% of the time due to infs or nans.

integration_tests/emukit/bayesian_optimization/test_constrained_loop.py::test_optimization_with_linear_constraint

mmahsereci avatar Jun 01 '22 16:06 mmahsereci

I can confirm that it's a bit flacky, but not nearly as bad as 50% for me. Running this test locally, it fails once every 20 runs or so. Is that worse for you @mmahsereci ?

apaleyes avatar Jun 21 '22 09:06 apaleyes

Starting to suspect this might be related to #291

apaleyes avatar Jun 21 '22 10:06 apaleyes

I can confirm that it's a bit flacky, but not nearly as bad as 50% for me. Running this test locally, it fails once every 20 runs or so. Is that worse for you @mmahsereci ?

It failed repeatedly during my last PRs which was quite annoying. If I had to guess it was more often than every 20 times. Did not try locally.

mmahsereci avatar Jun 22 '22 13:06 mmahsereci

It seems that there are two more tests failing now. These ones do not seem to be simply flaky but there are some shape and index errors.

  • tests/emukit/bayesian_optimization/test_bayesian_optimization_loop.py::test_loop[3]
  • tests/emukit/bayesian_optimization/test_local_penalization_calculator.py::test_local_penalization

See e.g., https://github.com/EmuKit/emukit/runs/7689362107?check_suite_focus=true

mmahsereci avatar Aug 05 '22 10:08 mmahsereci

Perhaps it's due to scipy again. They released version 1.9.0 some days ago and the failed tests seem to be using it while the tests that pass use an older version

https://docs.scipy.org/doc/scipy/release.1.9.0.html

mmahsereci avatar Aug 08 '22 12:08 mmahsereci

It was scipy indeed. Some explanation is in the fixing PR. Tests should be passing again!

apaleyes avatar Sep 02 '22 09:09 apaleyes

Closing since it should be fixed by #437 .

mmahsereci avatar Dec 15 '22 13:12 mmahsereci