-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[runtime env][core] Use Proto message RuntimeEnvInfo
between user code and core_worker
#22856
[runtime env][core] Use Proto message RuntimeEnvInfo
between user code and core_worker
#22856
Conversation
RuntimeEnvInfo
between user code and core_workerRuntimeEnvInfo
between user code and core_worker
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.
Looks like a nice refactor! There's one possibly relevant test failure, let's make sure it's addressed before merging. https://buildkite.com/ray-project/ray-builders-pr/builds/26071#d9e6abc6-e1cb-46df-9cb9-ff606004c760/6-6512
python/ray/actor.py
Outdated
@@ -397,6 +398,23 @@ def __call__(self, *args, **kwargs): | |||
f"use '{self.__ray_metadata__.class_name}.remote()'." | |||
) | |||
|
|||
def _parse_runtime_env(self, runtime_env: Optional[Union[dict, RuntimeEnv]]): |
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 for the refactor :)
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.
A some function exists in remote_function.py
. Can we move it to utils.py
for reuse?
python/ray/runtime_env.py
Outdated
which not contained in `ProtoRuntimeEnv` but in `ProtoRuntimeEnvInfo`, | ||
such as `eager_install`. This function will extract those fields from | ||
`RuntimeEnv` and create a new `ProtoRuntimeEnvInfo`, and serialize it. | ||
""" |
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 for adding the docstring!
java/api/src/main/java/io/ray/api/runtimeenv/RuntimeEnvInfo.java
Outdated
Show resolved
Hide resolved
python/ray/actor.py
Outdated
@@ -397,6 +398,23 @@ def __call__(self, *args, **kwargs): | |||
f"use '{self.__ray_metadata__.class_name}.remote()'." | |||
) | |||
|
|||
def _parse_runtime_env(self, runtime_env: Optional[Union[dict, RuntimeEnv]]): |
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.
A some function exists in remote_function.py
. Can we move it to utils.py
for reuse?
java/api/src/main/java/io/ray/api/runtimeenv/RuntimeEnvInfo.java
Outdated
Show resolved
Hide resolved
e469b3c
to
994fc93
Compare
1fed33a
to
fb41a04
Compare
Why are these changes needed?
After this PR, the transfer of runtime_env information between user code and core_work is changed from RuntimeEnv to RuntimeEnvInfo, then it will be more convenient for us to add some fields that are inconvenient to put in RuntimeEnv, such as setup_runtime_env_seconds
Related issue number
Checks
scripts/format.sh
to lint the changes in this PR.