Skip to content

Commit

Permalink
renamed eval_dir to evaluations_dir and updated 2-omr-marker to inclu…
Browse files Browse the repository at this point in the history
…de should_export_explanation_csv
  • Loading branch information
tushar-badlani committed Oct 7, 2024
1 parent 07eb96e commit 51cba20
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion samples/2-omr-marker/evaluation.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
}
},
"outputs_configuration": {
"should_explain_scoring": true
"should_explain_scoring": true,
"should_export_explanation_csv": true,
}
}
4 changes: 2 additions & 2 deletions src/algorithm/template/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ def get_multi_marked_dir(self):
def get_errors_dir(self):
return self.directory_handler.path_utils.errors_dir

def get_eval_dir(self):
return self.directory_handler.path_utils.eval_dir
def get_evaluations_dir(self):
return self.directory_handler.path_utils.evaluations_dir

def read_omr_response(self, input_gray_image, colored_image, file_path):
# Convert posix path to string
Expand Down
2 changes: 1 addition & 1 deletion src/entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ def process_directory_files(
explanation_table = evaluation_config_for_response.get_explanation_table()
explanation_table = table_to_df(explanation_table)
explanation_table.to_csv(
template.get_eval_dir().joinpath(file_name + ".csv"),
template.get_evaluations_dir().joinpath(file_name + ".csv"),
quoting=QUOTE_NONNUMERIC,
index=False,
)
Expand Down
1 change: 1 addition & 0 deletions src/schemas/defaults/evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"conditional_sets": [],
"outputs_configuration": {
"should_explain_scoring": False,
"should_export_explanation_csv": False,
"draw_score": {
"enabled": False,
"position": [200, 200],
Expand Down
4 changes: 2 additions & 2 deletions src/utils/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def __init__(self, output_dir):
self.manual_dir = output_dir.joinpath("Manual")
self.errors_dir = self.manual_dir.joinpath("ErrorFiles")
self.multi_marked_dir = self.manual_dir.joinpath("MultiMarkedFiles")
self.eval_dir = output_dir.joinpath("Evaluations")
self.evaluations_dir = output_dir.joinpath("Evaluations")
self.debug_dir = output_dir.joinpath("Debug")

def create_output_directories(self):
Expand Down Expand Up @@ -97,7 +97,7 @@ def create_output_directories(self):
for save_output_dir in [
self.results_dir,
self.image_metrics_dir,
self.eval_dir,
self.evaluations_dir,
]:
if not os.path.exists(save_output_dir):
logger.info(f"Created : {save_output_dir}")
Expand Down

0 comments on commit 51cba20

Please sign in to comment.