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] Make runtimeEnvYAML more prominent in docs #44326

Merged

Conversation

architkulkarni
Copy link
Contributor

@architkulkarni architkulkarni commented Mar 27, 2024

Why are these changes needed?

When using Ray Jobs, it's better to specify the runtime_env in the Job spec, rather than in ray.init() in the entrypoint script. The reason is that it's simpler; in the first case the entrypoint script runs in the runtime env (as well as any tasks/actors), whereas in the second case only the tasks and actors run in the runtime env.

Some users are still using runtime_env in ray.init(). One possible reason is that it's not prominent enough in the docs. This PR adds a reference to KubeRay RayJob in the Ray Core runtime env docs, and also adds a code snippet to make it more friendly for users to copy and paste.

Related issue number

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • 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 added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • 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 :(

Signed-off-by: Archit Kulkarni <[email protected]>
Signed-off-by: Archit Kulkarni <[email protected]>
@kevin85421
Copy link
Member

The CI test docs/readthedocs.com:anyscale-ray failed.

@architkulkarni architkulkarni added the @author-action-required The PR author is responsible for the next step. Remove tag to send back to the reviewer. label Mar 28, 2024
@architkulkarni
Copy link
Contributor Author

Screenshot 2024-04-01 at 8 40 20 AM Screenshot 2024-04-01 at 8 40 36 AM Rendering looks OK, merging.

@architkulkarni architkulkarni removed the @author-action-required The PR author is responsible for the next step. Remove tag to send back to the reviewer. label Apr 1, 2024
Copy link
Contributor

@angelinalg angelinalg left a comment

Choose a reason for hiding this comment

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

Nice job!

* `runtimeEnvYAML` (Optional): A runtime environment that describes the dependencies the Ray job needs to run, including files, packages, environment variables, and more. Provide the configuration as a multi-line YAML string. Example:

```yaml
# [...]
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if this adds any value. Is there some pseudo comment that would make this more useful? If not and this is common practice, then please disregard my comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure either. I don't feel strongly about it so I removed it

@architkulkarni architkulkarni merged commit 3183281 into ray-project:master Apr 2, 2024
5 checks passed
ryanaoleary pushed a commit to ryanaoleary/ray that referenced this pull request Jun 7, 2024
When using Ray Jobs, it's better to specify the runtime_env in the Job spec, rather than in ray.init() in the entrypoint script. The reason is that it's simpler; in the first case the entrypoint script runs in the runtime env (as well as any tasks/actors), whereas in the second case only the tasks and actors run in the runtime env.

Some users are still using runtime_env in ray.init(). One possible reason is that it's not prominent enough in the docs. This PR adds a reference to KubeRay RayJob in the Ray Core runtime env docs, and also adds a code snippet to make it more friendly for users to copy and paste.

---------

Signed-off-by: Archit Kulkarni <[email protected]>
Co-authored-by: angelinalg <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants