:py:mod:`rofunc.learning.RofuncRL.trainers.base_trainer`
========================================================

.. py:module:: rofunc.learning.RofuncRL.trainers.base_trainer

.. autodoc2-docstring:: rofunc.learning.RofuncRL.trainers.base_trainer
   :allowtitles:

Module Contents
---------------

Classes
~~~~~~~

.. list-table::
   :class: autosummary longtable
   :align: left

   * - :py:obj:`BaseTrainer <rofunc.learning.RofuncRL.trainers.base_trainer.BaseTrainer>`
     - .. autodoc2-docstring:: rofunc.learning.RofuncRL.trainers.base_trainer.BaseTrainer
          :summary:

API
~~~

.. py:class:: BaseTrainer(cfg: omegaconf.DictConfig, env: typing.Union[gym.Env, gymnasium.Env], device: typing.Optional[typing.Union[str, torch.device]] = None, env_name: typing.Optional[str] = None, inference: bool = False)
   :canonical: rofunc.learning.RofuncRL.trainers.base_trainer.BaseTrainer

   .. autodoc2-docstring:: rofunc.learning.RofuncRL.trainers.base_trainer.BaseTrainer

   .. rubric:: Initialization

   .. autodoc2-docstring:: rofunc.learning.RofuncRL.trainers.base_trainer.BaseTrainer.__init__

   .. py:attribute:: inference_flag
      :canonical: rofunc.learning.RofuncRL.trainers.base_trainer.BaseTrainer.inference_flag
      :value: None

      .. autodoc2-docstring:: rofunc.learning.RofuncRL.trainers.base_trainer.BaseTrainer.inference_flag

   .. py:attribute:: start_time
      :canonical: rofunc.learning.RofuncRL.trainers.base_trainer.BaseTrainer.start_time
      :value: None

      .. autodoc2-docstring:: rofunc.learning.RofuncRL.trainers.base_trainer.BaseTrainer.start_time

   .. py:attribute:: eval_rew_mean
      :canonical: rofunc.learning.RofuncRL.trainers.base_trainer.BaseTrainer.eval_rew_mean
      :value: 0

      .. autodoc2-docstring:: rofunc.learning.RofuncRL.trainers.base_trainer.BaseTrainer.eval_rew_mean

   .. py:method:: setup_wandb()
      :canonical: rofunc.learning.RofuncRL.trainers.base_trainer.BaseTrainer.setup_wandb

      .. autodoc2-docstring:: rofunc.learning.RofuncRL.trainers.base_trainer.BaseTrainer.setup_wandb

   .. py:method:: get_action(states)
      :canonical: rofunc.learning.RofuncRL.trainers.base_trainer.BaseTrainer.get_action

      .. autodoc2-docstring:: rofunc.learning.RofuncRL.trainers.base_trainer.BaseTrainer.get_action

   .. py:method:: train()
      :canonical: rofunc.learning.RofuncRL.trainers.base_trainer.BaseTrainer.train

      .. autodoc2-docstring:: rofunc.learning.RofuncRL.trainers.base_trainer.BaseTrainer.train

   .. py:method:: pre_interaction()
      :canonical: rofunc.learning.RofuncRL.trainers.base_trainer.BaseTrainer.pre_interaction

      .. autodoc2-docstring:: rofunc.learning.RofuncRL.trainers.base_trainer.BaseTrainer.pre_interaction

   .. py:method:: post_interaction()
      :canonical: rofunc.learning.RofuncRL.trainers.base_trainer.BaseTrainer.post_interaction

      .. autodoc2-docstring:: rofunc.learning.RofuncRL.trainers.base_trainer.BaseTrainer.post_interaction

   .. py:method:: write_tensorboard()
      :canonical: rofunc.learning.RofuncRL.trainers.base_trainer.BaseTrainer.write_tensorboard

      .. autodoc2-docstring:: rofunc.learning.RofuncRL.trainers.base_trainer.BaseTrainer.write_tensorboard

   .. py:method:: eval()
      :canonical: rofunc.learning.RofuncRL.trainers.base_trainer.BaseTrainer.eval

      .. autodoc2-docstring:: rofunc.learning.RofuncRL.trainers.base_trainer.BaseTrainer.eval

   .. py:method:: inference()
      :canonical: rofunc.learning.RofuncRL.trainers.base_trainer.BaseTrainer.inference

      .. autodoc2-docstring:: rofunc.learning.RofuncRL.trainers.base_trainer.BaseTrainer.inference
