Skip to content

dask.graph_manipulation support for xarray.Dataset - #7276

Merged
jrbourbeau merged 4 commits into
dask:masterfrom
crusaderky:rename
Mar 2, 2021
Merged

jrbourbeau merged 4 commits into
dask:masterfrom
crusaderky:rename

Conversation

@crusaderky

@crusaderky crusaderky commented Feb 26, 2021 •

Copy link
Copy Markdown
Collaborator

Closes #7203
Downstream PR: pydata/xarray#4965

Comment thread dask/highlevelgraph.py
return ret

def cull(self, keys: set) -> "HighLevelGraph":
def cull(self, keys: Iterable) -> "HighLevelGraph":

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

previous implementation was writing back to the input parameter

Comment thread dask/highlevelgraph.py
to_visit |= ret_dependencies[k] - ret_dependencies.keys()

return HighLevelGraph(ret_layers, ret_dependencies)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See pydata/xarray#4965 for real-life usage of this new method

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @madsbk for visibility about this new cull_layers method

@crusaderky

Copy link
Copy Markdown
Collaborator Author

cc @jrbourbeau

@crusaderky

Copy link
Copy Markdown
Collaborator Author

@jrbourbeau gentle ping for review

@jrbourbeau jrbourbeau left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @crusaderky! This is a nice generalization to support custom Dask collections which themselves wrap multiple Dask collections (like Xarray does)

@jrbourbeau
jrbourbeau merged commit 8663c6b into dask:master Mar 2, 2021
@crusaderky
crusaderky deleted the rename branch March 2, 2021 21:41
dcherian added a commit to dcherian/dask that referenced this pull request Mar 8, 2021
* upstream/master: (43 commits)
  bump version to 2021.03.0
  Bump minimum version of distributed (dask#7328)
  Fix `percentiles_summary` with `dask_cudf` (dask#7325)
  Temporarily revert recent Array.__setitem__ updates (dask#7326)
  Blockwise.clone (dask#7312)
  NEP-35 duck array update (dask#7321)
  Don't allow setting `.name` for array (dask#7222)
  Use nearest interpolation for creating percentiles of integer input (dask#7305)
  Test `exp` with CuPy arrays (dask#7322)
  Check that computed chunks have right size and dtype (dask#7277)
  pytest.mark.flaky (dask#7319)
  Contributing docs: add note to pull the latest git tags before pip installing Dask (dask#7308)
  Support for Python 3.9 (dask#7289)
  Add broadcast-based merge implementation (dask#7143)
  Add split_every to graph_manipulation (dask#7282)
  Typo in optimize docs (dask#7306)
  dask.graph_manipulation support for xarray.Dataset (dask#7276)
  Add plot width and height support for Bokeh 2.3.0 (dask#7297)
  Add numpy functions tri, triu_indices, triu_indices_from, tril_indices, tril_indices_from (dask#6997)
  Remove "cleanup" task in dataframe on-disk shuffle. The partd directory (dask#7260)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

xarray.Dataset can't respect the new collection protocol

2 participants