:py:mod:`src.callback`
======================

.. py:module:: src.callback


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

Classes
~~~~~~~

.. autoapisummary::

   src.callback.LogJobReturnCallback
   src.callback.Experiment
   src.callback.RunExperiment
   src.callback.MultirunExperiment
   src.callback.ResultCollector




.. py:class:: LogJobReturnCallback


   Bases: :py:obj:`hydra.experimental.callback.Callback`

   .. py:method:: on_job_end(config: omegaconf.DictConfig, job_return: hydra.core.utils.JobReturn, **kwargs: Any) -> None

      Check the status of job in hydra.

      :param config: DictConfig
      :type config: DictConfig
      :param job_return: JobReturn
      :type job_return: JobReturn



.. py:class:: Experiment(path: pathlib.Path)


   Bases: :py:obj:`abc.ABC`

   Helper class that provides a standard way to create an ABC using
   inheritance.

   .. py:property:: timestamp
      :type: datetime.datetime
      :abstractmethod:


   .. py:method:: parse_timestamp(date: str, time: str) -> datetime.datetime
      :staticmethod:


   .. py:method:: get_score() -> float | None


   .. py:method:: get_config() -> dict[str, Any]


   .. py:method:: get_n_targets() -> int | None


   .. py:method:: process() -> dict



.. py:class:: RunExperiment(path: pathlib.Path)


   Bases: :py:obj:`Experiment`

   Helper class that provides a standard way to create an ABC using
   inheritance.

   .. py:property:: timestamp
      :type: datetime.datetime

      Retrive the time stamp from the name of directories.

      :return: date and time in string
      :rtype: datetime.datetime



.. py:class:: MultirunExperiment(path: pathlib.Path)


   Bases: :py:obj:`Experiment`

   Helper class that provides a standard way to create an ABC using
   inheritance.

   .. py:property:: timestamp
      :type: datetime.datetime

      Retrive the time stamp from the name of directories.

      :return: date and time in string
      :rtype: datetime.datetime



.. py:class:: ResultCollector


   Bases: :py:obj:`hydra.experimental.callback.Callback`

   .. py:attribute:: OUTPUTS_PATH

      

   .. py:attribute:: MULTIRUN_PATH

      

   .. py:method:: write_results() -> None

      Write results into csv and json files in the results directory.
              


   .. py:method:: on_run_end(config: omegaconf.DictConfig, **kwargs: Any) -> None

      Load results from outputs directory and write them to the results directory.

      :param config: DictConfig
      :type config: DictConfig


   .. py:method:: on_multirun_end(config: omegaconf.DictConfig, **kwargs: Any) -> None

      Load results from multirun directory and write them to the results directory.

      :param config: DictConfig
      :type config: DictConfig



