Skip to content

Commit a9d7632

Browse files
Ark-kuncopybara-github
authored andcommitted
chore: LLM - Improved the Model Garden launch stage error messages
PiperOrigin-RevId: 574237146
1 parent b4cdb05 commit a9d7632

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

vertexai/_model_garden/_model_garden_models.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,10 @@ def _validate_launch_stage(
268268

269269
if publisher_launch_stage not in self._LAUNCH_STAGE:
270270
raise ValueError(
271-
f"The model you are trying to instantiate does not support the launch stage: {publisher_launch_stage.name}"
271+
f"The model you are trying to instantiate has launch stage '{publisher_launch_stage.name}'"
272+
f", but the '{type(self).__module__}.{type(self).__name__}' class"
273+
f" only supports the following launch stages: {self._LAUNCH_STAGE}."
274+
" For preview models please use the classes from the `vertexai.preview.*` namespace."
272275
)
273276

274277
# Subclasses override this attribute to specify their instance schema

0 commit comments

Comments
 (0)