synthetic_hparams#
Synthetic Dataset hyperparameter mixin.
Hparams
These classes are used with yahp
for YAML
-based configuration.
Synthetic dataset parameter mixin for |
- class composer.datasets.synthetic_hparams.SyntheticHparamsMixin(use_synthetic=False, synthetic_num_unique_samples=100, synthetic_device='cpu', synthetic_memory_format=MemoryFormat.CONTIGUOUS_FORMAT)[source]#
Bases:
yahp.hparams.Hparams
,abc.ABC
Synthetic dataset parameter mixin for
DatasetHparams
.If a dataset supports yielding synthetic data, it should implement this mixin.
- Parameters
use_synthetic (bool, optional) โ Whether to use synthetic data. Default:
False
.synthetic_num_unique_samples (int, optional) โ The number of unique samples to allocate memory for. Ignored if
use_synthetic
isFalse
. Default:100
.synthetic_device (str, optional) โ The device to store the sample pool on. Set to
'cuda'
to store samples on the GPU and eliminate PCI-e bandwidth with the dataloader. Set to'cpu'
to move data between host memory and the device on every batch. Ignored ifuse_synthetic
isFalse
. Default:'cpu'
.synthetic_memory_format โ The
MemoryFormat
to use. Ignored ifuse_synthetic
isFalse
. Default:'CONTIGUOUS_FORMAT'
.