Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: LLM - Added deprecation warning to get_tuned_model when the model is not deployed #3717

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions vertexai/language_models/_language_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,11 @@ def get_tuned_model(cls, tuned_model_name: str) -> "_LanguageModel":
tuned_model_deployments = tuned_vertex_model.gca_resource.deployed_models
if len(tuned_model_deployments) == 0:
# Deploying the model
warnings.warn(
"The model is not deployed."
" In the future SDK version this will become an error.",
category=PendingDeprecationWarning,
)
endpoint_name = tuned_vertex_model.deploy().resource_name
else:
endpoint_name = tuned_model_deployments[0].endpoint
Expand Down