hyrax.config_migrations.migrations.005_remove_preload_config

hyrax.config_migrations.migrations.005_remove_preload_config#

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#

Functions#

remove_preload_config(→ tomlkit.toml_document.TOMLDocument)

Migrate preload config to [data_loader].num_workers.

Module Contents#

_OLD_DEFAULT_PRELOAD_THREADS = 50[source]#
remove_preload_config(cfg: tomlkit.toml_document.TOMLDocument) tomlkit.toml_document.TOMLDocument[source]#

Migrate preload config to [data_loader].num_workers.