-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Cache tokens on expressions and restore after pickle roundtrip #11791
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
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 25m 58s ⏱️ - 1m 54s For more details on these failures, see this check. Results for commit f4cd5ac. ± Comparison against base commit 5f61e42. ♻️ This comment has been updated with latest results. |
dask/_expr.py
Outdated
| @functools.cached_property | ||
| def _name(self) -> str: | ||
| return self._funcname + "-" + _tokenize_deterministic(*self.operands) | ||
| if not self._token: |
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.
The name is overwritten in a few places, is this an issue?
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.
Maybe. I'll check
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.
yeah, that's an issue
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.
there are just 38 places this is overridden one way or another... no big deal!
|
I think I now broke out all tokenization from the actual naming. There are a few subclasses that overwrite the tokenization although I believe that should not be necessary. |
|
One of the test failures is fixed by #11795 and the other one is a random weird thing of aioboto |
|
thanks |
xref #11736
This caches the tokens on the expression and restores calculated tokens after a pickle roundtrip. This helps us keep tokens consistent between client and scheduler.
This is safe to do since Expr are by definition immutable (since otherwise our singleton approach would fall apart anyhow)