class_docstr: Interface for trainers.
  :param algorithm_config: Algorithm configuration including all parameter expected in .train().
  :param model: Model to train.
class_docstr_tok: ["Interface","for","trainers",".",":","param","algorithm_config",":","Algorithm","configuration","including","all","parameter","expected","in",".train","(",")",".",":","param","model",":","Model","to","train","."]
docstr: Train for n epochs. kwargs describe additional configuration necessary at training time, as for e.g. ESTrainer
  or BCTrainer.
  Some necessary parameters are set at initialization time and can be read from the trainer's algorithm config.
  Hence all parameters available at initialization time are optional to set at train time.
  :param n_epochs: Number of epochs to train.
  :param kwargs: Additional, trainer-specific parameters.
docstr_tok: ["Train","for","n","epochs",".","kwargs","describe","additional","configuration","necessary","at","training","time",",","as","for","e.g",".","ESTrainer","or","BCTrainer",".","Some","necessary","parameters","are","set","at","initialization","time","and","can","be","read","from","the","trainer","'s","algorithm","config",".","Hence","all","parameters","available","at","initialization","time","are","optional","to","set","at","train","time",".",":","param","n_epochs",":","Number","of","epochs","to","train",".",":","param","kwargs",":","Additional",",","trainer-specific","parameters","."]
code: def train(self, n_epochs: Optional[int] = None, **kwargs) -> None:
      """
      Train for n epochs. kwargs describe additional configuration necessary at training time, as for e.g. ESTrainer
      or BCTrainer.
      Some necessary parameters are set at initialization time and can be read from the trainer's algorithm config.
      Hence all parameters available at initialization time are optional to set at train time.
      :param n_epochs: Number of epochs to train.
      :param kwargs: Additional, trainer-specific parameters.
      """
  
file_path: maze/maze/train/trainers/common/trainer.py
imports: from abc import ABC, abstractmethod
  from typing import Union, Optional, TypeVar, Dict
  from maze.core.agent.torch_model import TorchModel
  from maze.train.trainers.common.config_classes import AlgorithmConfig
  from typing.io import BinaryIO
label_desc: Use image node_id 4 for calling the Trainer obj's underlying member method code with example usage: obj.train(n_epochs) without return types