Skip to content

Commit 9ceecc9

Browse files
Rabah Abdul KhalekRabah Abdul Khalek
authored andcommitted
polishin summary report
1 parent df39ef1 commit 9ceecc9

File tree

1 file changed

+10
-1
lines changed
  • giskard_vision/landmark_detection/tests

1 file changed

+10
-1
lines changed

‎giskard_vision/landmark_detection/tests/report.py‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,14 @@ def to_dataframe(self, summary: Optional[bool] = False):
114114
"Best(prediction_fail_rate)",
115115
]
116116
]
117+
df.sort_values(["criteria", "model"], ignore_index=True)
118+
return df.pivot(
119+
columns="model",
120+
values=["Best(prediction_time)", "Best(prediction_fail_rate)", "Best(metric_value)"],
121+
index="criteria",
122+
)
117123

118-
return df.sort_values(["criteria", "model"], ignore_index=True)
124+
return df.sort_values(["criteria", "model"], ignore_index=True).drop(["group"], axis=1, errors="ignore")
119125

120126
def to_markdown(self, summary: Optional[bool] = False, filename: Optional[str] = None):
121127
"""
@@ -136,6 +142,9 @@ def to_markdown(self, summary: Optional[bool] = False, filename: Optional[str] =
136142

137143
df = self.to_dataframe(summary=summary)
138144

145+
if summary:
146+
df.columns = [" - ".join(col).strip() for col in df.columns.values]
147+
139148
df.to_markdown(filename)
140149

141150
def to_json(self, filename: Optional[str] = None):

0 commit comments

Comments
 (0)