Skip to content

AOT Configuration API

AITuneConfig

aitune.torch.config.AITuneConfig

AITuneConfig()

AITune configuration.

Initialize AITuneConfig.

Source code in aitune/torch/config.py
def __init__(self) -> None:
    """Initialize AITuneConfig."""
    self._cache_dir: Path = aitune_cache_dir()
    self._min_num_samples: int = DEFAULT_MIN_NUM_SAMPLES
    self._max_num_samples_stored: int | float = DEFAULT_MAX_NUM_SAMPLES_STORED
    self._device_after_tuning: str = DEFAULT_DEVICE_AFTER_TUNING
    self.strict_mode: bool = True
    self.enable_hf_integrations: bool = True

cache_dir property writable

cache_dir

Get the cache directory.

device_after_tuning property writable

device_after_tuning

Get the device to use after tuning.

max_num_samples_stored property writable

max_num_samples_stored

Get the minimum number of samples to collect before optimizing.

min_num_samples property writable

min_num_samples

Get the minimum number of samples to collect before optimizing.

config

Global configuration instance:

aitune.torch.config

Inplace configuration.

config module-attribute

config = AITuneConfig()