Skip to content

Commit

Permalink
Fix arg name calling create_isvc and add raw deployment external ro…
Browse files Browse the repository at this point in the history
…ute url extraction (#90)

* Create size-labeler.yml

* Delete .github/workflows/size-labeler.yml

* typo and url
  • Loading branch information
rnetser authored Jan 9, 2025
1 parent 18849ec commit e814822
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/model_serving/model_server/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def s3_models_inference_service(
}

if (external_route := request.param.get("external-route")) is not None:
isvc_kwargs["enable_auth"] = external_route
isvc_kwargs["external_route"] = external_route

if (enable_auth := request.param.get("enable-auth")) is not None:
isvc_kwargs["enable_auth"] = enable_auth
Expand Down
10 changes: 9 additions & 1 deletion utilities/inference_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,16 @@ def __init__(self, inference_service: InferenceService, runtime: str):
def get_inference_url(self) -> str:
# TODO: add ModelMesh support
if self.visibility_exposed:
if url := self.inference_service.instance.status.components.predictor.url:
if self.deployment_mode == KServeDeploymentType.SERVERLESS and (
url := self.inference_service.instance.status.components.predictor.url
):
return urlparse(url).netloc

elif self.deployment_mode == KServeDeploymentType.RAW_DEPLOYMENT and (
url := self.inference_service.instance.status.url
):
return urlparse(url).netloc

else:
raise ValueError(f"{self.inference_service.name}: No url found in InferenceService status")

Expand Down

0 comments on commit e814822

Please sign in to comment.