diff --git a/lrc_file/LrcFile.py b/lrc_file/LrcFile.py index 8da0ef5..457f587 100644 --- a/lrc_file/LrcFile.py +++ b/lrc_file/LrcFile.py @@ -308,14 +308,14 @@ def _evaluation_data(self, result_type: type): evaluation_data = {} for result in self.evaluation_results: - for comparison in result.data["comparisons"]: - if not isinstance(comparison["current_result"], result_type): + for comparison in result.comparisons: + if not isinstance(comparison.current_result, result_type): continue - evaluated_metric = comparison["metric_name"] + evaluated_metric = comparison.metric_name evaluated_metric_name = re.sub("^[0-9]+_", "", evaluated_metric) evaluation_data[evaluated_metric] = getattr( - comparison["current_result"], evaluated_metric_name + comparison.current_result, evaluated_metric_name ).average return evaluation_data