Skip to content

Commit ccd89b4

Browse files
rragundezcopybara-github
authored andcommitted
fix: Remove check on serving_container_image_uri when artifact_uri and local_model is given
COPYBARA_INTEGRATE_REVIEW=#4558 from rragundez:patch-1 d7ff12e PiperOrigin-RevId: 696672287
1 parent 11e5378 commit ccd89b4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

google/cloud/aiplatform/models.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -5020,7 +5020,9 @@ def upload(
50205020
if not model_dir.exists():
50215021
raise ValueError(f"artifact_uri path does not exist: '{artifact_uri}'")
50225022
PREBUILT_IMAGE_RE = "(us|europe|asia)-docker.pkg.dev/vertex-ai/prediction/"
5023-
if re.match(PREBUILT_IMAGE_RE, serving_container_image_uri):
5023+
if serving_container_image_uri and re.match(
5024+
PREBUILT_IMAGE_RE, serving_container_image_uri
5025+
):
50245026
if not model_dir.is_dir():
50255027
raise ValueError(
50265028
f"artifact_uri path must be a directory: '{artifact_uri}' when using prebuilt image '{serving_container_image_uri}'"

0 commit comments

Comments
 (0)