Skip to content

Commit fde8b1e

Browse files
sararobcopybara-github
authored andcommitted
chore: GenAI SDK client - remove unused evals method
PiperOrigin-RevId: 832294300
1 parent e9d9c31 commit fde8b1e

File tree

2 files changed

+6
-15
lines changed

2 files changed

+6
-15
lines changed

tests/unit/vertexai/genai/test_evals.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,6 @@ def setup_method(self):
152152
)
153153
self.client = vertexai.Client(project=_TEST_PROJECT, location=_TEST_LOCATION)
154154

155-
@pytest.mark.usefixtures("google_auth_mock")
156-
def test_eval_run(self):
157-
test_client = vertexai.Client(project=_TEST_PROJECT, location=_TEST_LOCATION)
158-
with pytest.raises(NotImplementedError):
159-
test_client.evals.run()
160-
161155
@pytest.mark.usefixtures("google_auth_mock")
162156
@mock.patch.object(client.Client, "_get_api_client")
163157
@mock.patch.object(evals.Evals, "batch_evaluate")
@@ -4992,7 +4986,9 @@ def test_execute_evaluation_adds_creation_timestamp(
49924986
frozenset(["summarization_quality"]),
49934987
)
49944988
@mock.patch("time.sleep", return_value=None)
4995-
@mock.patch("vertexai._genai.evals.Evals._evaluate_instances")
4989+
@mock.patch(
4990+
"vertexai._genai.evals.Evals._evaluate_instances"
4991+
)
49964992
def test_predefined_metric_retry_on_resource_exhausted(
49974993
self,
49984994
mock_private_evaluate_instances,
@@ -5045,7 +5041,9 @@ def test_predefined_metric_retry_on_resource_exhausted(
50455041
frozenset(["summarization_quality"]),
50465042
)
50475043
@mock.patch("time.sleep", return_value=None)
5048-
@mock.patch("vertexai._genai.evals.Evals._evaluate_instances")
5044+
@mock.patch(
5045+
"vertexai._genai.evals.Evals._evaluate_instances"
5046+
)
50495047
def test_predefined_metric_retry_fail_on_resource_exhausted(
50505048
self,
50515049
mock_private_evaluate_instances,

vertexai/_genai/evals.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -882,13 +882,6 @@ def _get_evaluation_item(
882882
self._api_client._verify_response(return_value)
883883
return return_value
884884

885-
def run(self) -> types.EvaluateInstancesResponse:
886-
"""Evaluates an instance of a model.
887-
888-
This should eventually call _evaluate_instances()
889-
"""
890-
raise NotImplementedError()
891-
892885
def evaluate_instances(
893886
self,
894887
*,

0 commit comments

Comments
 (0)