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

[WIP] Remove Py4j: Use Ray cross language to start AppMaster #161

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

Conversation

kira-lin
Copy link
Collaborator

⚠️This PR might have breaking change.

Previously, we use Py4j to start RayAppMaster, and it will connect to the ray cluster. In other words, it is also a driver. Therefore, the python part and java part is actually two Ray job. This might be inconvenient after object ownership transfer was introduced in Ray.

We used Py4j because using cross language call requires all python remote function/actors to reside in the code_search_path as well. In such case, users cannot define some remote functions in Jupyter notebook and play with it. However, as runtime_env is introduced, and community are trying to improve this, we decide to remove Py4j eventually.

At the point this is merged, users will need to modify their command to connect to ray cluster to something like this:

ray.init(address='auto', job_config=ray.job_config.JobConfig(code_search_path=raydp.get_code_search_path()))

If users have some python remote functions to call, they have to use runtime_env, or if the issue mentioned above is solved, hopefully no code change is needed. If users are already using cross language call, they should add their path to ours. Since raydp.get_code_search_path returns a list, this should be trivial.

@carsonwang
Copy link
Collaborator

@kira-lin , it is not quite friendly to force users specifying the code_search_path when using RayDP. Instead of setting code_search_path when init Ray, is it possible to create the RayAppMaster actor using a custom runtime_env and then do cross language calls to it? This might also need changes in Ray upstream for this kind of cross language calls.

@kira-lin kira-lin mentioned this pull request Jul 12, 2021
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.

2 participants