class_docstr: The task-aware Accuracy metric.
  
  The metric computes a dictionary of <task_label, accuracy value> pairs.
  update/result/reset methods are all task-aware.
  
  See :class:`avalanche.evaluation.Accuracy` for the documentation about
  the `Accuracy` metric.
class_docstr_tok: ["The","task-aware","Accuracy","metric",".","The","metric","computes","a","dictionary","of","<","task_label",",","accuracy","value",">","pairs",".","update\/result\/reset","methods","are","all","task-aware",".","See",":","class",":","`","avalanche.evaluation.Accuracy","`","for","the","documentation","about","the","`","Accuracy","`","metric","."]
docstr: Retrieves the running accuracy.
  
  Calling this method will not change the internal state of the metric.
  
  task label is ignored if `self.split_by_task=False`.
  
  :param task_label: if None, return the entire dictionary of accuracies
      for each task. Otherwise return the dictionary
      `{task_label: accuracy}`.
  :return: A dict of running accuracies for each task label,
      where each value is a float value between 0 and 1.
docstr_tok: ["Retrieves","the","running","accuracy",".","Calling","this","method","will","not","change","the","internal","state","of","the","metric",".","task","label","is","ignored","if","`","self.split_by_task=False","`",".",":","param","task_label",":","if","None",",","return","the","entire","dictionary","of","accuracies","for","each","task",".","Otherwise","return","the","dictionary","`","{","task_label",":","accuracy","}","`",".",":","return",":","A","dict","of","running","accuracies","for","each","task","label",",","where","each","value","is","a","float","value","between","0","and","1","."]
code: def result(
      self, task_label: Optional[int] = None
  ) -> Dict[int, float]:
      """
      Retrieves the running accuracy.
  
      Calling this method will not change the internal state of the metric.
  
      task label is ignored if `self.split_by_task=False`.
  
      :param task_label: if None, return the entire dictionary of accuracies
          for each task. Otherwise return the dictionary
          `{task_label: accuracy}`.
      :return: A dict of running accuracies for each task label,
          where each value is a float value between 0 and 1.
      """
      assert task_label is None or isinstance(task_label, int)
  
      if task_label is None:
          return {k: v.result() for k, v in self._mean_accuracy.items()}
      else:
          return {task_label: self._mean_accuracy[task_label].result()}
  
imports: from typing import List, Optional, Union, Dict
  import torch
  from torch import Tensor
  from avalanche.evaluation import Metric, GenericPluginMetric
  from avalanche.evaluation.metrics.mean import Mean
  from collections import defaultdict
label_desc: Use image node_id 3 for calling the TaskAwareAccuracy obj's underlying member method code with example usage: obj.result(task_label) and returns: unknown, dict