diff --git a/src/tabpfn/model/preprocessing.py b/src/tabpfn/model/preprocessing.py index 9575b5f2..ceecc8dd 100644 --- a/src/tabpfn/model/preprocessing.py +++ b/src/tabpfn/model/preprocessing.py @@ -2,6 +2,7 @@ from __future__ import annotations +import hashlib import warnings from abc import abstractmethod from collections import UserList @@ -474,8 +475,7 @@ def _transform(self, X: np.ndarray, *, is_test: bool = False) -> np.ndarray: def float_hash_arr(arr: np.ndarray) -> float: - b = arr.tobytes() - _hash = hash(b) + _hash = int(hashlib.sha256(arr.tobytes()).hexdigest(), 16) return _hash % _CONSTANT / _CONSTANT