Skip to content

Commit 1b831f2

Browse files
committed
Set hash none for split
1 parent 745d3bc commit 1b831f2

1 file changed

Lines changed: 1 addition & 22 deletions

File tree

openml/tasks/split.py

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -109,28 +109,7 @@ def __eq__(self, other: Any) -> bool:
109109
return False
110110
return True
111111

112-
def __hash__(self) -> int:
113-
split_items = []
114-
for repetition in sorted(self.split):
115-
for fold in sorted(self.split[repetition]):
116-
for sample in sorted(self.split[repetition][fold]):
117-
train, test = self.split[repetition][fold][sample]
118-
split_items.append(
119-
(
120-
repetition,
121-
fold,
122-
sample,
123-
hash(train.tobytes()),
124-
hash(test.tobytes()),
125-
)
126-
)
127-
return hash(
128-
(
129-
self.name,
130-
self.description,
131-
tuple(split_items),
132-
)
133-
)
112+
__hash__ = None # type: ignore
134113

135114
@classmethod
136115
def _from_arff_file(cls, filename: Path) -> OpenMLSplit: # noqa: C901, PLR0912

0 commit comments

Comments
 (0)