6464DELETE_WORKFLOW_STEPS = 2
6565DEACTIVATE_WORKFLOW_STEPS = 2
6666DEFAULT_RETRYING_REQUEST_ATTEMPTS = 3
67- TERMINAL_STATES = [State .ACTIVE , State . FAILED , State .DELETED , State .INACTIVE ]
67+ TERMINAL_STATES = [State .FAILED , State .DELETED , State .INACTIVE ]
6868
6969MODEL_DEPLOYMENT_KIND = "deployment"
7070MODEL_DEPLOYMENT_TYPE = "modelDeployment"
@@ -720,7 +720,7 @@ def update(
720720
721721 def watch (
722722 self ,
723- log_type : str = ModelDeploymentLogType . ACCESS ,
723+ log_type : str = None ,
724724 time_start : datetime = None ,
725725 interval : int = LOG_INTERVAL ,
726726 log_filter : str = None ,
@@ -731,7 +731,7 @@ def watch(
731731 ----------
732732 log_type: str, optional
733733 The log type. Can be `access`, `predict` or None.
734- Defaults to access .
734+ Defaults to None .
735735 time_start : datetime.datetime, optional
736736 Starting time for the log query.
737737 Defaults to None.
@@ -748,7 +748,12 @@ def watch(
748748 The instance of ModelDeployment.
749749 """
750750 status = ""
751- while not self ._stop_condition ():
751+ while self .state not in [
752+ State .ACTIVE ,
753+ State .FAILED ,
754+ State .DELETED ,
755+ State .INACTIVE
756+ ]:
752757 status = self ._check_and_print_status (status )
753758 time .sleep (interval )
754759
0 commit comments