hyrax.verbs.test
================

.. py:module:: hyrax.verbs.test


Attributes
----------

.. autoapisummary::

   hyrax.verbs.test.logger


Classes
-------

.. autoapisummary::

   hyrax.verbs.test.Test


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

.. py:data:: logger

.. py:class:: Test(config)

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


   Test verb - evaluates a trained model on test data

   .. py:method:: __init__

   Overall initialization for all verbs that saves the config


   .. py:attribute:: cli_name
      :value: 'test'



   .. py:attribute:: add_parser_kwargs


   .. py:attribute:: description
      :value: 'Evaluate a trained model on test data.'



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



   .. py:attribute:: OPTIONAL_DATA_GROUPS
      :value: ()



   .. 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 Test verb



   .. py:method:: run()

      Run the test process for the configured model on test data.
      This evaluates a trained model, saves outputs, and returns metrics.

      Note: The configuration dictionary will be updated with the full path to the
      model weights file that is loaded into the model (config["test"]["model_weights_file"]).

      :returns: Dataset containing test results that can be used for further analysis
      :rtype: InferenceDataset



   .. 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



