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

Use new tokenize module #8858

Merged
merged 2 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion distributed/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@
from tlz import first, groupby, merge, partition_all, valmap

import dask
from dask.base import collections_to_dsk, tokenize
from dask.base import collections_to_dsk
from dask.core import flatten, validate_key
from dask.highlevelgraph import HighLevelGraph
from dask.layers import Layer
from dask.optimization import SubgraphCallable
from dask.tokenize import tokenize
from dask.typing import Key, NoDefault, no_default
from dask.utils import (
apply,
Expand Down
2 changes: 1 addition & 1 deletion distributed/diagnostics/progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from tlz import groupby, valmap

from dask.base import tokenize
from dask.tokenize import tokenize
from dask.utils import key_split

from distributed.diagnostics.plugin import SchedulerPlugin
Expand Down
4 changes: 2 additions & 2 deletions distributed/protocol/serialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
import msgpack

import dask
from dask.base import normalize_token
from dask.sizeof import sizeof
from dask.tokenize import normalize_token
from dask.utils import typename

from distributed.metrics import context_meter
Expand Down Expand Up @@ -776,7 +776,7 @@

@partial(normalize_token.register, Serialized)
def normalize_Serialized(o):
return [o.header] + o.frames # for dask.base.tokenize
return [o.header] + o.frames # for dask.tokenize.tokenize

Check warning on line 779 in distributed/protocol/serialize.py

View check run for this annotation

Codecov / codecov/patch

distributed/protocol/serialize.py#L779

Added line #L779 was not covered by tests


# Teach serialize how to handle bytes
Expand Down
2 changes: 1 addition & 1 deletion distributed/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@

import dask
import dask.utils
from dask.base import TokenizationError, normalize_token, tokenize
from dask.core import get_deps, iskey, validate_key
from dask.tokenize import TokenizationError, normalize_token, tokenize
from dask.typing import Key, no_default
from dask.utils import (
_deprecated,
Expand Down
3 changes: 2 additions & 1 deletion distributed/shuffle/_merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
from typing import TYPE_CHECKING, Any

import dask
from dask.base import is_dask_collection, tokenize
from dask.base import is_dask_collection
from dask.highlevelgraph import HighLevelGraph
from dask.layers import Layer
from dask.tokenize import tokenize

from distributed.shuffle._arrow import check_minimal_arrow_version
from distributed.shuffle._core import ShuffleId, barrier_key, get_worker_plugin
Expand Down
2 changes: 1 addition & 1 deletion distributed/shuffle/_rechunk.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@

import dask
import dask.config
from dask.base import tokenize
from dask.highlevelgraph import HighLevelGraph
from dask.layers import Layer
from dask.tokenize import tokenize
from dask.typing import Key
from dask.utils import parse_bytes

Expand Down
2 changes: 1 addition & 1 deletion distributed/shuffle/_shuffle.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
from tornado.ioloop import IOLoop

import dask
from dask.base import tokenize
from dask.highlevelgraph import HighLevelGraph
from dask.layers import Layer
from dask.tokenize import tokenize
from dask.typing import Key

from distributed.core import PooledRPCCall
Expand Down
4 changes: 2 additions & 2 deletions distributed/tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
import dask.bag as db
from dask import delayed
from dask.optimization import SubgraphCallable
from dask.tokenize import tokenize
from dask.utils import get_default_shuffle_method, parse_timedelta, tmpfile

from distributed import (
Expand Down Expand Up @@ -73,7 +74,6 @@
futures_of,
get_task_metadata,
temp_default_client,
tokenize,
wait,
)
from distributed.cluster_dump import load_cluster_dump
Expand Down Expand Up @@ -1127,7 +1127,7 @@ async def test_scatter_non_list(c, s, a, b):

@gen_cluster(client=True)
async def test_scatter_tokenize_local(c, s, a, b):
from dask.base import normalize_token
from dask.tokenize import normalize_token

class MyObj:
pass
Expand Down
Loading