64
64
DELETE_WORKFLOW_STEPS = 2
65
65
DEACTIVATE_WORKFLOW_STEPS = 2
66
66
DEFAULT_RETRYING_REQUEST_ATTEMPTS = 3
67
- TERMINAL_STATES = [State .ACTIVE , State . FAILED , State .DELETED , State .INACTIVE ]
67
+ TERMINAL_STATES = [State .FAILED , State .DELETED , State .INACTIVE ]
68
68
69
69
MODEL_DEPLOYMENT_KIND = "deployment"
70
70
MODEL_DEPLOYMENT_TYPE = "modelDeployment"
@@ -720,7 +720,7 @@ def update(
720
720
721
721
def watch (
722
722
self ,
723
- log_type : str = ModelDeploymentLogType . ACCESS ,
723
+ log_type : str = None ,
724
724
time_start : datetime = None ,
725
725
interval : int = LOG_INTERVAL ,
726
726
log_filter : str = None ,
@@ -731,7 +731,7 @@ def watch(
731
731
----------
732
732
log_type: str, optional
733
733
The log type. Can be `access`, `predict` or None.
734
- Defaults to access .
734
+ Defaults to None .
735
735
time_start : datetime.datetime, optional
736
736
Starting time for the log query.
737
737
Defaults to None.
@@ -748,7 +748,12 @@ def watch(
748
748
The instance of ModelDeployment.
749
749
"""
750
750
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
+ ]:
752
757
status = self ._check_and_print_status (status )
753
758
time .sleep (interval )
754
759
0 commit comments