From 83019164e7fa3cb8a540233403af8a515687fc9f Mon Sep 17 00:00:00 2001 From: Sadra Barikbin Date: Wed, 31 Jul 2024 21:14:41 +0330 Subject: [PATCH] Fix another problem in docstring --- ignite/metrics/metric_group.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ignite/metrics/metric_group.py b/ignite/metrics/metric_group.py index c1e87b5771e..58a52f658ae 100644 --- a/ignite/metrics/metric_group.py +++ b/ignite/metrics/metric_group.py @@ -20,6 +20,7 @@ class MetricGroup(Metric): We construct a group of metrics, attach them to the engine at once and retrieve their result. .. code-block:: python + import torch metric_group = MetricGroup({'acc': Accuracy(), 'precision': Precision(), 'loss': Loss(nn.NLLLoss())}) @@ -32,7 +33,7 @@ class MetricGroup(Metric): state.metrics["acc"], state.metrics["precision"], state.metrics["loss"] # And also altogether - state.metrics["eval_metrics] + state.metrics["eval_metrics"] """ _state_dict_all_req_keys = ("metrics",)