hyrax.config_migrations.migrations.005_remove_preload_config
============================================================

.. py:module:: hyrax.config_migrations.migrations.005_remove_preload_config

.. autoapi-nested-parse::

   Config migration: version 5 → version 6.

   Migrates the deprecated ``preload_cache`` and ``preload_threads`` keys from
   ``[data_set]`` into ``[data_loader].num_workers``.  Cache preloading has been
   replaced by PyTorch DataLoader's built-in ``num_workers`` / ``prefetch_factor``.

   If the user explicitly set ``preload_threads`` to a value other than the old
   default of 50, that value is carried forward as ``num_workers``.  Otherwise both
   keys are simply removed.



Attributes
----------

.. autoapisummary::

   hyrax.config_migrations.migrations.005_remove_preload_config._OLD_DEFAULT_PRELOAD_THREADS


Functions
---------

.. autoapisummary::

   hyrax.config_migrations.migrations.005_remove_preload_config.remove_preload_config


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

.. py:data:: _OLD_DEFAULT_PRELOAD_THREADS
   :value: 50


.. py:function:: remove_preload_config(cfg: tomlkit.toml_document.TOMLDocument) -> tomlkit.toml_document.TOMLDocument

   Migrate preload config to ``[data_loader].num_workers``.


