__dask_layers__() should return layers #6507
Merged
mrocklin merged 1 commit intodask:masterfrom Aug 13, 2020
Merged
Conversation
Member
We can keep delayed as a low-level-graph, or we can treat it as a collection with single-task layers. Either is fine. Delayed is a bit awkward because it's hard to keep things efficient while building these graphs. |
Member
|
This change generally is fine with me (although I haven't looked much into the Scalar behavior). Is there a test that would make sense here? |
Contributor
Author
The test in #6509 will catch this one. |
kumarprabhu1988
pushed a commit
to kumarprabhu1988/dask
that referenced
this pull request
Oct 29, 2020
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 makes
Scalar.__dask_layers__()returnself._nameinstead ofself.key.Quoting from the docs, the
.__dask_layers__()should return the output layers:Context
I am working on a higher level
cull()function (see #6438) that usesHighLevelGraph.dependenciesto determine the dependency relationship between layers. Doing this work I noticed that sometimesHighLevelGraph.dependencieswill refer to low level keys and not layers because of__dask_layers__()returning keys instead of names, which meansHighLevelGraph.dependencieswill have values that refer to non-existing keys.What to do with
Delayed?Delayed.__dask_layers__()also returns a key. However,Delayeddoesn't have a name or anything other than the key so I am not sure what to do. Does it even make sense to define__dask_layers__()whenDelayedisn't a collection?Any suggestions?