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: Check that the list of plugins is compatible with the template.
  
  This means checking that each plugin impements a subset of the
  supported callbacks.
docstr_tok: ["Check","that","the","list","of","plugins","is","compatible","with","the","template",".","This","means","checking","that","each","plugin","impements","a","subset","of","the","supported","callbacks","."]
code: def _check_plugin_compatibility(self):
      """Check that the list of plugins is compatible with the template.
  
      This means checking that each plugin impements a subset of the
      supported callbacks.
      """
      # TODO: ideally we would like to check the argument's type to check
      #  that it's a supertype of the template.
      # I don't know if it's possible to do it in Python.
      ps = self.plugins
  
      def get_plugins_from_object(obj):
          def is_callback(x):
              return x.startswith("before") or x.startswith("after")
  
          return filter(is_callback, dir(obj))
  
      cb_supported = set(get_plugins_from_object(self.PLUGIN_CLASS))
      for p in ps:
          cb_p = set(get_plugins_from_object(p))
  
          if not cb_p.issubset(cb_supported):
              warnings.warn(
                  f"Plugin {p} implements incompatible callbacks for template"
                  f" {self}. This may result in errors. Incompatible "
                  f"callbacks: {cb_p - cb_supported}",
              )
              return
  
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 11 for calling the BaseTemplate obj's underlying member method code with example usage: obj._check_plugin_compatibility() and returns: filter, unknown