@@ -498,7 +498,7 @@ def dict_to_bullet_list(data_dict: dict) -> str:
498
498
check_resp = batch .check (solver_version = solver_version , batch_type = "RF_SWEEP" )
499
499
detail = batch .wait_for_validate (batch_type = "RF_SWEEP" )
500
500
status = detail .status
501
- if status not in ("Validate_Success " , "Validate_Warn " ):
501
+ if status not in ("validate_success " , "validate_warn " ):
502
502
# Surface server-provided reason if available
503
503
reason = None
504
504
try :
@@ -823,7 +823,7 @@ def _download_cm() -> bool:
823
823
total = resp .totalTask or 0
824
824
post_succ = resp .postprocessSuccess or 0
825
825
status = resp .status
826
- if status in {"Run_Failed " , "Run_Diverged " , "Blocked " , "Aborted " , "Abort " }:
826
+ if status in {"error " , "diverged " , "blocked " , "aborted " , "aborting " }:
827
827
raise WebError (
828
828
f"Batch task { task_id } failed during postprocess: { status } "
829
829
) from None
@@ -989,19 +989,19 @@ def _monitor_modeler_batch(batch_id: str, verbose: bool = True, max_detail_tasks
989
989
console = get_logging_console () if verbose else None
990
990
991
991
def _status_to_stage (status : str ) -> tuple [str , int ]:
992
- if status in ("Created " ,):
993
- return ("Created " , 0 )
994
- if status in ("Preprocess " ,):
995
- return ("Preprocess " , 1 )
996
- if status in ("Validating " ,):
997
- return ("Validating " , 2 )
998
- if status in ("Validate_Success " , "Validate_Warn " ):
992
+ if status in ("draft " ,):
993
+ return ("draft " , 0 )
994
+ if status in ("preprocess " ,):
995
+ return ("preprocess " , 1 )
996
+ if status in ("validating " ,):
997
+ return ("validating " , 2 )
998
+ if status in ("validate_success " , "validate_warn " ):
999
999
return ("Validate" , 3 )
1000
- if status in ("Running " ,):
1001
- return ("Running " , 4 )
1002
- if status in ("Postprocess " ,):
1003
- return ("Postprocess " , 5 )
1004
- if status in ("Run_Success " ,):
1000
+ if status in ("running " ,):
1001
+ return ("running " , 4 )
1002
+ if status in ("postprocess " ,):
1003
+ return ("postprocess " , 5 )
1004
+ if status in ("run_success " ,):
1005
1005
return ("Success" , 6 )
1006
1006
return (status , 6 )
1007
1007
@@ -1025,23 +1025,23 @@ def _status_to_stage(status: str) -> tuple[str, int]:
1025
1025
with Progress (* progress_columns , console = console , transient = False ) as progress :
1026
1026
p_validate = progress .add_task ("Validate" , total = 1.0 )
1027
1027
p_run = progress .add_task ("Run" , total = 1.0 )
1028
- p_post = progress .add_task ("Postprocess " , total = 1.0 )
1028
+ p_post = progress .add_task ("postprocess " , total = 1.0 )
1029
1029
1030
1030
task_bars = {}
1031
1031
total_task = detail .totalTask or 0
1032
1032
if total_task and total_task <= max_detail_tasks :
1033
1033
run_statuses = [
1034
- "Created " ,
1035
- "Preprocess " ,
1036
- "Validating " ,
1034
+ "draft " ,
1035
+ "preprocess " ,
1036
+ "validating " ,
1037
1037
"Validate" ,
1038
- "Running " ,
1039
- "Postprocess " ,
1038
+ "running " ,
1039
+ "postprocess " ,
1040
1040
"Success" ,
1041
1041
]
1042
1042
for t in detail .tasks or []:
1043
1043
tname = t .taskName or t .taskId
1044
- status = t .status or "Created "
1044
+ status = t .status or "draft "
1045
1045
_ , idx = _status_to_stage (status )
1046
1046
pbar = progress .add_task (
1047
1047
f"{ tname } " ,
@@ -1051,12 +1051,12 @@ def _status_to_stage(status: str) -> tuple[str, int]:
1051
1051
task_bars [tname ] = pbar
1052
1052
1053
1053
terminal_errors = {
1054
- "Validate_Failed " ,
1055
- "Run_Failed " ,
1056
- "Run_Diverged " ,
1057
- "Blocked " ,
1058
- "Abort " ,
1059
- "Aborted " ,
1054
+ "validate_fail " ,
1055
+ "error " ,
1056
+ "diverged " ,
1057
+ "blocked " ,
1058
+ "aborting " ,
1059
+ "aborted " ,
1060
1060
}
1061
1061
1062
1062
postprocess_triggered = False
@@ -1085,14 +1085,14 @@ def _status_to_stage(status: str) -> tuple[str, int]:
1085
1085
if task_bars :
1086
1086
for t in detail .tasks or []:
1087
1087
tname = t .taskName or t .taskId
1088
- status = t .status or "Created "
1088
+ status = t .status or "draft "
1089
1089
_ , idx = _status_to_stage (status )
1090
1090
pbar = task_bars .get (tname )
1091
1091
if pbar is not None :
1092
1092
progress .update (pbar , completed = min (idx , 6 ), refresh = False )
1093
1093
1094
1094
# If run succeeded but postprocess not yet complete, trigger it and keep waiting
1095
- if status in ("Run_Success " , "Postprocess " ) or r >= total :
1095
+ if status in ("run_success " , "postprocess " ) or r >= total :
1096
1096
if not postprocess_triggered :
1097
1097
# Kick off postprocess once
1098
1098
try :
@@ -1113,12 +1113,12 @@ def _status_to_stage(status: str) -> tuple[str, int]:
1113
1113
time .sleep (REFRESH_TIME )
1114
1114
else :
1115
1115
terminal_errors = {
1116
- "Validate_Failed " ,
1117
- "Run_Failed " ,
1118
- "Run_Diverged " ,
1119
- "Blocked " ,
1120
- "Abort " ,
1121
- "Aborted " ,
1116
+ "validate_fail " ,
1117
+ "error " ,
1118
+ "diverged " ,
1119
+ "blocked " ,
1120
+ "aborting " ,
1121
+ "aborted " ,
1122
1122
}
1123
1123
postprocess_triggered = False
1124
1124
while True :
@@ -1127,7 +1127,7 @@ def _status_to_stage(status: str) -> tuple[str, int]:
1127
1127
total = d .totalTask or 0
1128
1128
p = d .postprocessSuccess or 0
1129
1129
r = d .runSuccess or 0
1130
- if (s in ("Run_Success " , "Postprocess " ) or r >= total ) and total :
1130
+ if (s in ("run_success " , "postprocess " ) or r >= total ) and total :
1131
1131
if p < total and not postprocess_triggered :
1132
1132
try :
1133
1133
BatchTask (batch_id ).postprocess (batch_type = "RF_SWEEP" )
0 commit comments