scvi._settings.ScviConfig#
- class scvi._settings.ScviConfig(verbosity=20, progress_bar_style='tqdm', batch_size=128, seed=None, logging_dir='./scvi_log/', dl_num_workers=0, dl_persistent_workers=False, jax_preallocate_gpu_memory=False, warnings_stacklevel=2)[source]#
Config manager for scvi-tools.
Examples
To set the seed
>>> scvi.settings.seed = 1
To set the batch size for functions like SCVI.get_latent_representation
>>> scvi.settings.batch_size = 1024
To set the progress bar style, choose one of “rich”, “tqdm”
>>> scvi.settings.progress_bar_style = "rich"
To set the verbosity
>>> import logging >>> scvi.settings.verbosity = logging.INFO
To set the number of threads PyTorch will use
>>> scvi.settings.num_threads = 2
To prevent Jax from preallocating GPU memory on start (default)
>>> scvi.settings.jax_preallocate_gpu_memory = False
Attributes table#
Minibatch size for loading data into the model. |
|
Number of workers for PyTorch data loaders (Default is 0). |
|
Whether to use persistent_workers in PyTorch data loaders (Default is False). |
|
Jax GPU memory allocation settings. |
|
Directory for training logs (default './scvi_log/'). |
|
Number of threads PyTorch will use. |
|
Library to use for progress bar. |
|
Random seed for torch and numpy. |
|
Verbosity level (default logging.INFO). |
|
Stacklevel for warnings. |
Methods table#
Resets "scvi" log handler to a basic RichHandler(). |
Attributes#
- ScviConfig.batch_size[source]#
Minibatch size for loading data into the model.
This is only used after a model is trained. Trainers have specific batch_size parameters.
- ScviConfig.dl_persistent_workers[source]#
Whether to use persistent_workers in PyTorch data loaders (Default is False).