Skip to content

Commit cb1b0c4

Browse files
committed
add a testcase to test warning message
1 parent 380c952 commit cb1b0c4

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/system/small/ml/test_llm.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -762,3 +762,19 @@ def test_llm_gemini_pro_score_params(llm_fine_tune_df_default_index, model_name)
762762
def test_gemini_preview_model_warnings(model_name):
763763
with pytest.warns(exceptions.PreviewWarning):
764764
llm.GeminiTextGenerator(model_name=model_name)
765+
766+
767+
@pytest.mark.parametrize(
768+
"model_class",
769+
[
770+
llm.TextEmbeddingGenerator,
771+
llm.MultimodalEmbeddingGenerator,
772+
llm.GeminiTextGenerator,
773+
llm.Claude3TextGenerator,
774+
],
775+
)
776+
def test_text_embedding_generator_no_default_model_warning(model_class):
777+
message = "Since upgrading the default model can cause unintended breakages, the\ndefault model will be removed in BigFrames 3.0. Please supply an\nexplicit model to avoid this message."
778+
bigframes.options.experiments.blob = True
779+
with pytest.warns(FutureWarning, match=message):
780+
model_class(model_name=None)

0 commit comments

Comments
 (0)