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 #48884

Merged
merged 12 commits into from
Dec 4, 2024
Merged
Changes from 8 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
7 changes: 7 additions & 0 deletions python/ray/runtime_env/runtime_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,10 @@ class MyClass:
pip={"packages":["tensorflow", "requests"], "pip_check": False,
"pip_version": "==22.0.2;python_version=='3.8.11'"})
# Example for using image_uri
RuntimeEnv(
image_uri="rayproject/ray:2.39.0-py312-cu123")
Args:
py_modules: List of URIs (either in the GCS or external
storage), each of which is a zip file that will be unpacked and
Expand Down Expand Up @@ -266,6 +270,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. Does not work with runtime env
Copy link
Contributor

@angelinalg angelinalg Dec 2, 2024

Choose a reason for hiding this comment

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

Suggested change
in a container with this image. Does not work with runtime env
in a container with this image. This parameter only works alone or with the

fields that are not ``config`` and ``env_vars``
Copy link
Contributor

@angelinalg angelinalg Dec 2, 2024

Choose a reason for hiding this comment

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

Suggested change
fields that are not ``config`` and ``env_vars``
``config`` or ``env_vars`` parameter. You can't use it with any other option.

Copy link
Contributor

@angelinalg angelinalg Dec 2, 2024

Choose a reason for hiding this comment

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

Just trying to avoid a double negative sentence. Please adjust accordingly. I'm not sure what the sentence is trying to say. To clarify, are you trying to say that this parameter can only be used with config and env_vars?

Also, can we capture these requirements in the signature? Otherwise the signature is misleading.

"""

known_fields: Set[str] = {
Expand Down