Skip to content

Commit f79e095

Browse files
matthew29tangcopybara-github
authored andcommitted
chore: Fix flaky unit tests
PiperOrigin-RevId: 910960736
1 parent a2654bb commit f79e095

5 files changed

Lines changed: 26 additions & 26 deletions

File tree

google/cloud/aiplatform/base.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,10 @@ class VertexAiResourceNoun(metaclass=abc.ABCMeta):
465465
service representation of the resource noun.
466466
"""
467467

468+
def __new__(cls, *args, **kwargs):
469+
"""Explicit __new__ to prevent argument forwarding to object.__new__."""
470+
return super().__new__(cls)
471+
468472
@property
469473
@classmethod
470474
@abc.abstractmethod

noxfile.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@
6262
"3.11": ["2.42.0", "2.47.1"],
6363
}
6464
UNIT_TEST_STANDARD_DEPENDENCIES = [
65-
"mock",
66-
"asyncmock",
6765
"pytest",
6866
"pytest-cov",
6967
"pytest-asyncio",

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,6 @@
271271
"kfp >= 2.6.0, < 3.0.0; python_version<'3.13'",
272272
"pytest-asyncio",
273273
"pytest-cov",
274-
"mock",
275274
"pytest-xdist",
276275
"Pillow",
277276
"scikit-learn<1.6.0; python_version<='3.10'",

vertexai/resources/preview/feature_store/__init__.py

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -51,21 +51,20 @@
5151
)
5252

5353
__all__ = (
54-
Feature,
55-
FeatureGroup,
56-
FeatureGroupBigQuerySource,
57-
FeatureMonitor,
58-
FeatureOnlineStoreType,
59-
FeatureOnlineStore,
60-
FeatureView,
61-
FeatureViewBigQuerySource,
62-
FeatureViewReadResponse,
63-
FeatureViewVertexRagSource,
64-
FeatureViewRegistrySource,
65-
IndexConfig,
66-
IndexConfig,
67-
TreeAhConfig,
68-
BruteForceConfig,
69-
DistanceMeasureType,
70-
AlgorithmConfig,
54+
"Feature",
55+
"FeatureGroup",
56+
"FeatureGroupBigQuerySource",
57+
"FeatureMonitor",
58+
"FeatureOnlineStoreType",
59+
"FeatureOnlineStore",
60+
"FeatureView",
61+
"FeatureViewBigQuerySource",
62+
"FeatureViewReadResponse",
63+
"FeatureViewVertexRagSource",
64+
"FeatureViewRegistrySource",
65+
"IndexConfig",
66+
"TreeAhConfig",
67+
"BruteForceConfig",
68+
"DistanceMeasureType",
69+
"AlgorithmConfig",
7170
)

vertexai/resources/preview/feature_store/feature_group.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,20 @@
2020
from google.cloud.aiplatform import base, initializer
2121
from google.cloud.aiplatform import utils
2222
from google.cloud.aiplatform.compat.types import (
23-
feature as gca_feature,
2423
feature_group as gca_feature_group,
25-
io as gca_io,
2624
feature_monitor_v1beta1 as gca_feature_monitor,
25+
feature as gca_feature,
26+
io as gca_io,
2727
)
28-
from vertexai.resources.preview.feature_store.utils import (
29-
FeatureGroupBigQuerySource,
30-
)
31-
from vertexai.resources.preview.feature_store import (
28+
from vertexai.resources.preview.feature_store.feature import (
3229
Feature,
3330
)
3431
from vertexai.resources.preview.feature_store.feature_monitor import (
3532
FeatureMonitor,
3633
)
34+
from vertexai.resources.preview.feature_store.utils import (
35+
FeatureGroupBigQuerySource,
36+
)
3737

3838

3939
_LOGGER = base.Logger(__name__)

0 commit comments

Comments
 (0)