Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for dask 2024.12 #156

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

aulemahal
Copy link

@aulemahal aulemahal commented Feb 21, 2025

This fixes #155, allowing rechunker to be used with dask >= 2024.12.0.

The change in dask's blockwise was introduced in dask/dask#11568 and requires keys pointing to other dask collections to be wrapped within TaskRef objects. The latter were introduced in dask 2024.09, so to preserve retro-compatibility ( rechunker doesn't pin dask), I added a if-else that checks dask's version.

I tested against dask 2024.9, 2024.11.2, 2024.12 and 2025.2.

Installing apache-beam requires dask < 2024.8.0 because the former needs cloudpickle < 2.3 and the latter >=3, thus I didn't test if my change had impacts on the apache-beam tests. (I guess it shouldn't...)

Copy link
Member

@TomAugspurger TomAugspurger left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. One small request.


from rechunker.types import ParallelPipelines, Pipeline, PipelineExecutor

# Change in how dask collection token are given to blockwise()
Copy link
Member

Choose a reason for hiding this comment

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

As of dask/dask#11675, there's a public dask.task_spec we can import this from. I think that was released in 2025.1.0.

Could you try adding another version check and importing it from the public location if possible?

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.

Config type string and rechunker plan fails during execution
2 participants