Skip to content

Commit 113d2af

Browse files
committed
Fix raw_stats handling in _create_summary method to support both dict and RawStats types
1 parent 2de2ed3 commit 113d2af

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

dfanalyzer/output.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ def handle_result(self, result: AnalyzerResultType):
6565

6666
def _create_summary(self, result: AnalyzerResultType, view_key: ViewKey) -> OutputSummary:
6767
flat_view = result.flat_views[view_key]
68-
raw_stats = RawStats(**dask.compute(result.raw_stats)[0])
68+
raw_stats = dask.compute(result.raw_stats)[0]
69+
if isinstance(raw_stats, dict):
70+
raw_stats = RawStats(**raw_stats)
6971
summary = OutputSummary(
7072
job_time=float(raw_stats.job_time),
7173
layer_metrics={},

0 commit comments

Comments
 (0)