55
55
import dask
56
56
import dask .utils
57
57
from dask ._task_spec import DependenciesMapping , GraphNode , convert_legacy_graph
58
- from dask .base import TokenizationError , normalize_token , tokenize
59
58
from dask .core import istask , validate_key
60
59
from dask .typing import Key , no_default
61
60
from dask .utils import (
@@ -4985,25 +4984,14 @@ def _generate_taskstates(
4985
4984
# run_spec in the submitted graph may be None. This happens
4986
4985
# when an already persisted future is part of the graph
4987
4986
elif k in dsk :
4988
- # If both tokens are non-deterministic, skip comparison
4989
- try :
4990
- tok_lhs = tokenize (ts .run_spec , ensure_deterministic = True )
4991
- except TokenizationError :
4992
- tok_lhs = ""
4993
- try :
4994
- tok_rhs = tokenize (dsk [k ], ensure_deterministic = True )
4995
- except TokenizationError :
4996
- tok_rhs = ""
4997
-
4998
- # Additionally check dependency names. This should only be necessary
4999
- # if run_specs can't be tokenized deterministically.
4987
+ # Check dependency names.
5000
4988
deps_lhs = {dts .key for dts in ts .dependencies }
5001
4989
deps_rhs = dependencies [k ]
5002
4990
5003
4991
# FIXME It would be a really healthy idea to change this to a hard
5004
4992
# failure. However, this is not possible at the moment because of
5005
4993
# https://github.com/dask/dask/issues/9888
5006
- if tok_lhs != tok_rhs or deps_lhs != deps_rhs :
4994
+ if deps_lhs != deps_rhs :
5007
4995
# Retain old run_spec and dependencies; rerun them if necessary.
5008
4996
# This sweeps the issue of collision under the carpet as long as the
5009
4997
# old and new task produce the same output - such as in
@@ -5029,8 +5017,6 @@ def _generate_taskstates(
5029
5017
old task state: { ts .state }
5030
5018
old run_spec: { ts .run_spec !r}
5031
5019
new run_spec: { dsk [k ]!r}
5032
- old token: { normalize_token (ts .run_spec )!r}
5033
- new token: { normalize_token (dsk [k ])!r}
5034
5020
old dependencies: { deps_lhs }
5035
5021
new dependencies: { deps_rhs }
5036
5022
"""
0 commit comments