Skip to content

Commit b803f3f

Browse files
matthew29tangcopybara-github
authored andcommitted
chore: Skip system tests with deprecated models or update the models
PiperOrigin-RevId: 907726530
1 parent aabe816 commit b803f3f

4 files changed

Lines changed: 11 additions & 5 deletions

File tree

tests/system/aiplatform/test_dataset.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ def test_get_nonexistent_dataset(self):
196196
with pytest.raises(exceptions.NotFound):
197197
aiplatform.ImageDataset(dataset_name="0")
198198

199+
@pytest.mark.skip(
200+
reason="Creating a Text Dataset/training AutoML TEXT models is no longer supported"
201+
)
199202
def test_get_new_dataset_and_import(self, dataset_gapic_client):
200203
"""Retrieve new, empty dataset and import a text dataset using import().
201204
Then verify data items were successfully imported."""

tests/system/aiplatform/test_telemetry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
from vertexai.generative_models import GenerativeModel
2525

26-
GEMINI_MODEL_NAME = "gemini-1.5-pro-002"
26+
GEMINI_MODEL_NAME = "gemini-2.5-flash"
2727

2828

2929
class TestTelemetry(e2e_base.TestEndToEnd):

tests/system/vertexai/test_prompts.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
from tests.system.aiplatform import e2e_base
3131
from google import auth
3232

33+
MODEL_NAME = "gemini-2.5-flash"
34+
3335
_REQUEST_FUNCTION_PARAMETER_SCHEMA_STRUCT = {
3436
"type": "object",
3537
"properties": {
@@ -74,7 +76,7 @@ def test_create_prompt_with_variables(self):
7476
{"name": "Bob", "day": "Tuesday"},
7577
],
7678
generation_config=GenerationConfig(temperature=0.1),
77-
model_name="gemini-1.5-pro-002",
79+
model_name=MODEL_NAME,
7880
safety_settings=[
7981
SafetySetting(
8082
category=SafetySetting.HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT,
@@ -140,11 +142,11 @@ def test_create_prompt_with_function_calling(self):
140142
prompt_data="What is the weather like in Boston?",
141143
tools=[weather_tool],
142144
tool_config=tool_config,
143-
model_name="gemini-1.5-pro-002",
145+
model_name=MODEL_NAME,
144146
)
145147

146148
# (Optional) Create a separate prompt resource to save the version to
147-
prompt_temp = Prompt(model_name="gemini-1.5-pro-002")
149+
prompt_temp = Prompt(model_name=MODEL_NAME)
148150
prompt_temp1 = prompts.create_version(prompt=prompt_temp, version_name="empty")
149151

150152
# Create a new version to an existing prompt
@@ -190,6 +192,6 @@ def test_get_prompt_with_function_calling(self):
190192

191193
# Generate content using the prompt
192194
response = prompt.generate_content(
193-
model_name="gemini-1.5-pro-002", contents=prompt.assemble_contents()
195+
model_name=MODEL_NAME, contents=prompt.assemble_contents()
194196
)
195197
assert response

tests/system/vertexai/test_tokenization.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@
107107

108108

109109
@pytest.mark.parametrize("api_endpoint_env_name", [PROD_API_ENDPOINT])
110+
@pytest.mark.skip(reason="Models are deprecated.")
110111
class TestTokenization(e2e_base.TestEndToEnd):
111112
"""System tests for tokenization."""
112113

0 commit comments

Comments
 (0)