Skip to content

Moving Local Mode to C++#7670

Merged
edoakes merged 50 commits intoray-project:masterfrom
ijrsvt:LocalModeRestructure
Apr 1, 2020
Merged

Moving Local Mode to C++#7670
edoakes merged 50 commits intoray-project:masterfrom
ijrsvt:LocalModeRestructure

Conversation

@ijrsvt
Copy link
Copy Markdown
Contributor

@ijrsvt ijrsvt commented Mar 20, 2020

Why are these changes needed?

This moves Local Mode (serial python execution) from separate python code to the C++ CoreWorker in order to make it more maintainable.

Related issue number

Closes #4147
Closes #5013
Closes #5379

Checks

@AmplabJenkins
Copy link
Copy Markdown

Can one of the admins verify this patch?

@AmplabJenkins
Copy link
Copy Markdown

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/23406/
Test FAILed.

@AmplabJenkins
Copy link
Copy Markdown

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/23408/
Test FAILed.

@AmplabJenkins
Copy link
Copy Markdown

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/23409/
Test FAILed.

@AmplabJenkins
Copy link
Copy Markdown

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/23589/
Test FAILed.

@AmplabJenkins
Copy link
Copy Markdown

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/23785/
Test FAILed.

@AmplabJenkins
Copy link
Copy Markdown

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/23786/
Test FAILed.

@ijrsvt
Copy link
Copy Markdown
Contributor Author

ijrsvt commented Mar 27, 2020

@raulchen, @zhijunfu , @edoakes
I definitely realize that the repeated if local_mode checks are not super maintainable, but it is an improvement over the existing separate python execution path. It is at least in the same location as the main logic.

I think that making more abstractions for CoreWorker is a great idea, but most likely the scope for future work.

@AmplabJenkins
Copy link
Copy Markdown

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/23799/
Test FAILed.

@AmplabJenkins
Copy link
Copy Markdown

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/23801/
Test FAILed.

@AmplabJenkins
Copy link
Copy Markdown

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/23802/
Test FAILed.

@edoakes
Copy link
Copy Markdown
Collaborator

edoakes commented Mar 28, 2020

@zhijunfu @raulchen I agree that all of the if-else blocks aren't ideal, but it has a key benefit in that it minimizes the differences in the local mode and normal execution paths. The main issue with the existing Python implementation is that it's too abstracted from the normal path, so it ends up being very out of sync in behavior and users see issues when trying to go from local mode to normal mode (which is the whole point of supporting local mode). We could probably achieve this with the right abstractions but just completely subbing out a full local mode worker implementation is probably not the best idea.

@raulchen
Copy link
Copy Markdown
Contributor

@edoakes yeah, I agree that it's not a good idea to completely sub out local mode. I was suggesting that we should abstract the parts where local and cluster mode are different. Take task execution for example, we can have an abstract ExecuteTask method in the base class, and the local mode and cluster mode sub classes can implement this method in different ways. For the parts where local mode and cluster mode have the same logic, we should re-use the same code as much as possible.

@AmplabJenkins
Copy link
Copy Markdown

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/24064/
Test FAILed.

@AmplabJenkins
Copy link
Copy Markdown

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/24066/
Test FAILed.

@AmplabJenkins
Copy link
Copy Markdown

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/24075/
Test PASSed.

Copy link
Copy Markdown
Collaborator

@edoakes edoakes left a comment

Choose a reason for hiding this comment

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

LGTM, let's merge it if tests pass and try to abstract the logic out more if possible in a follow-up PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

7 participants