pangeo-data / rechunker

Disk-to-disk chunk transformation for chunked arrays.
https://rechunker.readthedocs.io/
MIT License
163 stars 25 forks source link

rechunker object has no attribute "persist" #91

Open pmav99 opened 3 years ago

pmav99 commented 3 years ago

using 0.4.2, when trying to persist a Rechunker object on a dask cluster, an AttributeError gets raised.

E.g. when running the tutorial, cell 11 raises:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-11-d4bee8fff75b> in <module>
----> 1 future = array_plan.persist()
      2 progress(future)

AttributeError: 'Rechunked' object has no attribute 'persist'
pmav99 commented 3 years ago

OK, it seems that an array_plan.plan.persist() is needed instead. I will make a PR

rabernat commented 3 years ago

Thanks for reporting!

I'm puzzled why this API has changed.

pmav99 commented 3 years ago

This seems to be the commit that introduced the change https://github.com/pangeo-data/rechunker/commit/b6b4a52c72c0d3bc497bc6bb6f6c7b7a48ed760f

So, should we just update the docs or you'd rather think more over it?