Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tune][CI] Skip zoopt invalid values test #31419

Merged

Conversation

justinvyu
Copy link
Contributor

@justinvyu justinvyu commented Jan 3, 2023

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.

Why are these changes needed?

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.

Related issue number

See #31439 and #31336

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Signed-off-by: Justin Yu <justinvyu@berkeley.edu>
Copy link
Member

@bveeramani bveeramani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks!

from ray.tune.search.zoopt import ZOOptSearch

np.random.seed(1000) # At least one nan, inf, -inf and float
np.random.seed(1002) # At least one nan, inf, -inf and float
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OOC why're we changing the seed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test was passing for me locally with the old seed. I changed the seed and upped the number of samples to get the test failing on my local machine.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, okay. Makes sense

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does that seed produce one nan, inf, -inf and float?
Which combination makes it fail?
Let's add this as a comment

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this seed also produces at at least one of each. The failure happens when enough training samples have been collected and then a nan shows up and zoopt tries to replace one of its existing solutions with the nan solution. The previous seed only included a nan solution while it was still collecting training data. Will add as a comment!

self.skipTest(
"Recent ZOOpt versions fail handling invalid values gracefully. "
"Skipping until a fix is added in a future ZOOpt release."
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To ensure we eventually re-enable this test, should we create an issue to track this?

Copy link
Contributor

@krfricke krfricke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, let's document this and add an issue to track the revert

from ray.tune.search.zoopt import ZOOptSearch

np.random.seed(1000) # At least one nan, inf, -inf and float
np.random.seed(1002) # At least one nan, inf, -inf and float
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does that seed produce one nan, inf, -inf and float?
Which combination makes it fail?
Let's add this as a comment

Signed-off-by: Justin Yu <justinvyu@berkeley.edu>
…_zoopt_invalid_values_test

Signed-off-by: Justin Yu <justinvyu@berkeley.edu>
@krfricke krfricke merged commit f2ba326 into ray-project:master Jan 9, 2023
AmeerHajAli pushed a commit that referenced this pull request Jan 12, 2023
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 <justinvyu@berkeley.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants