Skip to content

Commit 4d83fc0

Browse files
authored
[DLMED] enhance metrics in workflow (#3341)
Signed-off-by: Nic Ma <[email protected]>
1 parent 8a454bd commit 4d83fc0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

monai/engines/workflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ def _register_metrics(self, k_metric: Dict, add_metrics: Optional[Dict] = None):
216216
if not isinstance(k_metric, dict):
217217
raise TypeError(f"key_metric must be None or a dict but is {type(k_metric).__name__}.")
218218
self.state.key_metric_name = list(k_metric.keys())[0]
219-
metrics = k_metric
219+
metrics = dict(k_metric)
220220
if add_metrics is not None and len(add_metrics) > 0:
221221
if not isinstance(add_metrics, dict):
222222
raise TypeError(f"additional metrics must be None or a dict but is {type(add_metrics).__name__}.")

0 commit comments

Comments
 (0)