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

Adding image_uri to docstring of runtime_env #47905

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

japneet-anyscale
Copy link

@japneet-anyscale japneet-anyscale commented Oct 4, 2024

Adding image_uri description and example to docstring. The parameter is in the signature, but not in the description section for the parameters.

cc: @jjyao

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 :(

Adding image_uri description and example to docstring

Signed-off-by: Japneet <[email protected]>
@angelinalg angelinalg added the core Issues that should be addressed in Ray Core label Oct 4, 2024
python/ray/runtime_env/runtime_env.py Outdated Show resolved Hide resolved
python/ray/runtime_env/runtime_env.py Outdated Show resolved Hide resolved
japneet-anyscale and others added 2 commits October 4, 2024 13:48
Co-authored-by: angelinalg <[email protected]>
Signed-off-by: Japneet <[email protected]>
Co-authored-by: angelinalg <[email protected]>
Signed-off-by: Japneet <[email protected]>
@@ -263,6 +267,9 @@ class MyClass:
config: config for runtime environment. Either
a dict or a RuntimeEnvConfig. Field: (1) setup_timeout_seconds, the
timeout of runtime environment creation, timeout is in seconds.
image_uri: URI to a container image. The Ray worker process runs
in a container with this image. You can't use this parameter with other fields
of runtime_env.
Copy link
Contributor

Choose a reason for hiding this comment

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

can you specify what happens when the image cannot be found? does it raise an exception?

Copy link
Author

Choose a reason for hiding this comment

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

RuntimeError: {"message":"failed to pull image after 5 retries: containerd client pull: failed to resolve reference "docker.io/<image_uri>": docker.io/<image_uri>: not found"}

Reduce line length

Signed-off-by: Japneet <[email protected]>
Copy link
Author

@japneet-anyscale japneet-anyscale left a comment

Choose a reason for hiding this comment

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

Shortened line length

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Issues that should be addressed in Ray Core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants