class avalanche.core.BasePlugin[source]

ABC for BaseTemplate plugins.

A plugin is simply an object implementing some strategy callbacks. Plugins are called automatically during the strategy execution.

Callbacks provide access before/after each phase of the execution. In general, for each method of the training and evaluation loops, StrategyCallbacks provide two functions before_{method} and after_{method}, called before and after the method, respectively. Therefore plugins can “inject” additional code by implementing callbacks. Each callback has a strategy argument that gives access to the state.

In Avalanche, callbacks are used to implement continual strategies, metrics and loggers.




after_eval(strategy, *args, **kwargs)

Called after eval by the BaseTemplate.

after_eval_exp(strategy, *args, **kwargs)

Called after eval_exp by the BaseTemplate.

after_training(strategy, *args, **kwargs)

Called after train by the BaseTemplate.

after_training_exp(strategy, *args, **kwargs)

Called after train_exp by the BaseTemplate.

before_eval(strategy, *args, **kwargs)

Called before eval by the BaseTemplate.

before_eval_exp(strategy, *args, **kwargs)

Called before eval_exp by the BaseTemplate.

before_training(strategy, *args, **kwargs)

Called before train by the BaseTemplate.

before_training_exp(strategy, *args, **kwargs)

Called before train_exp by the BaseTemplate.