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

[serve] Remove dashboard's dependency on Serve #23389

Merged
merged 13 commits into from
Mar 22, 2022

Conversation

shrekris-anyscale
Copy link
Contributor

@shrekris-anyscale shrekris-anyscale commented Mar 21, 2022

Why are these changes needed?

The Ray dashboard imports Serve even when it doesn't need to start the Serve controller. This change makes this a delayed import and removes the hard dependency.

It also adds a new job to the CI that uses Ray's default dependencies (i.e. the ones installed by "pip install ray[default]").

Related issue number

Closes #23309.

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
      • New unit tests are added to test_dashboard.py.

from ray import serve # noqa F401

ray.init(include_dashboard=True)

Copy link
Contributor

Choose a reason for hiding this comment

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

ray dashboard doesn't work with minimal install. ray dashboard only works when ray[default] is installed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got it, I added a script to perform the test with a default installation.

Copy link
Contributor

Choose a reason for hiding this comment

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

can you check regular dashboard process works (e.g. /api/snapshot) and serve doesn't?

@shrekris-anyscale shrekris-anyscale changed the title [WIP] [serve] Remove dashboard's dependency on Serve [serve] Remove dashboard's dependency on Serve Mar 21, 2022
Copy link
Contributor

@simon-mo simon-mo left a comment

Choose a reason for hiding this comment

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

can you drop all the

@pytest.mark.skipif(
    os.environ.get("RAY_DEFAULT") == "1",
    reason="This test may not work with default installation.",
)

ray dashboard (all the tests) should work with ray default install

from ray import serve # noqa F401

ray.init(include_dashboard=True)

Copy link
Contributor

Choose a reason for hiding this comment

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

can you check regular dashboard process works (e.g. /api/snapshot) and serve doesn't?

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.

[ml][Improvement] serve dependency should not leak into dashboard and leak into other ray libraries.
4 participants