-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Ensure HLGExpr tokenize uniquely #11849
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
Conversation
@@ -136,7 +136,13 @@ def __hash__(self): | |||
return hash(self._name) | |||
|
|||
def __dask_tokenize__(self): | |||
return self._name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On main
_name
-> deterministic_token
-> token(self.operands)
-> HLG tokenization is not reliable (see
Lines 999 to 1003 in e0877d0
@normalize_token.register(HighLevelGraph) | |
def register_highlevelgraph(hlg): | |
# Note: Layer keys are not necessarily identifying HLGs uniquely | |
# see https://github.com/dask/dask/issues/9888 | |
return normalize_token(list(hlg.layers.keys())) |
This PR
_name
-> deterministic_token
-> __dask_tokenize__
-> id(self)
Unit Test ResultsSee test report for an extended history of previous test failures. This is useful for diagnosing flaky tests. 9 files ±0 9 suites ±0 3h 27m 30s ⏱️ - 1m 47s Results for commit aa0a57a. ± Comparison against base commit e0877d0. This pull request removes 1 and adds 1 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
Closes pydata/xarray#10171
I've seen these kind of failures during development. I don't fully understand why dask CI was fine with the current code but it might've been related to serialization. This fixes the xarray issue