Skip to content

Commit b915b61

Browse files
jsondaicopybara-github
authored andcommitted
feat: GenAI SDK client(evals) - Release GenAI evals module to public preview and remove experimental warning from client.evals module
PiperOrigin-RevId: 799748016
1 parent a6600dd commit b915b61

File tree

2 files changed

+0
-24
lines changed

2 files changed

+0
-24
lines changed

tests/unit/vertexai/genai/test_evals.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import os
1818
import statistics
1919
from unittest import mock
20-
import warnings
2120

2221
import google.auth.credentials
2322
from google.cloud import aiplatform
@@ -29,7 +28,6 @@
2928
from vertexai._genai import evals
3029
from vertexai._genai import types as vertexai_genai_types
3130
from google.genai import client
32-
from google.genai import errors as genai_errors
3331
from google.genai import types as genai_types
3432
import pandas as pd
3533
import pytest
@@ -148,20 +146,6 @@ def setup_method(self):
148146
)
149147
self.client = vertexai.Client(project=_TEST_PROJECT, location=_TEST_LOCATION)
150148

151-
@pytest.mark.usefixtures("google_auth_mock")
152-
@mock.patch.object(client.Client, "_get_api_client")
153-
@mock.patch.object(evals.Evals, "_evaluate_instances")
154-
def test_evaluate_instances(self, mock_evaluate, mock_get_api_client):
155-
with warnings.catch_warnings(record=True) as captured_warnings:
156-
warnings.simplefilter("always")
157-
self.client.evals._evaluate_instances(
158-
bleu_input=vertexai_genai_types.BleuInput()
159-
)
160-
mock_evaluate.assert_called_once_with(
161-
bleu_input=vertexai_genai_types.BleuInput()
162-
)
163-
assert captured_warnings[0].category == genai_errors.ExperimentalWarning
164-
165149
@pytest.mark.usefixtures("google_auth_mock")
166150
def test_eval_run(self):
167151
test_client = vertexai.Client(project=_TEST_PROJECT, location=_TEST_LOCATION)

vertexai/_genai/client.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,6 @@ def live(self) -> live.AsyncLive:
6464
return self._live
6565

6666
@property
67-
@_common.experimental_warning(
68-
"The Vertex SDK GenAI evals module is experimental, and may change in future "
69-
"versions."
70-
)
7167
def evals(self) -> Any:
7268
if self._evals is None:
7369
try:
@@ -172,10 +168,6 @@ def __init__(
172168
self._agent_engines = None
173169

174170
@property
175-
@_common.experimental_warning(
176-
"The Vertex SDK GenAI evals module is experimental, and may change in future "
177-
"versions."
178-
)
179171
def evals(self) -> Any:
180172
if self._evals is None:
181173
try:

0 commit comments

Comments
 (0)