class_docstr: The Stream Confusion Matrix metric.
  This plugin metric only works on the eval phase.
  
  Confusion Matrix computation can be slow if you compute it for a large
  number of classes. We recommend to set `save_image=False` if the runtime
  is too large.
  
  At the end of the eval phase, this metric logs the confusion matrix
  relative to all the patterns seen during eval.
  
  The metric can log either a Tensor or a PIL Image representing the
  confusion matrix.
class_docstr_tok: ["The","Stream","Confusion","Matrix","metric",".","This","plugin","metric","only","works","on","the","eval","phase",".","Confusion","Matrix","computation","can","be","slow","if","you","compute","it","for","a","large","number","of","classes",".","We","recommend","to","set","`","save_image=False","`","if","the","runtime","is","too","large",".","At","the","end","of","the","eval","phase",",","this","metric","logs","the","confusion","matrix","relative","to","all","the","patterns","seen","during","eval",".","The","metric","can","log","either","a","Tensor","or","a","PIL","Image","representing","the","confusion","matrix","."]
code: def after_eval_iteration(
      self, strategy: "SupervisedTemplate"
  ) -> None:
      super().after_eval_iteration(strategy)
      self.update(strategy.mb_y, strategy.mb_output)
  
imports: from matplotlib.figure import Figure
  from numpy import arange
  from typing_extensions import Literal
  from typing import Any, Callable, Iterable, Union, Optional, TYPE_CHECKING, List
  import wandb
  import numpy
  import torch
  from PIL.Image import Image
  from torch import Tensor
  from torch.nn.functional import pad
  from avalanche.benchmarks import NCScenario
  from avalanche.evaluation import PluginMetric, Metric
  from avalanche.evaluation.metric_results import AlternativeValues, MetricValue, MetricResult
  from avalanche.evaluation.metric_utils import default_cm_image_creator, phase_and_task, stream_type
label_desc: Use image node_id 6 for calling the StreamConfusionMatrix obj's underlying member method code with example usage: obj.after_eval_iteration(strategy) without return types