From e757d011317ceb7ff3a404e9f2108276bdf5b4d4 Mon Sep 17 00:00:00 2001 From: kennethmhc Date: Tue, 13 Aug 2024 15:52:35 +0200 Subject: [PATCH] Fix istio client url(#273) --- python/hsml/core/serving_api.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/hsml/core/serving_api.py b/python/hsml/core/serving_api.py index 511fef4fd..1886523a5 100644 --- a/python/hsml/core/serving_api.py +++ b/python/hsml/core/serving_api.py @@ -252,6 +252,7 @@ def _send_inference_request_via_rest_protocol( path_params = self._get_hopsworks_inference_path( _client._project_id, deployment_instance ) + with_base_path_params = True else: _client = client.istio.get_instance() if _client is not None: @@ -263,16 +264,19 @@ def _send_inference_request_via_rest_protocol( deployment_instance.name, client.get_knative_domain(), ) + with_base_path_params = False else: # fallback to Hopsworks client _client = client.get_instance() path_params = self._get_hopsworks_inference_path( _client._project_id, deployment_instance ) + with_base_path_params = True # send inference request return _client._send_request( - "POST", path_params, headers=headers, data=json.dumps(data) + "POST", path_params, headers=headers, data=json.dumps(data), + with_base_path_params=with_base_path_params ) def _send_inference_request_via_grpc_protocol(