diff --git a/src/algorithm/evaluation/config.py b/src/algorithm/evaluation/config.py index 0df8c9fe..c29abe96 100644 --- a/src/algorithm/evaluation/config.py +++ b/src/algorithm/evaluation/config.py @@ -458,7 +458,7 @@ def __init__( self.draw_question_verdicts, self.draw_score, self.should_explain_scoring, - self.should_export_csv, + self.should_export_explanation_csv, ) = map( outputs_configuration.get, [ @@ -467,7 +467,7 @@ def __init__( "draw_question_verdicts", "draw_score", "should_explain_scoring", - "should_export_csv", + "should_export_explanation_csv", ], ) if self.draw_question_verdicts["enabled"]: @@ -997,7 +997,6 @@ def conditionally_add_explanation( ] self.explanation_table.add_row(*row) - @staticmethod def get_schema_verdict(answer_type, question_verdict, delta=None): # Note: Negative custom weights should be considered as incorrect schema verdict(special case) @@ -1017,8 +1016,8 @@ def conditionally_print_explanation(self): def get_should_explain_scoring(self): return self.should_explain_scoring - def get_should_export_csv(self): - return self.should_export_csv + def get_should_export_explanation_csv(self): + return self.should_export_explanation_csv def get_explanation_table(self): return self.explanation_table diff --git a/src/entry.py b/src/entry.py index c2199d90..aeef3aa6 100644 --- a/src/entry.py +++ b/src/entry.py @@ -327,7 +327,7 @@ def process_directory_files( logger.info( f"(/{files_counter}) Graded with score: {round(score, 2)}\t {default_answers_summary} \t file: '{file_id}'" ) - if evaluation_config_for_response.get_should_export_csv(): + if evaluation_config_for_response.get_should_export_explanation_csv(): explanation_table = evaluation_config_for_response.get_explanation_table() explanation_table = table_to_df(explanation_table) explanation_table.to_csv( @@ -339,9 +339,6 @@ def process_directory_files( else: logger.info(f"(/{files_counter}) Processed file: '{file_id}'") - - - # TODO: move this logic inside the class save_marked_dir = template.get_save_marked_dir() diff --git a/src/schemas/evaluation_schema.py b/src/schemas/evaluation_schema.py index b2a38104..a518c83a 100644 --- a/src/schemas/evaluation_schema.py +++ b/src/schemas/evaluation_schema.py @@ -220,7 +220,7 @@ "description": "Whether to print the table explaining question-wise verdicts", "type": "boolean", }, - "should_export_csv": { + "should_export_explanation_csv": { "description": "Whether to export the explanation of evaluation results as a CSV file", "type": "boolean", },