Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion google/cloud/aiplatform/helpers/container_uri_builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
from google.cloud.aiplatform.constants import prediction
from packaging import version

_CONTAINER_URI_REGEX = re.compile(prediction.CONTAINER_URI_REGEX)


def get_prebuilt_prediction_container_uri(
framework: str,
Expand Down Expand Up @@ -123,7 +125,7 @@ def is_prebuilt_prediction_container_uri(image_uri: str) -> bool:
Returns:
If the image is prebuilt by Vertex AI prediction.
"""
return re.fullmatch(prediction.CONTAINER_URI_REGEX, image_uri) is not None
return _CONTAINER_URI_REGEX.fullmatch(image_uri) is not None


# TODO(b/264191784) Deduplicate this method
Expand Down