[WIP] Remove Py4j: Use Ray cross language to start AppMaster #161
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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. Sinceraydp.get_code_search_path
returns a list, this should be trivial.