-
Notifications
You must be signed in to change notification settings - Fork 6k
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] [Job] Add notes about where Ray Job entrypoint runs and how to specify it #41319
[Doc] [Job] Add notes about where Ray Job entrypoint runs and how to specify it #41319
Conversation
Signed-off-by: Archit Kulkarni <archit@anyscale.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.
doc/source/cluster/running-applications/job-submission/quickstart.rst
Outdated
Show resolved
Hide resolved
@@ -111,12 +111,19 @@ Make sure to specify the path to the working directory in the ``--working-dir`` | |||
# Job 'raysubmit_inB2ViQuE29aZRJ5' succeeded | |||
# ------------------------------------------ | |||
|
|||
This command will run the script on the Ray Cluster and wait until the job has finished. Note that it also streams the stdout of the job back to the client (``hello world`` in this case). Ray will also make the contents of the directory passed as `--working-dir` available to the Ray job by downloading the directory to all nodes in your cluster. | |||
This command will run the entrypoint script on the Ray Cluster's head node and wait until the job has finished. Note that it also streams the stdout of the job back to the client (``hello world`` in this case). Ray will also make the contents of the directory passed as `--working-dir` available to the Ray job by downloading the directory to all nodes in your cluster. |
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.
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. I just want to convey that it would stream whatever is normally output to the terminal when you run a command in your local terminal. Should I say "streams the stdout and stderr" or "streams the output"?
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.
Maybe the former? A lot of commands/tools do not stream stderr by default.
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.
Updated to "streams the output of the entrypoint script", which should be clear. 61d65ff
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 sorry, didn't see your message. Updated to "streams the stdout and stderr" ab7950c
|
||
.. note:: | ||
|
||
The double dash (`--`) separates the arguments for the entrypoint command (e.g. `python script.py --arg1=val1`) from the arguments to `ray job submit`. | ||
|
||
.. note:: | ||
|
||
By default the entrypoint script is run on the head node. To override this, specify any of the arguments |
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.
"entrypoint script is run on the head node" => Do you mean the driver process would be running on the head node by default?
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.
Yes, we say entrypoint script
here to convey that it is running whatever the user specifies as entrypoint
. Typically this is a script that starts a Ray driver process (ray.init()
), but it could also be any command at all, like echo hello && pip install something
. It technically doesn't have to involveRay
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.
Short answer, yes, the driver is running on the head node by default
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!
…art.rst Co-authored-by: Kai-Hsun Chen <kaihsun@apache.org> Signed-off-by: Archit Kulkarni <architkulkarni@users.noreply.github.com>
Signed-off-by: Archit Kulkarni <archit@anyscale.com>
…i/ray into docs-job-head-node Signed-off-by: Archit Kulkarni <archit@anyscale.com>
Signed-off-by: Archit Kulkarni <archit@anyscale.com>
Signed-off-by: Archit Kulkarni <archit@anyscale.com>
Quick follow to #41319 --------- Signed-off-by: angelinalg <122562471+angelinalg@users.noreply.github.com> Co-authored-by: Archit Kulkarni <architkulkarni@users.noreply.github.com>
…specify it (ray-project#41319) There is recurring user confusion about where the job entrypoint script runs and how to make it run on a worker node. This PR adds the missing information to the doc in relevant places in the tutorials, and includes it in the FAQ. --------- Signed-off-by: Archit Kulkarni <archit@anyscale.com> Signed-off-by: Archit Kulkarni <architkulkarni@users.noreply.github.com> Co-authored-by: Kai-Hsun Chen <kaihsun@apache.org>
…ct#41342) Quick follow to ray-project#41319 --------- Signed-off-by: angelinalg <122562471+angelinalg@users.noreply.github.com> Co-authored-by: Archit Kulkarni <architkulkarni@users.noreply.github.com>
Why are these changes needed?
There is recurring user confusion about where the job entrypoint script runs and how to make it run on a worker node.
This PR adds the missing information to the doc in relevant places in the tutorials, and includes it in the FAQ.
Related issue number
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.