Skip to content

Commit 87dfe40

Browse files
Ark-kuncopybara-github
authored andcommitted
feat: LLM - Released CodeGenerationModel tuning to GA
PiperOrigin-RevId: 577749202
1 parent ad19838 commit 87dfe40

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

tests/unit/aiplatform/test_language_models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1867,7 +1867,7 @@ def test_tune_code_generation_model(
18671867
_CODE_GENERATION_BISON_PUBLISHER_MODEL_DICT
18681868
),
18691869
):
1870-
model = preview_language_models.CodeGenerationModel.from_pretrained(
1870+
model = language_models.CodeGenerationModel.from_pretrained(
18711871
"code-bison@001"
18721872
)
18731873
# The tune_model call needs to be inside the PublisherModel mock

vertexai/language_models/_language_models.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -2405,7 +2405,7 @@ def send_message_streaming_async(
24052405
)
24062406

24072407

2408-
class CodeGenerationModel(_LanguageModel):
2408+
class _CodeGenerationModel(_LanguageModel):
24092409
"""A language model that generates code.
24102410
24112411
Examples:
@@ -2686,8 +2686,12 @@ def count_tokens(
26862686
)
26872687

26882688

2689+
class CodeGenerationModel(_CodeGenerationModel, _TunableTextModelMixin):
2690+
pass
2691+
2692+
26892693
class _PreviewCodeGenerationModel(
2690-
CodeGenerationModel, _TunableModelMixin, _CountTokensCodeGenerationMixin
2694+
CodeGenerationModel, _CountTokensCodeGenerationMixin
26912695
):
26922696
__name__ = "CodeGenerationModel"
26932697
__module__ = "vertexai.preview.language_models"

0 commit comments

Comments
 (0)