Skip to content

Commit 072a048

Browse files
author
Ziqun Ye
committed
ODSC-39392: fix the code based on the comments
1 parent e242369 commit 072a048

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

ads/model/deployment/model_deployment_runtime.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -536,27 +536,28 @@ def with_health_check_port(
536536
return self.set_spec(self.CONST_HEALTH_CHECK_PORT, health_check_port)
537537

538538
@property
539-
def triton(self) -> str:
540-
"""Whether container is triton or not.
539+
def inference_server(self) -> str:
540+
"""Returns the inference server.
541541
542542
Returns
543543
-------
544-
bool
545-
Whether container is triton or not.
544+
str
545+
The inference server.
546546
"""
547-
return self.get_spec(self.CONST_TRITON, False)
547+
return self.get_spec(self.CONST_TRITON, None)
548548

549-
def with_triton(self, triton: bool = True) -> "ModelDeploymentRuntime":
550-
"""Sets the flag for triton.
549+
def with_inference_server(self, inference_server: str = "triton") -> "ModelDeploymentRuntime":
550+
"""Sets the inference server. Current supported inference server is "triton".
551+
Note if you are using byoc, you do not need to set the inference server.
551552
552553
Parameters
553554
----------
554-
triton: bool
555-
Whether it is a triton container.
555+
inference_server: str
556+
Set the inference server.
556557
557558
Returns
558559
-------
559560
ModelDeploymentRuntime
560561
The ModelDeploymentRuntime instance (self).
561562
"""
562-
return self.set_spec(self.CONST_TRITON, triton)
563+
return self.set_spec(self.CONST_TRITON, inference_server.lower())

0 commit comments

Comments
 (0)