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

[runtime env][core] Use Proto message RuntimeEnvInfo between user code and core_worker #22856

Merged

Conversation

Catch-Bull
Copy link
Contributor

@Catch-Bull Catch-Bull commented Mar 7, 2022

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

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

@Catch-Bull Catch-Bull marked this pull request as draft March 7, 2022 11:57
@Catch-Bull Catch-Bull changed the title [WIP][runtime env][core] Use Proto RuntimeEnvInfo between user code and core_worker [runtime env][core] Use Proto message RuntimeEnvInfo between user code and core_worker Mar 8, 2022
@Catch-Bull Catch-Bull marked this pull request as ready for review March 8, 2022 19:01
Copy link
Contributor

@architkulkarni architkulkarni left a 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

@@ -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]]):
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the refactor :)

Copy link
Contributor

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?

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.
"""
Copy link
Contributor

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!

python/ray/tests/test_runtime_env_env_vars.py Outdated Show resolved Hide resolved
@@ -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]]):
Copy link
Contributor

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 Show resolved Hide resolved
src/ray/core_worker/common.h Outdated Show resolved Hide resolved
src/ray/core_worker/common.h Outdated Show resolved Hide resolved
src/ray/raylet/scheduling/cluster_task_manager_test.cc Outdated Show resolved Hide resolved
@Catch-Bull Catch-Bull force-pushed the change_runtime_env_protocol_between_processes branch from e469b3c to 994fc93 Compare March 9, 2022 12:26
@Catch-Bull Catch-Bull force-pushed the change_runtime_env_protocol_between_processes branch from 1fed33a to fb41a04 Compare March 11, 2022 08:07
@raulchen raulchen merged commit 0cbbb8c into ray-project:master Mar 11, 2022
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

6 participants