class_docstr: Manager for logging and metrics.
  
  An evaluation plugin that obtains relevant data from the
  training and eval loops of the strategy through callbacks.
  The plugin keeps a dictionary with the last recorded value for each metric.
  The dictionary will be returned by the `train` and `eval` methods of the
  strategies.
  It is also possible to keep a dictionary with all recorded metrics by
  specifying `collect_all=True`. The dictionary can be retrieved via
  the `get_all_metrics` method.
  
  This plugin also logs metrics using the provided loggers.
class_docstr_tok: ["Manager","for","logging","and","metrics",".","An","evaluation","plugin","that","obtains","relevant","data","from","the","training","and","eval","loops","of","the","strategy","through","callbacks",".","The","plugin","keeps","a","dictionary","with","the","last","recorded","value","for","each","metric",".","The","dictionary","will","be","returned","by","the","`","train","`","and","`","eval","`","methods","of","the","strategies",".","It","is","also","possible","to","keep","a","dictionary","with","all","recorded","metrics","by","specifying","`","collect_all=True","`",".","The","dictionary","can","be","retrieved","via","the","`","get_all_metrics","`","method",".","This","plugin","also","logs","metrics","using","the","provided","loggers","."]
docstr: Return the dictionary of all collected metrics.
  This method should be called only when `collect_all` is set to True.
  
  :return: if `collect_all` is True, returns a dictionary
      with full metric names as keys and a tuple of two lists
      as value. The first list gathers x values (indices
      representing time steps at which the corresponding
      metric value has been emitted). The second list
      gathers metric values. a dictionary. If `collect_all`
      is False return an empty dictionary
docstr_tok: ["Return","the","dictionary","of","all","collected","metrics",".","This","method","should","be","called","only","when","`","collect_all","`","is","set","to","True",".",":","return",":","if","`","collect_all","`","is","True",",","returns","a","dictionary","with","full","metric","names","as","keys","and","a","tuple","of","two","lists","as","value",".","The","first","list","gathers","x","values","(","indices","representing","time","steps","at","which","the","corresponding","metric","value","has","been","emitted",")",".","The","second","list","gathers","metric","values",".","a","dictionary",".","If","`","collect_all","`","is","False","return","an","empty","dictionary"]
code: def get_all_metrics(self):
      """
      Return the dictionary of all collected metrics.
      This method should be called only when `collect_all` is set to True.
  
      :return: if `collect_all` is True, returns a dictionary
          with full metric names as keys and a tuple of two lists
          as value. The first list gathers x values (indices
          representing time steps at which the corresponding
          metric value has been emitted). The second list
          gathers metric values. a dictionary. If `collect_all`
          is False return an empty dictionary
      """
      if self.collect_all:
          return self.all_metric_results
      else:
          return {}
  
imports: import warnings
  from copy import copy
  from collections import defaultdict
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union, Sequence, TYPE_CHECKING
  from avalanche.distributed.distributed_helper import DistributedHelper
  from avalanche.evaluation.metric_results import MetricValue
  from avalanche.evaluation.metrics import accuracy_metrics, loss_metrics
  from avalanche.logging import InteractiveLogger
label_desc: Use image node_id 7 for calling the EvaluationPlugin obj's underlying member method code with example usage: obj.get_all_metrics() and returns: self, dict