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: Resets the metric.
  task label is ignored if `self.split_by_task=False`.
  
  :param task_label: if None, reset the entire dictionary.
      Otherwise, reset the value associated to `task_label`.
  
  :return: None.
docstr_tok: ["Resets","the","metric",".","task","label","is","ignored","if","`","self.split_by_task=False","`",".",":","param","task_label",":","if","None",",","reset","the","entire","dictionary",".","Otherwise",",","reset","the","value","associated","to","`","task_label","`",".",":","return",":","None","."]
code: def reset(self, task_label=None) -> None:
      """
      Resets the metric.
      task label is ignored if `self.split_by_task=False`.
  
      :param task_label: if None, reset the entire dictionary.
          Otherwise, reset the value associated to `task_label`.
  
      :return: None.
      """
      assert task_label is None or isinstance(task_label, int)
      if task_label is None:
          self._mean_accuracy = defaultdict(Accuracy)
      else:
          self._mean_accuracy[task_label].reset()
  
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 4 for calling the TaskAwareAccuracy obj's underlying member method code with example usage: obj.reset(task_label) without return types