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

[Client] Add ray.client().disconnect() #16021

Merged
merged 11 commits into from
May 28, 2021

Conversation

ijrsvt
Copy link
Contributor

@ijrsvt ijrsvt commented May 24, 2021

Why are these changes needed?

  • Avoid the need to call ray.util.disconnect()
  • Also fixes docs for namespaces (by adding import ray instead of import).

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

@ijrsvt ijrsvt added the core-interface-change-approval-required This changes the Ray core behavior / API and requires broader approvals. label May 24, 2021
@ijrsvt
Copy link
Contributor Author

ijrsvt commented May 24, 2021

cc @wuisawesome

python/ray/client_builder.py Outdated Show resolved Hide resolved
python/ray/scripts/scripts.py Outdated Show resolved Hide resolved
python/ray/scripts/scripts.py Outdated Show resolved Hide resolved
python/ray/client_builder.py Outdated Show resolved Hide resolved
python/ray/client_builder.py Outdated Show resolved Hide resolved
Copy link
Contributor

@AmeerHajAli AmeerHajAli left a comment

Choose a reason for hiding this comment

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

LGTM. should we make sure ray.util.disconnect() does not show up in the docs?
For Philipp's comment on returning a context class that we can call .disconnect() on, will that still support the case when the user forgot to assign the context class to a variable?

@AmeerHajAli AmeerHajAli added the @author-action-required The PR author is responsible for the next step. Remove tag to send back to the reviewer. label May 25, 2021
doc/source/namespaces.rst Outdated Show resolved Hide resolved
doc/source/namespaces.rst Outdated Show resolved Hide resolved

server.stop(0)
subprocess.check_output("ray stop --force", shell=True)


@pytest.mark.skip()
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, should this really be skipped?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OOps, that was a debugging thing (I was trying to figure out why a test-test interaction was causing problems).

Copy link
Contributor

@pcmoritz pcmoritz left a comment

Choose a reason for hiding this comment

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

Thanks, this looks great (I made a few small notes for changes)

@AmeerHajAli
Copy link
Contributor

@ijrsvt should we merge this?

@ijrsvt
Copy link
Contributor Author

ijrsvt commented May 27, 2021 via email

@AmeerHajAli
Copy link
Contributor

@ijrsvt is this mergable?

@ijrsvt
Copy link
Contributor Author

ijrsvt commented May 28, 2021

FYI This passed Travis!

@ijrsvt ijrsvt merged commit ec46794 into ray-project:master May 28, 2021
@ijrsvt ijrsvt deleted the ray-client-disconnect branch May 28, 2021 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@author-action-required The PR author is responsible for the next step. Remove tag to send back to the reviewer. core-interface-change-approval-required This changes the Ray core behavior / API and requires broader approvals.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants