html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue https://github.com/pydata/xarray/pull/3584#issuecomment-561794415,https://api.github.com/repos/pydata/xarray/issues/3584,561794415,MDEyOklzc3VlQ29tbWVudDU2MTc5NDQxNQ==,1312546,2019-12-04T19:09:34Z,2019-12-04T19:09:34Z,MEMBER,"@mrocklin if you get a chance, can you confirm that the values in `HighLevelGraph.depedencies` should be a subset of the keys of layers? So in the following, the `lambda-<...>-x` is problematic, because it's not a key in `layers`? ```python (Pdb) pp list(self.layers) ['eq-e98e52fb2b8e27b4b5158d399330c72d', 'lambda-0f1d0bc5e7df462d7125839aed006e04', 'ones-c4a83f4b990021618d55e0fa61a351d6'] (Pdb) pp self.dependencies {'eq-e98e52fb2b8e27b4b5158d399330c72d': {'lambda-0f1d0bc5e7df462d7125839aed006e04-x', 'ones-c4a83f4b990021618d55e0fa61a351d6'}, 'lambda-0f1d0bc5e7df462d7125839aed006e04': {'ones-c4a83f4b990021618d55e0fa61a351d6'}, 'ones-c4a83f4b990021618d55e0fa61a351d6': set()} ``` That's coming from the `name` of the DataArray / the dask arary in `DataArray.data`.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,530657789 https://github.com/pydata/xarray/pull/3584#issuecomment-561773837,https://api.github.com/repos/pydata/xarray/issues/3584,561773837,MDEyOklzc3VlQ29tbWVudDU2MTc3MzgzNw==,1312546,2019-12-04T18:17:56Z,2019-12-04T18:17:56Z,MEMBER,"So this is enough to fix this in Dask ```diff diff --git a/dask/blockwise.py b/dask/blockwise.py index 52a36c246..84e0ecc08 100644 --- a/dask/blockwise.py +++ b/dask/blockwise.py @@ -818,7 +818,7 @@ def fuse_roots(graph: HighLevelGraph, keys: list): if ( isinstance(layer, Blockwise) and len(deps) > 1 - and not any(dependencies[dep] for dep in deps) # no need to fuse if 0 or 1 + and not any(dependencies.get(dep, {}) for dep in deps) # no need to fuse if 0 or 1 and all(len(dependents[dep]) == 1 for dep in deps) ): new = toolz.merge(layer, *[layers[dep] for dep in deps]) ``` I'm trying to understand why we're getting this KeyError though. I want to make sure that we have a valid HighLevelGraph before making that change.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,530657789