mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-08-03 10:27:42 +00:00
fix: ignore case when checking metric name (#1160)
* fix: ignore case when checking metric name * add case-sensitive to prompts --------- Co-authored-by: amstrongzyf <amstrongzyf@126.com>
This commit is contained in:
@@ -140,8 +140,8 @@ class PipelineCoSTEEREvaluator(CoSTEEREvaluator):
|
||||
if score_ret_code != 0:
|
||||
score_check_text += f"The dataframe in file 'scores.csv' is:\n{score_df}"
|
||||
|
||||
# Check metric name (columns)
|
||||
if score_df.columns.tolist() != [self.scen.metric_name]:
|
||||
# Check metric name (columns) - case insensitive
|
||||
if [col.lower() for col in score_df.columns.tolist()] != [self.scen.metric_name.lower()]:
|
||||
score_check_text += f"\n[Error] The scores dataframe does not contain the correct column names.\nCorrect columns is: ['{self.scen.metric_name}']\nBut got: {score_df.columns.tolist()}"
|
||||
score_ret_code = 1
|
||||
|
||||
|
||||
@@ -105,8 +105,8 @@ class WorkflowGeneralCaseSpecEvaluator(CoSTEEREvaluator):
|
||||
score_check_text += f"\n[Error] The scores dataframe does not contain the correct model names as index.\ncorrect model names are: {model_set_in_folder.union({'ensemble'})}\nscore_df is:\n{score_df}"
|
||||
score_ret_code = 1
|
||||
|
||||
# Check metric name (columns)
|
||||
if score_df.columns.tolist() != [self.scen.metric_name]:
|
||||
# Check metric name (columns) - case insensitive
|
||||
if [col.lower() for col in score_df.columns.tolist()] != [self.scen.metric_name.lower()]:
|
||||
score_check_text += f"\n[Error] The scores dataframe does not contain the correct column names.\nCorrect columns is: ['{self.scen.metric_name}']\nBut got: {score_df.columns.tolist()}"
|
||||
score_ret_code = 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user