Skip to content

Commit 31a1480

Browse files
authored
Fix report single metric (#585)
1 parent dff88de commit 31a1480

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

cyclops/report/report.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,9 +1096,15 @@ def export(
10961096
else:
10971097
today_now = dt_datetime.now().strftime("%Y-%m-%d %H:%M:%S")
10981098

1099-
current_report_metrics: List[List[PerformanceMetric]] = []
1099+
current_report_metrics: Union[
1100+
List[List[PerformanceMetric]], List[PerformanceMetric]
1101+
] = []
11001102
sweep_metrics(self._model_card, current_report_metrics)
1101-
current_report_metrics_set = current_report_metrics[0]
1103+
current_report_metrics_set = (
1104+
current_report_metrics[0]
1105+
if isinstance(current_report_metrics[0], list)
1106+
else [current_report_metrics[0]]
1107+
)
11021108

11031109
report_paths = glob.glob(
11041110
os.path.join(

0 commit comments

Comments
 (0)