class_docstr: GSSPlugin replay plugin.
  
  Code adapted from the repository:
  https://github.com/RaptorMai/online-continual-learning
  Handles an external memory fulled with samples selected
  using the Greedy approach of GSS algorithm.
  `before_forward` callback is used to process the current
  sample and estimate a score.
docstr: Dataloader to build batches containing examples from both memories and
  the training dataset
docstr_tok: ["Dataloader","to","build","batches","containing","examples","from","both","memories","and","the","training","dataset"]
code: def before_training_exp(
      self, strategy, num_workers=0, shuffle=True, **kwargs
  ):
      """
      Dataloader to build batches containing examples from both memories and
      the training dataset
      """
      if self.ext_mem_list_current_index == 0:
          return
  
      temp_x_tensors = []
      for elem in self.ext_mem_list_x:
          temp_x_tensors.append(elem.to("cpu"))
      temp_y_tensors = self.ext_mem_list_y.to("cpu")
  
      memory = list(zip(temp_x_tensors, temp_y_tensors))
      memory_dataset = _make_taskaware_classification_dataset(
          memory, targets=temp_y_tensors.tolist()
      )
  
      strategy.dataloader = ReplayDataLoader(
          strategy.adapted_dataset,
          memory_dataset,
          oversample_small_tasks=True,
          num_workers=num_workers,
          batch_size=strategy.train_mb_size,
          shuffle=shuffle,
      )
  
file_path: avalanche/avalanche/training/plugins/gss_greedy.py
imports: from typing import TYPE_CHECKING
  import torch
  from avalanche.benchmarks.utils import _make_taskaware_classification_dataset
  from avalanche.benchmarks.utils.data_loader import ReplayDataLoader
  from avalanche.training.plugins.strategy_plugin import SupervisedPlugin
label_desc: Use image node_id 8 for calling the GSS_greedyPlugin obj's underlying member method code with example usage: obj.before_training_exp(strategy, num_workers, shuffle) without return types