-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Make Dashboard Port Configurable #8999
Make Dashboard Port Configurable #8999
Conversation
…name an existing argument from include-webui to include-dashboard as part of more consistent naming, and update the dashboard command to be able to connect to an arbitrary remote port on a cluster
Can one of the admins verify this patch? |
Test FAILed. |
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.
LGTM. Please ping when tests pass and you've tested locally
@@ -31,7 +31,8 @@ | |||
"chmod +x hey_linux_amd64" | |||
]) | |||
|
|||
ray.init(address=cluster.address, include_webui=True, webui_host="0.0.0.0") | |||
ray.init( | |||
address=cluster.address, include_dashboard=True, dashboard_host="0.0.0.0") |
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.
Don't need include_dashboard right?
|
||
ray.init( | ||
address=cluster.address, | ||
include_webui=True, | ||
webui_host="0.0.0.0", | ||
include_dashboard=True, |
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.
Don't need include_dashboard right?
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.
Yeah, you're correct actually. I mindlessly put it there because we had passed include_webui before hehe.
" (DEPRECATED: please use --dashboard-host)") | ||
@click.option( | ||
"--include-dashboard", | ||
default=None, |
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.
Should we be starting it by default? A question for another PR
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.
I am confused. It must be started by default right? Why is i the question for another PR?
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.
We do start it by default already. In retrospect, my comment description here could've been more clear. I will rewrite. The default arg of None starts the dashboard.
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.
Oh, interesting. So you have to set --include-dashboard=False
to not start it? I think I was confused by the flag name.
@@ -323,6 +350,20 @@ def start(node_ip_address, redis_address, address, redis_port, port, | |||
if port is not None and port != redis_port: | |||
raise ValueError("Cannot specify both --port and --redis-port " | |||
"as port is a rename of deprecated redis-port") | |||
if include_webui is not None: |
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.
If it's not None we should probably either error or set the value for include_dashboard to what include_webui is set to
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.
Similar to what you have for the host flags below
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.
Makes sense.
python/ray/scripts/scripts.py
Outdated
@@ -443,8 +485,13 @@ def start(node_ip_address, redis_address, address, redis_port, port, | |||
raise Exception("If --head is not passed in, --redis-max-clients " | |||
"must not be provided.") | |||
if include_webui: | |||
raise Exception("If --head is not passed in, the --include-webui " | |||
"flag is not relevant.") | |||
raise Exception( |
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.
Try not to raise bare Exceptions, we should probably raise ValueError
in this case
python/ray/scripts/scripts.py
Outdated
@@ -323,6 +350,20 @@ def start(node_ip_address, redis_address, address, redis_port, port, | |||
if port is not None and port != redis_port: | |||
raise ValueError("Cannot specify both --port and --redis-port " | |||
"as port is a rename of deprecated redis-port") | |||
if include_webui is not None: | |||
logger.warn("The --include-webui argument will be deprecated soon. " |
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.
Can you write something more specific? For example, --include-webui argument will be deprecated at the version 0.8.7
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.
This makes sense. I'm concerned I'll forget to remove it for the 0.8.7 release though. Do we have a way we normally keep track of deprecations?
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.
No need to specify a release, what you have is fine
python/ray/scripts/scripts.py
Outdated
|
||
dashboard_host_default = "localhost" | ||
if webui_host != dashboard_host_default: | ||
logger.warn("The --webui-host argument will be deprecated soon. " |
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.
Same here
" (DEPRECATED: please use --dashboard-host)") | ||
@click.option( | ||
"--include-dashboard", | ||
default=None, |
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.
I am confused. It must be started by default right? Why is i the question for another PR?
Test FAILed. |
python/ray/services.py
Outdated
@@ -1125,7 +1128,6 @@ def start_dashboard(require_webui, | |||
Returns: | |||
ProcessInfo for the process that was started. | |||
""" | |||
port = 8265 # Note: list(map(ord, "RAY")) == [82, 65, 89] | |||
while True: |
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.
I guess you would like to maintain old behavior i.e. port += 1
only when port == ray_constants.DEFAULT_DASHBOARD_PORT
, or the documentation above needs update to:
(Note that the port number increases if the
defaultport is not available)
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.
Good point, thank you.
Test FAILed. |
…ior if the default port is passed in for the dashboard.
Test FAILed. |
Why are these changes needed?
These changes are needed because currently the user cannot specify the port that they wish to start the dashboard on, and it is frequently requested as a feature. In addition, this makes the
ray dashboard
command work with a remote port that is not the default dashboard port, so that this can be supported in the autoscaler as well.In addition, I renamed the variables that mention webui as we have started referring to the web ui as the dashboard widely.
Related issue number
Checks
scripts/format.sh
to lint the changes in this PR.