File tree Expand file tree Collapse file tree 3 files changed +14
-6
lines changed
components/coder/data_science/pipeline
scenarios/data_science/dev/runner Expand file tree Collapse file tree 3 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -71,11 +71,14 @@ def evaluate(
71
71
model_set_in_scores = set (score_df .index )
72
72
73
73
# Check model names (index)
74
+ if not score_df .index .is_unique :
75
+ score_check_text += "\n [Error] The score dataframe contains duplicate model names."
76
+ score_ret_code = 1
74
77
if "ensemble" not in model_set_in_scores :
75
- score_check_text += (
76
- f"\n [Error] The score dataframe doesn't contain the ensemble model.\n score_df is:\n { score_df } "
77
- )
78
+ score_check_text += "\n [Error] The score dataframe doesn't contain the ensemble model."
78
79
score_ret_code = 1
80
+ if score_ret_code != 0 :
81
+ score_check_text += f"The score_df is:\n { score_df } "
79
82
80
83
# Check metric name (columns)
81
84
if score_df .columns .tolist () != [self .scen .metric_name ]:
Original file line number Diff line number Diff line change @@ -435,8 +435,8 @@ def summarize_data():
435
435
df .loc [loop , "End Time (UTC+8)" ] = state .times [loop ][- 1 ].end + timedelta (hours = 8 )
436
436
if "running" in loop_data and "no_tag" in loop_data ["running" ]:
437
437
try :
438
- df .loc [loop , "Running Score (valid)" ] = round (
439
- loop_data ["running" ]["no_tag" ].result .loc ["ensemble" ].iloc [0 ], 5
438
+ df .loc [loop , "Running Score (valid)" ] = str (
439
+ round ( loop_data ["running" ]["no_tag" ].result .loc ["ensemble" ].iloc [0 ], 5 )
440
440
)
441
441
except :
442
442
df .loc [loop , "Running Score (valid)" ] = "❌"
Original file line number Diff line number Diff line change @@ -67,9 +67,14 @@ def evaluate(
67
67
# Check model names (index)
68
68
# in Pipeline task, we only check ensemble in scores.csv
69
69
if DS_RD_SETTING .coder_on_whole_pipeline :
70
+ if not score_df .index .is_unique :
71
+ score_check_text += "\n [Error] The score dataframe contains duplicate model names."
72
+ score_ret_code = 1
70
73
if "ensemble" not in model_set_in_scores :
71
- score_check_text += f "\n [Error] The score dataframe doesn't contain the ensemble model.\n score_df is: \n { score_df } "
74
+ score_check_text += "\n [Error] The score dataframe doesn't contain the ensemble model."
72
75
score_ret_code = 1
76
+ if score_ret_code != 0 :
77
+ score_check_text += f"The score_df is:\n { score_df } "
73
78
else :
74
79
if model_set_in_scores != model_set_in_folder .union ({"ensemble" }):
75
80
score_check_text += f"\n [Error] The scores dataframe does not contain the correct model names as index.\n correct model names are: { model_set_in_folder .union ({'ensemble' })} \n score_df is:\n { score_df } "
You can’t perform that action at this time.
0 commit comments