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

[Doc] Add improved 'ray start --resources' help #41009

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion python/ray/scripts/scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import json
import logging
import os
import platform
import signal
import subprocess
import sys
Expand Down Expand Up @@ -386,7 +387,23 @@ def debug(address):
required=False,
default="{}",
type=str,
help="a JSON serialized dictionary mapping resource name to resource quantity",
help="A JSON serialized dictionary mapping resource name to resource quantity."
+ (
r"""

Windows command prompt users must ensure to double quote command line arguments. Because
JSON requires the use of double quotes you must escape these arguments as well, for
example:

ray start --head --resources="{\"special_hardware\":1, \"custom_label\":1}"
peytondmurray marked this conversation as resolved.
Show resolved Hide resolved

Windows powershell users need additional escaping:

ray start --head --resources="{\""special_hardware\"":1, \""custom_label\"":1}"
"""
if platform.system() == "Windows"
else ""
),
)
@click.option(
"--head",
Expand Down
Loading