-
Notifications
You must be signed in to change notification settings - Fork 6.5k
[Dashboard] Allow getting dashboard URL via RuntimeContext #52676
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
base: master
Are you sure you want to change the base?
[Dashboard] Allow getting dashboard URL via RuntimeContext #52676
Conversation
Signed-off-by: chuang0221 <chuangellow@gmail.com>
Signed-off-by: chuang0221 <chuangellow@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left some minor comments
|
||
INFO worker.py:1487 -- Connected to Ray cluster. View the dashboard at 127.0.0.1:8265. | ||
|
||
There are two ways to get the dashboard URL programmatically: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For a "getting started" doc, it should be okay to suggest only one recommended option. Let Ray team decide whether the new get_dashboard_url()
can be used as the default method..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion! I agree that for the "getting started" documentation, it’s best to recommend a single, clear method. For now, I’ll keep both options until we get further feedback from the Ray team.
Signed-off-by: chuang0221 <chuangellow@gmail.com>
The CI test failure doesn't seem to be related to my changes. |
This pull request has been automatically marked as stale because it has not had You can always ask for help on our discussion forum or Ray's public slack channel. If you'd like to keep this open, just leave any comment, and the stale label will be removed. |
@richardliaw can you help us get some eyes on this PR? thanks |
This pull request has been automatically marked as stale because it has not had You can always ask for help on our discussion forum or Ray's public slack channel. If you'd like to keep this open, just leave any comment, and the stale label will be removed. |
Why are these changes needed?
Currently, getting the Ray Dashboard URL programmatically requires capturing the context object returned by
ray.init()
.This is often inconvenient, especially in interactive environments like Jupyter notebooks, where the initial
ray.init()
call might have occurred in a previous cell and the context object wasn't stored.This change introduces a more convenient way to access the dashboard URL anytime after Ray has been initialized, directly through the runtime context. This aligns with the purpose of
ray.get_runtime_context()
providing runtime information.The primary use case is simple access within a script or notebook:
This PR implements the
get_dashboard_url()
method onray.runtime_context.RuntimeContext
. Corresponding unit tests and documentation updates are included.Related issue number
Closes #52629
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.