Repository navigation
Use HighLevelGraph optimizations in delayed - #7298
Closed
jrbourbeau wants to merge 2 commits into
Closed
jrbourbeau wants to merge 2 commits into
jrbourbeau wants to merge 2 commits into
Conversation
Collaborator
|
I suspect that this doesn't fully fix the problem -- since your test doesn't have any cull-able layers, If we write a test that requires culling, we may yet run into #7036 Edit: here is an example that still fails here: with dask.annotate(foo="bar"):
a = delayed(add)(1, 2)
b = delayed(add)(3, 4)
d = delayed((a,b))
assert type(d.dask) is HighLevelGraph
assert next(iter(d.dask.layers.values())).annotations == {"foo": "bar"}
# Ensure optimizing a Delayed object returns a HighLevelGraph
# and doesn't loose annotations
(d_opt,) = dask.optimize(d[0])
assert type(d_opt.dask) is HighLevelGraph
assert next(iter(d_opt.dask.layers.values())).annotations == {"foo": "bar"} |
Member
Author
|
Ah, thanks for pointing that out and providing a nice code snippet (the last |
3 tasks done
Member
Author
|
Closing in favor of #8316 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR updates the default graph manipulation for
delayedobjects to useHighLevelGraph.cullinstead of the low-level (dict) graphcullroutine. This allows us to maintain annotations through our optimization pipeline (xref #7036).cc @ian-r-rose @madsbk
black dask/flake8 dask