hyrax.verbs.train
=================

.. py:module:: hyrax.verbs.train


Attributes
----------

.. autoapisummary::

   hyrax.verbs.train.logger


Classes
-------

.. autoapisummary::

   hyrax.verbs.train.Train


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

.. py:data:: logger

.. py:class:: Train(config)

   Bases: :py:obj:`hyrax.verbs.verb_registry.Verb`


   Train verb

   .. py:method:: __init__

   Overall initialization for all verbs that saves the config


   .. py:attribute:: cli_name
      :value: 'train'



   .. py:attribute:: add_parser_kwargs


   .. py:attribute:: description
      :value: 'Train a model using provided data.'



   .. py:attribute:: REQUIRED_DATA_GROUPS
      :value: ('train',)



   .. py:attribute:: OPTIONAL_DATA_GROUPS
      :value: ('validate', 'test')



   .. py:method:: setup_parser(parser)
      :staticmethod:


      We don't need any parser setup for CLI opts



   .. py:method:: run_cli(args=None)

      CLI stub for Train verb



   .. py:method:: run()

      Run the training process for the configured model and data loader.
      Returns the trained model.




   .. py:method:: _log_params(config, results_dir)
      :staticmethod:


      Log the various parameters to mlflow from the config file.

      :param config: The main configuration dictionary
      :type config: dict
      :param results_dir: The full path to the results sub-directory
      :type results_dir: str



