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

Remove ops that are not in parameters from tokenize_partial #368

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions dask_expr/_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ def _tokenize_partial(expr, ignore: list | None = None) -> str:
# Helper function to "tokenize" the operands
# that are not in the `ignore` list
ignore = ignore or []
return _tokenize_deterministic(
*[
op
for i, op in enumerate(expr.operands)
if i >= len(expr._parameters) or expr._parameters[i] not in ignore
]
)
ops = []
for i, op in enumerate(expr.operands):
if i >= len(expr._parameters):
continue
elif expr._parameters[i] not in ignore:
ops.append(op)
return _tokenize_deterministic(*ops)


class LRU(UserDict[K, V]):
Expand Down
Loading