Skip to content
Draft
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
6 changes: 3 additions & 3 deletions distributed/shuffle/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ class ShuffleType(Enum):
ARRAY_RECHUNK = "ArrayRechunk"


@dataclass(frozen=True)
@dataclass(frozen=True, slots=True)
class ShuffleRunSpec(Generic[_T_partition_id]):
run_id: int = field(init=False, default_factory=partial(next, itertools.count(1)))
spec: ShuffleSpec
Expand All @@ -456,7 +456,7 @@ def id(self) -> ShuffleId:
return self.spec.id


@dataclass(frozen=True)
@dataclass(frozen=True, slots=True)
class ShuffleSpec(abc.ABC, Generic[_T_partition_id]):
id: ShuffleId
disk: bool
Expand Down Expand Up @@ -491,7 +491,7 @@ def create_run_on_worker(
"""Create the new shuffle run on the worker."""


@dataclass(eq=False)
@dataclass(eq=False, slots=True)
class SchedulerShuffleState(Generic[_T_partition_id]):
run_spec: ShuffleRunSpec
participating_workers: set[str]
Expand Down
2 changes: 1 addition & 1 deletion distributed/shuffle/_rechunk.py
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,7 @@ def _get_assigned_worker(self, id: NDIndex) -> str:
return self.worker_for[id]


@dataclass(frozen=True)
@dataclass(frozen=True, slots=True)
class ArrayRechunkSpec(ShuffleSpec[NDIndex]):
new: ChunkedAxes
old: ChunkedAxes
Expand Down
2 changes: 1 addition & 1 deletion distributed/shuffle/_shuffle.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ def validate_data(self, data: pd.DataFrame) -> None:
raise ValueError(f"Expected {self.meta.columns=} to match {data.columns=}.")


@dataclass(frozen=True)
@dataclass(frozen=True, slots=True)
class DataFrameShuffleSpec(ShuffleSpec[int]):
npartitions: int
column: str
Expand Down
Loading
Loading