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
{{ message }}
Repository navigation
Consolidation between Dask with/without Distributed #3237
One of the things I've been thinking about has been how we seem to have two ways to do Python threaded work.
A user can choose to just use Dask (w/o Distributed) or they can use Dask w/Distributed, but request that no additional processes be created. These seem to be overlapping quite a bit (though maybe not enough ;) and it might be better to just pick one. If we do pick one, we'd want to do that before 1.0 as it would be a breaking change. Though perhaps there is a way to ease into this choice.
Naively would suggest we drop the Dask (w/o Distributed) case. This would allow users and developers to be reasonably confident that there is always some Client working and would give guarantees about what dask.get and friends mean, which is a nice guarantee in loads of cases. Though maybe there are reasons not to go this way (e.g. circular dependency).
@shoyer brought up dependency issues, which I agree with. There are downstream projects that are comfortable depending on us now but probably would not want to do this with tornado along as well.
In practice the simplicity of the single-machine task scheduler makes it, in my mind, essential. This not only helps testing and algorithm development, but also aids significantly in debugging. Often when hard problems arise I ask people to try their computation on many different schedulers and report back what happens. This is surprisingly helpful in isolating issues.
Sure, admittedly this may be totally unachievable, don't really know, but to what extent can Distributed soften its dependencies? What about Tornado (since this dependency was brought up) is problematic for downstream?
Can see that there would be value in comparing several different schedulers for debugging purposes. Though would think that the Distributed scheduler would be much better for doing that debugging given the array of diagnostic information it provides and the fact that using multiple processes can be turned on and off. That said, not doing enough debugging of other users' issues in this area to say. Are there particular kinds of issues that the single machine scheduler (or Distributed scheduler using Python threads) avoid?
Perhaps instead of making this a pro/con discussion, it would be more informative to learn exactly in what ways the single machine scheduler differs or is similar to running Client(processes=False). Would it be possible to have the single machine scheduler accessible from some slimmed down version of the same Client API for instance? What API could be available and what API would be lost? What notable changes would occur to how the API performs?
That said, not doing enough debugging of other users' issues in this area to say. Are there particular kinds of issues that the single machine scheduler (or Distributed scheduler using Python threads) avoid?
The single-machine scheduler is just a much simpler system. It's 1000 lines rather than 10000 lines. People can understand it after a day of study. The single-threaded variant is of particular use due to tools like pdb and cProfile.
Sure, admittedly this may be totally unachievable, don't really know, but to what extent can Distributed soften its dependencies?
It needs a concurrent framework with coroutines. Today this is tornado, asyncio, or one of the newer systems like curio or trio. Tornado is, I believe, the easiest to depend upon.
At this point though I don't see any future path in which enough incentive is placed to displace us from tornado. The development cost would be moderate and the gains are not large enough that I would expect anyone to volunteer to do it. I also think that, among the options today, Tornado is possibly the best.
Making a client-like API based on concurrent.futures might be possible. It would again require some investment though and I haven't seen an entity (volunteer developer or commercial entity) that has the combined interest and skill to implement this. I would love to be shown wrong here. A clever graduate student could accomplish this with a few months of dedicated learning and work.
I'm going to close this. The local scheduler is very valuable to a large number of conservative developers. I suspect that many libraries that directly depend on us today would not do so if it required depending on the distributed scheduler.
Activity
mrocklin commentedon Mar 1, 2018
@shoyer brought up dependency issues, which I agree with. There are downstream projects that are comfortable depending on us now but probably would not want to do this with tornado along as well.
In practice the simplicity of the single-machine task scheduler makes it, in my mind, essential. This not only helps testing and algorithm development, but also aids significantly in debugging. Often when hard problems arise I ask people to try their computation on many different schedulers and report back what happens. This is surprisingly helpful in isolating issues.
jakirkham commentedon Mar 2, 2018
Sure, admittedly this may be totally unachievable, don't really know, but to what extent can Distributed soften its dependencies? What about Tornado (since this dependency was brought up) is problematic for downstream?
Can see that there would be value in comparing several different schedulers for debugging purposes. Though would think that the Distributed scheduler would be much better for doing that debugging given the array of diagnostic information it provides and the fact that using multiple processes can be turned on and off. That said, not doing enough debugging of other users' issues in this area to say. Are there particular kinds of issues that the single machine scheduler (or Distributed scheduler using Python threads) avoid?
Perhaps instead of making this a pro/con discussion, it would be more informative to learn exactly in what ways the single machine scheduler differs or is similar to running
Client(processes=False). Would it be possible to have the single machine scheduler accessible from some slimmed down version of the sameClientAPI for instance? What API could be available and what API would be lost? What notable changes would occur to how the API performs?mrocklin commentedon Mar 2, 2018
The single-machine scheduler is just a much simpler system. It's 1000 lines rather than 10000 lines. People can understand it after a day of study. The single-threaded variant is of particular use due to tools like pdb and cProfile.
It needs a concurrent framework with coroutines. Today this is tornado, asyncio, or one of the newer systems like curio or trio. Tornado is, I believe, the easiest to depend upon.
At this point though I don't see any future path in which enough incentive is placed to displace us from tornado. The development cost would be moderate and the gains are not large enough that I would expect anyone to volunteer to do it. I also think that, among the options today, Tornado is possibly the best.
Making a client-like API based on concurrent.futures might be possible. It would again require some investment though and I haven't seen an entity (volunteer developer or commercial entity) that has the combined interest and skill to implement this. I would love to be shown wrong here. A clever graduate student could accomplish this with a few months of dedicated learning and work.
jakirkham commentedon Apr 10, 2018
cc-ing @jcrist (as it sounded like you also have some thoughts on this topic from our discussion this evening)
dhirschfeld commentedon May 2, 2018
I'm obviously not very concerned about dependencies, but are they really that much of a concern these days?
If you use
dask.dataframeit depends on pandas which has a huge list of complex compiled dependencies:conda install pandas + standard deps
Sure, you can cut down a bit on those dependencies but are there actual users out there who would be running a stripped down pandas with dask?
Maybe users of
dask.arrayare more dependency sensitive?mrocklin commentedon Oct 24, 2018
I'm going to close this. The local scheduler is very valuable to a large number of conservative developers. I suspect that many libraries that directly depend on us today would not do so if it required depending on the distributed scheduler.
mrocklin commentedon Oct 24, 2018
If people still have strong thoughts the other way and plan to continue the conversation feel free to reopen. This seems to have gone stale for now.