quaterion.train.cache.cache_config module
- 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.
- cache_type: Optional[CacheType] = 'auto'
Cache type used for cacheable encoders not set in mapping
- key_extractors: Union[KeyExtractorType, Dict[str, KeyExtractorType]]
Mapping of encoders to key extractor functions required to cache non-hashable objects.
- class CacheType(value)[source]
Bases:
str
,Enum
Available tensor devices to be used for caching.