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] Add soft imports test #16450

Merged
merged 4 commits into from
Jun 16, 2021

Conversation

Yard1
Copy link
Member

@Yard1 Yard1 commented Jun 15, 2021

Why are these changes needed?

Tune Searchers work by providing a wrapper around an external library. Those libraries must be soft dependencies. In the past, there were a couple of instances of a soft dependency being imported as a hard one by mistake. This test will check whether all Searchers and Schedulers have correctly imported dependencies.

Also fixes an example of the issue this test would check for that was caught by it in the Zoopt searcher.

This PR adds a new buildkite build - it's possible it can be done in one build, but I am not sure what would be the best way.

Related issue number

Checks

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

"""Tests whether it's possible to use Ray Tune without soft dependencies
"""

def testSoftImports(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

nice! can you also check that these libraries are not available? i.e., use importlib to check for the availability of libraries, just incase someone accidentally introduces a regression that downloads extra dependencies

Copy link
Member Author

Choose a reason for hiding this comment

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

Should be good now!

@Yard1 Yard1 requested a review from richardliaw June 15, 2021 21:56
Copy link
Contributor

@richardliaw richardliaw left a comment

Choose a reason for hiding this comment

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

nice!

@richardliaw richardliaw merged commit ec7d7c8 into ray-project:master Jun 16, 2021
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.

None yet

2 participants