Skip to content

Commit

Permalink
fix: use column names for database mappers
Browse files Browse the repository at this point in the history
When writing results where the metrics include 'confusion_matrix', only
the first column name is written. In the case of the confusion_matrix it
is "true_positive". The desired behaviour is to write all column values.
  • Loading branch information
Shezad Khan committed Nov 10, 2023
1 parent fcc72e7 commit 3cd23fd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nannyml/io/db/mappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,9 @@ def _parse(

res: List[DbMetric] = []

for metric in [metric.column_name for metric in result.metrics]:
column_names = [column_name for metric in result.metrics for column_name in metric.column_names]

for metric in column_names:
res += (
result.filter(partition='analysis')
.to_df()[
Expand Down

0 comments on commit 3cd23fd

Please sign in to comment.