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] Fix AxSearch save and nan/inf result handling #31147

Merged
merged 4 commits into from
Dec 22, 2022

Conversation

justinvyu
Copy link
Contributor

@justinvyu justinvyu commented Dec 16, 2022

This PR fixes AxSearch saving and handles trials that produce nan/inf metrics properly.

Why are these changes needed?

Issues

  1. The AxSearch saving fails during experiment checkpointing. This wasn't caught because it's (1) just a warning, and (2) the unit test didn't actually start fitting/saving any models for config suggestion, since num_samples was too low. This is fixed by using cloudpickle during AxSearch save.
2022-12-15 17:31:07,148 WARNING tune.py:740 -- Trial Runner checkpointing failed: Can't pickle local object '_HomoskedasticNoiseBase.__init__.<locals>.<lambda>
  1. AxSearch doesn't handle nan/inf metric values (will raise an input error on both of these). This PR screens these out and uses AxClient.abandon_trial to complete this trial without adding its result as data to fit on. This wasn't caught for a similar reason to above.
InputDataError: Input data contains NaN values.

Related issue number

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 :(

Copy link
Member

@Yard1 Yard1 left a comment

Choose a reason for hiding this comment

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

Awesome, thanks!

@krfricke krfricke merged commit 7146df6 into ray-project:master Dec 22, 2022
krfricke pushed a commit that referenced this pull request Jan 9, 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 <[email protected]>
AmeerHajAli pushed a commit that referenced this pull request Jan 12, 2023
This PR fixes AxSearch saving and handles trials that produce nan/inf metrics properly.

Signed-off-by: Justin Yu <[email protected]>
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 <[email protected]>
tamohannes pushed a commit to ju2ez/ray that referenced this pull request Jan 25, 2023
This PR fixes AxSearch saving and handles trials that produce nan/inf metrics properly.

Signed-off-by: Justin Yu <[email protected]>
Signed-off-by: tmynn <[email protected]>
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