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
Since a possible correct dependency may look like:
, it could be better to divide worker.py into several independent modules. We could keep ray's APIs in worker.py so it may not affect other parts of ray.
I want to know if a PR for refactoring worker.py is welcomed? (I understand that such a PR is heavy and may be unnecessary now.)
How would you suggest structuring the code? It'd be nice to define the Worker class better, and it should be possible to do things like create multiple Workers in the same process. Then the Ray API would probably be very minimal and just directly call methods on a global_worker.
Another thing is that there are some related concepts, there are Workers that are used for workers, actors, and drivers, and maybe these should be related by subclassing some sort of RayClient class.
It may make sense to get rid of actor.py, but I'm not completely sure.
Activity
robertnishihara commentedon May 9, 2018
@suquark thanks for bringing this up, you're right that
worker.pyis messy, and a lot of reorganization needs to happen :)This is roughly the same issue as #614.
How would you suggest structuring the code? It'd be nice to define the
Workerclass better, and it should be possible to do things like create multipleWorkers in the same process. Then the Ray API would probably be very minimal and just directly call methods on aglobal_worker.Another thing is that there are some related concepts, there are
Workers that are used for workers, actors, and drivers, and maybe these should be related by subclassing some sort of RayClient class.It may make sense to get rid of
actor.py, but I'm not completely sure.robertnishihara commentedon May 10, 2018
I'm currently doing some cleanups in
worker.pyso maybe hold off for the moment.