class_docstr: An extension of the Average Mean Class Accuracy (AMCA) metric
  (class:`AverageMeanClassAccuracy`) able to separate the computation of the
  AMCA based on the current stream.
class_docstr_tok: ["An","extension","of","the","Average","Mean","Class","Accuracy","(","AMCA",")","metric","(","class",":","`","AverageMeanClassAccuracy","`",")","able","to","separate","the","computation","of","the","AMCA","based","on","the","current","stream","."]
docstr: Update the running accuracy given the true and predicted labels for each
  class.
  
  This will update the accuracies for the "current stream" (the one set
  through `next_experience`). If `next_experience` has not been called,
  then an error will be raised.
  
  :param predicted_y: The model prediction. Both labels and logit vectors
      are supported.
  :param true_y: The ground truth. Both labels and one-hot vectors
      are supported.
  :param task_labels: the int task label associated to the current
      experience or the task labels vector showing the task label
      for each pattern.
  :return: None.
docstr_tok: ["Update","the","running","accuracy","given","the","true","and","predicted","labels","for","each","class",".","This","will","update","the","accuracies","for","the","``","current","stream","''","(","the","one","set","through","`","next_experience","`",")",".","If","`","next_experience","`","has","not","been","called",",","then","an","error","will","be","raised",".",":","param","predicted_y",":","The","model","prediction",".","Both","labels","and","logit","vectors","are","supported",".",":","param","true_y",":","The","ground","truth",".","Both","labels","and","one-hot","vectors","are","supported",".",":","param","task_labels",":","the","int","task","label","associated","to","the","current","experience","or","the","task","labels","vector","showing","the","task","label","for","each","pattern",".",":","return",":","None","."]
code: def update(
      self,
      predicted_y: Tensor,
      true_y: Tensor,
      task_labels: Union[int, Tensor],
  ) -> None:
      """
      Update the running accuracy given the true and predicted labels for each
      class.
  
      This will update the accuracies for the "current stream" (the one set
      through `next_experience`). If `next_experience` has not been called,
      then an error will be raised.
  
      :param predicted_y: The model prediction. Both labels and logit vectors
          are supported.
      :param true_y: The ground truth. Both labels and one-hot vectors
          are supported.
      :param task_labels: the int task label associated to the current
          experience or the task labels vector showing the task label
          for each pattern.
      :return: None.
      """
      if self._current_stream is None:
          raise RuntimeError(
              "No current stream set. "
              'Call "set_stream" to set the current stream.'
          )
  
      if self._is_stream_tracked(self._current_stream):
          self._amcas[self._current_stream].update(
              predicted_y, true_y, task_labels
          )
  
imports: from typing import Callable, Dict, Iterable, List, Union, TYPE_CHECKING, Optional, Sequence, Set
  from collections import defaultdict, OrderedDict
  import torch
  from torch import Tensor
  from avalanche.evaluation import Metric, PluginMetric, _ExtendedGenericPluginMetric, _ExtendedPluginMetricValue
  from avalanche.evaluation.metric_utils import generic_get_metric_name
  from avalanche.evaluation.metrics.class_accuracy import ClassAccuracy, TrackedClassesType
label_desc: Use image node_id 2 for calling the MultiStreamAMCA obj's underlying member method code with example usage: obj.update(predicted_y, true_y, task_labels) without return types