Repository navigation
Don't cull in local scheduler, do cull in delayed - #3856
Conversation
- Removes culling from the local scheduler. This was (usually) unnecessary, as all the collections (except delayed) culled by default. - Adds culling to ``dask.delayed``
| def test_delayed_optimize(): | ||
| x = Delayed('b', {'a': 1, | ||
| 'b': (inc, 'a'), | ||
| 'c': (inc, 'b')}) |
There was a problem hiding this comment.
The only way I was able to make a graph out of dask.delayed objects that required culling was from manually building the graph and wrapping it in a delayed object. This is because delayed objects manually build their graphs out of the arguments to the functions, it's not possible (afaict) to build a graph using just the delayed api that doesn't depend on all enclosed keys. (@mrocklin do you remember what you were doing to run into this issue?)
|
da.arange(10, chunks=(5,)).to_delayed()[0]
…On Mon, Aug 6, 2018 at 3:50 PM, Jim Crist ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In dask/tests/test_delayed.py
<#3856 (comment)>:
> @@ -164,6 +164,15 @@ def test_common_subexpressions():
assert len(res.dask) == 3
+def test_delayed_optimize():
+ x = Delayed('b', {'a': 1,
+ 'b': (inc, 'a'),
+ 'c': (inc, 'b')})
The only way I was able to make a graph out of dask.delayed objects that
required culling was from manually building the graph and wrapping it in a
delayed object. This is because delayed objects manually build their graphs
out of the arguments to the functions, it's not possible (afaict) to build
a graph using just the delayed api that doesn't depend on all enclosed
keys. ***@***.*** <https://github.com/mrocklin> do you remember what you
were doing to run into this issue?)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3856 (review)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AASszOVltJfDc_MM8EWTGsX6kfK-Md8Yks5uOJ3zgaJpZM4Vw-Y->
.
|
|
Ah, of course, transitioning between collections and delayed objects. That makes sense. I think the current test is good as is though, as it doesn't rely on other collections being present (i.e. will still run if numpy isn't installed). |
|
Agreed
…On Mon, Aug 6, 2018 at 3:55 PM, Jim Crist ***@***.***> wrote:
Ah, of course, transitioning between collections and delayed objects. That
makes sense.
I think the current test is good as is though, as it doesn't rely on other
collections being present (i.e. will still run if numpy isn't installed).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3856 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AASszAXDJxlby8kyki1o984HBF1rNa5Aks5uOJ8YgaJpZM4Vw-Y->
.
|
|
Looks good. Should we test that the local scheduler doesn't optimize? |
|
I don't think so. |
unnecessary, as all the collections (except delayed) culled by default.
dask.delayedFixes #3735.