-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix wrong unpickling with dask 2024.11 (#1993)
### What kind of change does this PR introduce? The issue introduced with dask 2024.11 concerned the passing of arguments through the dask graph. Most SDBA classes are children of `Parametrizable`, itself a child of `dict`. When stored in the graph, objects like this are pickled. and then repickled when the function is actually executed. For some reason, the repickling stopped working and objects where reinstated as dictionaries instead of their subclasses. This particularly touched the `Grouper`, one of the only such objects actually been passed through dask-backed computations. Inheriting from `dict` was once not recommended but I think this is not the case anymore. Anyway, I found that inheriting from `collections.UserDict` actually solved the issue (after adapting the internals). Not sure if I should raise the issue back to dask... ### Does this PR introduce a breaking change? I changed how all classes of `xclim.sdba` are made, but in theory the change is at a low, private level.
- Loading branch information
Showing
4 changed files
with
17 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters