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
8 changes: 3 additions & 5 deletions google/cloud/aiplatform/utils/prediction_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,9 @@ def get_prediction_aip_http_port(
The first element in the serving_container_ports. If there is no any values in it,
return the default http port.
"""
return (
serving_container_ports[0]
if serving_container_ports is not None and len(serving_container_ports) > 0
else prediction.DEFAULT_AIP_HTTP_PORT
)
if serving_container_ports:
return serving_container_ports[0]
return prediction.DEFAULT_AIP_HTTP_PORT


def download_model_artifacts(artifact_uri: str) -> None:
Expand Down