-
-
Notifications
You must be signed in to change notification settings - Fork 727
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
Alternative worker_client
usage model
#7311
Comments
I dislike the way worker_client behaves as well. There are still many problems around secede/rejoin. IIUC your proposal would basically use the same functionality but offer a different API? Would something like #5671 serve your use case as well? |
Would like disambiguate two things in this proposal:
Think 1 is the important thing as most of the pain with With 2, just find it is easier to think about a concrete example of the proposal. Am not attached to this particular proposal. There may be others that are better.
Not quite as it is still is requesting a client within the task function as opposed to somehow flagging this function in the graph. Though it may be complimentary as handling |
I actually thought earlier about removing secede and rejoin entirely (at least on threadpool level). I did this in a Draft PR #6607 and outlined a couple of shortcomings about this in there. TLDR I'm convinced that we can offer 3.) lack of visibility is a fair point. Do you think it would be valuable if we showed these tasks on the dashboard somehow? How should something like this be made visible? I assume a decorator alone is not sufficient, is it? Right now these tasks just vanish from the dashboard. Not ideal but easy to fix 4.) is an actual problem. However, even with annotations/decorators/etc. we'd need to teach this to every custom executor, wouldn't we? Generally speaking, I'm OK if there are features that just work with distributed. That sounds sufficiently complicated that I wouldn't want to implement this for every executor |
Currently if users would like to do some custom task submission as part of their task graph, Distributed provides
worker_client
. This does somesecede
/rejoin
logic to allow theWorker
to leave the pool and the rejoin later. However this comes with some caveats:concurrent.futures
concurrent.futures
updatesExecutor
s easilyAn alternative approach might be to surface the needed to perform dynamic submission at a higher level (like as part of the graph itself). For example one might decorate functions that would like access to the Client and provide a
client
argument, which the decorator would fill in (as part of task submission). This would make it more visible to users of workflows depending on this functionality. Also the Client and Scheduler could take this into account when orchestrating task submission. This would also avoid the need to think about how workers interact with this feature (since the Client and Scheduler could take care of that in advance).There may be other approaches that are better than this option. Raising mostly to get the discussion on better alternatives that might simplify maintenance/usage
The text was updated successfully, but these errors were encountered: