class_docstr: Base class for continual learning skeletons.
  
  **Training loop**
  The training loop is organized as follows::
  
      train
          train_exp  # for each experience
  
  **Evaluation loop**
  The evaluation loop is organized as follows::
  
      eval
          eval_exp  # for each experience
class_docstr_tok: ["Base","class","for","continual","learning","skeletons",".","*","*","Training","loop","*","*","The","training","loop","is","organized","as","follows",":",":","train","train_exp","#","for","each","experience","*","*","Evaluation","loop","*","*","The","evaluation","loop","is","organized","as","follows",":",":","eval","eval_exp","#","for","each","experience"]
docstr: Evaluate the current model on a series of experiences and
  returns the last recorded value for each metric.
  
  :param exp_list: CL experience information.
  :param kwargs: custom arguments.
  
  :return: dictionary containing last recorded value for
      each metric name
docstr_tok: ["Evaluate","the","current","model","on","a","series","of","experiences","and","returns","the","last","recorded","value","for","each","metric",".",":","param","exp_list",":","CL","experience","information",".",":","param","kwargs",":","custom","arguments",".",":","return",":","dictionary","containing","last","recorded","value","for","each","metric","name"]
code: def eval(
      self,
      experiences: Union[TExperienceType, CLStream[TExperienceType]],
      **kwargs,
  ):
      """
      Evaluate the current model on a series of experiences and
      returns the last recorded value for each metric.
  
      :param exp_list: CL experience information.
      :param kwargs: custom arguments.
  
      :return: dictionary containing last recorded value for
          each metric name
      """
      if not self._distributed_check:
          # Checks if the strategy elements are compatible with
          # distributed training
          self._check_distributed_training_compatibility()
          self._distributed_check = True
  
      # eval can be called inside the train method.
      # Save the shared state here to restore before returning.
      prev_train_state = self._save_train_state()
      self.is_training = False
      self.model.eval()
  
      experiences_list: Iterable[
          TExperienceType
      ] = _experiences_parameter_as_iterable(experiences)
      self.current_eval_stream = experiences_list
  
      self._before_eval(**kwargs)
      for self.experience in experiences_list:
          self._before_eval_exp(**kwargs)
          self._eval_exp(**kwargs)
          self._after_eval_exp(**kwargs)
  
      self._after_eval(**kwargs)
      self._eval_cleanup()
  
      # restore previous shared state.
      self._load_train_state(prev_train_state)
  
imports: import sys
  import warnings
  from collections import defaultdict
  from typing import Iterable, Sequence, Optional, TypeVar, Union, List
  import torch
  from torch.nn import Module
  from avalanche.benchmarks import CLExperience, CLStream
  from avalanche.core import BasePlugin
  from avalanche.distributed.distributed_helper import DistributedHelper
  from avalanche.training.templates.strategy_mixin_protocol import BaseStrategyProtocol
  from avalanche.training.utils import trigger_plugins
label_desc: Use image node_id 6 for calling the BaseTemplate obj's underlying member method code with example usage: obj.eval(experiences) without return types