class_docstr: The old BaseStrategy (avalanche 0.1.0)
  just a bit of refactoring to remove useless components for testing.
class_docstr_tok: ["The","old","BaseStrategy","(","avalanche","0.1.0",")","just","a","bit","of","refactoring","to","remove","useless","components","for","testing","."]
code: def __init__(
      self,
      model: Module,
      optimizer,
      criterion=CrossEntropyLoss(),
      train_mb_size: int = 1,
      train_epochs: int = 1,
      eval_mb_size: int = 1,
      device="cpu",
      plugins=None,
      evaluator=None,
      eval_every=-1,
      peval_mode="epoch",
  ):
      self._criterion = criterion
      self.model: Module = model
      self.optimizer = optimizer
      self.train_epochs: int = train_epochs
      self.train_mb_size: int = train_mb_size
      self.eval_mb_size: int = (
          train_mb_size if eval_mb_size is None else eval_mb_size
      )
      self.device = device
      self.plugins = [] if plugins is None else plugins
  
      if evaluator is None:
          evaluator = EvaluationPlugin()
      self.plugins.append(evaluator)
      self.evaluator = evaluator
      """ EvaluationPlugin used for logging and metric computations. """
  
      # Configure periodic evaluation.
      assert peval_mode in {"epoch", "iteration"}
      self.eval_every = eval_every
      peval = PeriodicEval(eval_every, peval_mode)
      self.plugins.append(peval)
  
      self.clock = Clock()
      """ Incremental counters for strategy events. """
      # WARNING: Clock needs to be the last plugin, otherwise
      # counters will be wrong for plugins called after it.
      self.plugins.append(self.clock)
  
      ###################################################################
      # State variables. These are updated during the train/eval loops. #
      ###################################################################
      self.experience = None
      self.adapted_dataset = None
      self.dataloader = None
      self.mbatch = None
      self.mb_output = None
      self.loss = None
      self.is_training: bool = False
      self.current_eval_stream = []
      self._stop_training = False
  
imports: import copy
  import logging
  import unittest
  import numpy
  import torch
  from torch.utils.data import DataLoader
  from typing import Optional, Sequence, Union
  from torch.nn import Module, CrossEntropyLoss
  from torch.optim import SGD
  from avalanche.benchmarks.scenarios import ClassificationExperience
  from avalanche.benchmarks.utils.data_loader import TaskBalancedDataLoader
  from avalanche.models import DynamicModule, SimpleMLP, MTSimpleMLP
  from avalanche.models.dynamic_optimizers import reset_optimizer
  from avalanche.models.utils import avalanche_forward
  from avalanche.training import Cumulative
  from avalanche.training.plugins.clock import Clock
  from avalanche.training.plugins import EvaluationPlugin
  from avalanche.training.templates import SupervisedTemplate
  from avalanche.training.utils import trigger_plugins
  from tests.unit_tests_utils import get_fast_benchmark
label_desc: Use image node_id 1 to create a new OldBaseStrategy object  with example: obj = OldBaseStrategy(model, optimizer, criterion, train_mb_size, train_epochs, eval_mb_size, device, plugins, evaluator, eval_every, peval_mode)