Skip to content

Load with cancel option #8060

Closed Answered by keewis
johnkit asked this question in Ideas
Discussion options

You must be logged in to vote

You might be able to use distributed.Client.compute for this. xarray objects are dask collections, so this should work immediately:

import xarray as xr
from distributed import Client

client = Client()

ds = xr.tutorial.open_dataset("air_temperature", chunks={})
f1 = client.compute(ds)
f1.cancel()
f2 = client.compute(ds.Tair)
f2.cancel()

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by johnkit
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants