quaterion.train.cache package¶
Submodules¶
Module contents¶
- class CacheConfig(cache_type: ~typing.Optional[~quaterion.train.cache.cache_config.CacheType] = CacheType.AUTO, mapping: ~typing.Dict[str, ~quaterion.train.cache.cache_config.CacheType] = <factory>, key_extractors: ~typing.Union[KeyExtractorType, ~typing.Dict[str, KeyExtractorType]] = <factory>, batch_size: ~typing.Optional[int] = 32, num_workers: ~typing.Optional[int] = None, save_dir: ~typing.Optional[str] = None)[source]¶
Bases:
object
Determine cache settings.
This class should be passed to
configure_caches()
- batch_size: Optional[int] = 32¶
Batch size to be used in CacheDataLoader during caching process. It does not affect others training stages.
- key_extractors: Union[KeyExtractorType, Dict[str, KeyExtractorType]]¶
Mapping of encoders to key extractor functions required to cache non-hashable objects.
- num_workers: Optional[int] = None¶
Num of workers to be used in CacheDataLoader during caching process. It does not affect others training stages.
- save_dir: Optional[str] = None¶
If provided, cache fill be saved to the given directory and re-used between launches