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: Note: This is not implemented as dataclass due to type hinting for class members not working properly in derived
  classes with dataclasses. I.e. PyCharm's type hinting always assumes model is of type TorchModel, but not the
  specific subtype (e.g. TorchActorCritic).
docstr_tok: ["Note",":","This","is","not","implemented","as","dataclass","due","to","type","hinting","for","class","members","not","working","properly","in","derived","classes","with","dataclasses",".","I.e",".","PyCharm","'s","type","hinting","always","assumes","model","is","of","type","TorchModel",",","but","not","the","specific","subtype","(","e.g",".","TorchActorCritic",")","."]
code: def __init__(
      self,
      algorithm_config: AlgorithmConfigType,
      model: Optional[TorchModel] = None,
  ):
      """
      Note: This is not implemented as dataclass due to type hinting for class members not working properly in derived
      classes with dataclasses. I.e. PyCharm's type hinting always assumes model is of type TorchModel, but not the
      specific subtype (e.g. TorchActorCritic).
      """
  
      self.model = model
      self.algorithm_config = algorithm_config
  
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 1 to create a new Trainer object from inherited base classes: ABC with example: obj = Trainer(algorithm_config, model)