Skip to content

Commit f15ff24

Browse files
authored
Merge pull request #226 from PriorLabs/bump_scipy
Bump minimal scipy version to 1.11.1
2 parents 1ade200 + 5a6d069 commit f15ff24

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "tabpfn"
7-
version = "2.0.5"
7+
version = "2.0.6"
88
dependencies = [
99
"torch>=2.1,<3",
1010
"scikit-learn>=1.2.0,<1.7",
1111
"typing_extensions>=4.4.0",
12-
"scipy>=1.7.3,<2",
12+
"scipy>=1.11.1,<2",
1313
"pandas>=1.4.0,<3",
1414
"einops>=0.2.0,<0.9",
1515
"huggingface-hub>=0.0.1,<1",

tests/test_regressor_interface.py

+15
Original file line numberDiff line numberDiff line change
@@ -306,3 +306,18 @@ def test_get_embeddings(X_y: tuple[np.ndarray, np.ndarray], data_source: str) ->
306306
assert embeddings.shape[0] == n_estimators
307307
assert embeddings.shape[1] == X.shape[0]
308308
assert embeddings.shape[2] == encoder_shape
309+
310+
311+
def test_overflow():
312+
"""Test which fails for scipy<1.11.0."""
313+
# Fetch a small sample of the California housing dataset
314+
X, y = sklearn.datasets.fetch_california_housing(return_X_y=True)
315+
X, y = X[:20], y[:20]
316+
317+
# Create and fit the regressor
318+
regressor = TabPFNRegressor(n_estimators=1, device="cpu", random_state=42)
319+
320+
regressor.fit(X, y)
321+
322+
predictions = regressor.predict(X)
323+
assert predictions.shape == (X.shape[0],), "Predictions shape is incorrect"

0 commit comments

Comments
 (0)