hyrax.models.model_utils
========================

.. py:module:: hyrax.models.model_utils

.. autoapi-nested-parse::

   Utility functions for model operations.



Attributes
----------

.. autoapisummary::

   hyrax.models.model_utils.logger


Functions
---------

.. autoapisummary::

   hyrax.models.model_utils.load_model_weights


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

.. py:data:: logger

.. py:function:: load_model_weights(config: dict, model, verb: str)

   Load model weights from the file indicated by the configuration
   or from the most recent training run if no file is specified.

   This function updates the config dict to track which weights file was actually used.

   :param config: Full runtime configuration
   :type config: dict
   :param model: The model class to load weights into
   :type model: nn.Module
   :param verb: The verb name (e.g., "infer", "test") for finding weights file in config
   :type verb: str

   :raises RuntimeError: If the weights file cannot be found or does not load properly


