Skip to content

Commit 1183b0f

Browse files
authored
feat: add deprecation warning to PaLM2TextGenerator model (#1035)
1 parent 4992cc2 commit 1183b0f

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

bigframes/ml/llm.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,17 @@
8484
_ML_GENERATE_EMBEDDING_STATUS = "ml_generate_embedding_status"
8585

8686

87+
@typing_extensions.deprecated(
88+
"PaLM2TextGenerator is going to be deprecated. Use GeminiTextGenerator(https://cloud.google.com/python/docs/reference/bigframes/latest/bigframes.ml.llm.GeminiTextGenerator) instead. ",
89+
category=exceptions.ApiDeprecationWarning,
90+
)
8791
@log_adapter.class_logger
8892
class PaLM2TextGenerator(base.BaseEstimator):
8993
"""PaLM2 text generator LLM model.
9094
95+
.. note::
96+
PaLM2TextGenerator is going to be deprecated. Use GeminiTextGenerator(https://cloud.google.com/python/docs/reference/bigframes/latest/bigframes.ml.llm.GeminiTextGenerator) instead.
97+
9198
Args:
9299
model_name (str, Default to "text-bison"):
93100
The model for natural language tasks. “text-bison” returns model fine-tuned to follow natural language instructions

tests/system/small/ml/test_llm.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,11 @@ def test_llm_gemini_pro_score_params(llm_fine_tune_df_default_index):
450450
)
451451

452452

453+
def test_palm2_text_generator_deprecated():
454+
with pytest.warns(exceptions.ApiDeprecationWarning):
455+
llm.PaLM2TextGenerator()
456+
457+
453458
def test_palm2_text_embedding_deprecated():
454459
with pytest.warns(exceptions.ApiDeprecationWarning):
455460
try:

0 commit comments

Comments
 (0)