Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

test: add Gemini 2.0 tests #1213

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions 17 tests/system/small/ml/test_llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ def test_text_embedding_generator_multi_cols_predict_success(
"gemini-1.5-pro-002",
"gemini-1.5-flash-001",
"gemini-1.5-flash-002",
"gemini-2.0-flash-exp",
),
)
def test_create_load_gemini_text_generator_model(
Expand Down Expand Up @@ -297,6 +298,7 @@ def test_create_load_gemini_text_generator_model(
"gemini-1.5-pro-002",
"gemini-1.5-flash-001",
"gemini-1.5-flash-002",
"gemini-2.0-flash-exp",
),
)
@pytest.mark.flaky(retries=2)
Expand All @@ -322,6 +324,7 @@ def test_gemini_text_generator_predict_default_params_success(
"gemini-1.5-pro-002",
"gemini-1.5-flash-001",
"gemini-1.5-flash-002",
"gemini-2.0-flash-exp",
),
)
@pytest.mark.flaky(retries=2)
Expand Down Expand Up @@ -349,6 +352,7 @@ def test_gemini_text_generator_predict_with_params_success(
"gemini-1.5-pro-002",
"gemini-1.5-flash-001",
"gemini-1.5-flash-002",
"gemini-2.0-flash-exp",
),
)
@pytest.mark.flaky(retries=2)
Expand Down Expand Up @@ -469,3 +473,16 @@ def test_palm2_text_embedding_deprecated():
llm.PaLM2TextEmbeddingGenerator()
except (Exception):
pass


@pytest.mark.parametrize(
"model_name",
(
"gemini-1.5-pro-preview-0514",
"gemini-1.5-flash-preview-0514",
"gemini-2.0-flash-exp",
),
)
def test_gemini_preview_model_warnings(model_name):
with pytest.warns(exceptions.PreviewWarning):
llm.GeminiTextGenerator(model_name=model_name)
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.