You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The file python/ray/worker.py is a bit of a mess. We should restructure it in some of the following ways.
There should be a Worker class which has a local scheduler client, object store client, and Redis client. It should be possible to instantiate multiple Worker objects. More of the functions in worker.py should be part of the Worker class.
There should be a separate Python file that implements the Ray API (and which creates a global Worker object to use as the default worker). The Ray API calls would essentially be forwarded to method calls on the global worker object.
The remote decorator should be implemented in a separate file.
Thanks! I've been holding off because we've been refactoring the internal APIs, and a lot of the functionality that's currently implemented in Python is going to move into C++, and then hopefully the worker code will be mostly (or entirely) written in Cython.
For that reason, I'd suggest holding off on this one for now, though if you see low hanging fruit for restructuring things in a cleaner way, then that'd be great :)
Out of curiosity, do you guys have a design doc / a branch we could look at?
Mostly because we're starting to make our own changes (ideally, but not
necessarily for upstream consumption) and would be good to roughly stay in
the loop.
On Wed, Nov 15, 2017 at 3:24 PM, Robert Nishihara ***@***.***> wrote:
Thanks! I've been holding off because we've been refactoring the internal
APIs, and a lot of the functionality that's currently implemented in Python
is going to move into C++, and then hopefully the worker code will be
mostly (or entirely) written in Cython.
For that reason, I'd suggest holding off on this one for now, though if
you see low hanging fruit for restructuring things in a cleaner way, then
that'd be great :)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#614 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACkV1s2yE6qhp1KWzQCce1a6BozxKbsLks5s20iJgaJpZM4NsKIQ>
.
A lot of the internal API work is being brainstormed in #1173. Our main reason for cleaning up the internal C++ APIs is to make it easy to support other language bindings.
Cool! Saw that, but didn't have a closer look yet. The rationale makes
sense.
At the moment, we're thinking about modular scheduling: how to swap out
schedulers, how tasks / drivers provide the information schedulers need.
I'm working on distributed deadline stream computing (i.e., make sure > X%
of the data items in some stream are processed within N ms deadline) and
our target applications use python / C++. Admittedly, the projects are a
bit far apart, so we're still exploring relevant issues (e.g., #1134, #953,
#1070, #1137).
Thanks! I've been holding off because we've been refactoring the internal APIs, and a lot of the > functionality that's currently implemented in Python is going to move into C++, and then > hopefully the worker code will be mostly (or entirely) written in Cython.
From the docs:
Multiple worker processes
One object store per node stores
One local scheduler per node
A global scheduler
A driver is the Python process that the user control
Which part do you plan to move to C++?
So Ray will have a C++ core wrapped with Python?
Well, the schedulers, object stores, and such are all already in C++. The main part that is in Python is the worker code. Right now the worker code communicates with Redis a lot. We'd like to hide all of the Redis interactions that behind C++ APIs (see #1173).
Activity
barrachri commentedon Nov 15, 2017
@robertnishihara did you start working on this? in case I'd like to help.
robertnishihara commentedon Nov 15, 2017
Thanks! I've been holding off because we've been refactoring the internal APIs, and a lot of the functionality that's currently implemented in Python is going to move into C++, and then hopefully the worker code will be mostly (or entirely) written in Cython.
For that reason, I'd suggest holding off on this one for now, though if you see low hanging fruit for restructuring things in a cleaner way, then that'd be great :)
danielsuo commentedon Nov 15, 2017
robertnishihara commentedon Nov 15, 2017
A lot of the internal API work is being brainstormed in #1173. Our main reason for cleaning up the internal C++ APIs is to make it easy to support other language bindings.
What sort of changes are you making?
danielsuo commentedon Nov 15, 2017
barrachri commentedon Nov 15, 2017
From the docs:
Which part do you plan to move to C++?
So Ray will have a C++ core wrapped with Python?
robertnishihara commentedon Nov 15, 2017
Well, the schedulers, object stores, and such are all already in C++. The main part that is in Python is the worker code. Right now the worker code communicates with Redis a lot. We'd like to hide all of the Redis interactions that behind C++ APIs (see #1173).
barrachri commentedon Nov 15, 2017
Thanks!
So I'll wait till redis part is moved to C++.
robertnishihara commentedon Feb 6, 2019
Closing in order to consolidate the discussion in #2016.