Skip to content

Commit

Permalink
[Tune][CI] Skip zoopt invalid values test (#31419)
Browse files Browse the repository at this point in the history
Skips a zoopt searcher test that's causing the `test_searchers` suite in CI to be flaky. Skipping as this is not a Tune issue and needs to be fixed in the zoopt library.

I re-enabled this test in #31147 since I thought that nan/inf error handling had been fixed in a recent zoopt release. However, nan/inf values will still cause an error if reported on trial complete.

This test should be enabled after polixir/ZOOpt#7 is included in the next zoopt release.

Signed-off-by: Justin Yu <[email protected]>
  • Loading branch information
justinvyu authored and AmeerHajAli committed Jan 12, 2023
1 parent 3e1bb15 commit 28e26c4
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions python/ray/tune/tests/test_searchers.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,18 +327,24 @@ def testSkopt(self):
self.assertCorrectExperimentOutput(out)

def testZOOpt(self):
self.skipTest(
"Recent ZOOpt versions fail handling invalid values gracefully. "
"Skipping until a fix is added in a future ZOOpt release."
)
from ray.tune.search.zoopt import ZOOptSearch

np.random.seed(1000) # At least one nan, inf, -inf and float
# This seed tests that a nan result doesn't cause an error if it shows
# up after the initial data collection phase.
np.random.seed(1002) # At least one nan, inf, -inf and float

with self.check_searcher_checkpoint_errors_scope():
out = tune.run(
_invalid_objective,
search_alg=ZOOptSearch(budget=100, parallel_num=4),
search_alg=ZOOptSearch(budget=25, parallel_num=4),
config=self.config,
metric="_metric",
mode="max",
num_samples=8,
num_samples=16,
reuse_actors=False,
)
self.assertCorrectExperimentOutput(out)
Expand Down

0 comments on commit 28e26c4

Please sign in to comment.