Skip to content

Commit 52ce05a

Browse files
yinghsienwucopybara-github
authored andcommitted
chore: Set the upper bound of sklearn to unbreak presubmit
PiperOrigin-RevId: 704765085
1 parent 1b2457f commit 52ce05a

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

setup.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
# ray train extras required for prediction tests
132132
"ray[train]",
133133
# Framework version constraints copied from testing_extra_require
134-
"scikit-learn",
134+
"scikit-learn<1.6.0",
135135
"tensorflow",
136136
"torch >= 2.0.0, < 2.1.0",
137137
"xgboost",
@@ -204,7 +204,8 @@
204204
"kfp >= 2.6.0, < 3.0.0",
205205
"pytest-asyncio",
206206
"pytest-xdist",
207-
"scikit-learn",
207+
"scikit-learn<1.6.0; python_version<='3.10'",
208+
"scikit-learn; python_version>'3.10'",
208209
# Lazy import requires > 2.12.0
209210
"tensorflow == 2.13.0; python_version<='3.11'",
210211
"tensorflow == 2.16.1; python_version>'3.11'",

testing/constraints-ray-2.9.3.txt

+1
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ mlflow==1.30.1 # Pinned to speed up installation
1111
pytest-xdist==3.3.1 # Pinned to unbreak unit tests
1212
IPython # Added to test supernova rich html buttons
1313
pandas==2.1.4 # Pandas must be <2.2.0 to be compatible with ray 2.9.3
14+
scikit-learn<1.6.0 # Breaking Ray 2.9.3

tests/unit/vertexai/test_feature_monitor.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,8 @@
1717

1818
import re
1919
from typing import Dict, List, Tuple
20-
from unittest import mock
21-
from unittest.mock import call, patch
20+
from unittest.mock import patch
2221

23-
from google.api_core import operation as ga_operation
2422
from google.cloud import aiplatform
2523
from google.cloud.aiplatform import base
2624

@@ -84,9 +82,7 @@ def create_feature_monitor_job_mock():
8482
FeatureRegistryServiceClient,
8583
"create_feature_monitor_job",
8684
) as create_feature_monitor_job_mock:
87-
create_feature_monitor_job_mock.return_value = (
88-
_TEST_FG1_FMJ1
89-
)
85+
create_feature_monitor_job_mock.return_value = _TEST_FG1_FMJ1
9086
yield create_feature_monitor_job_mock
9187

9288

0 commit comments

Comments
 (0)