Scvi-tools

Latest version: v1.3.0

Safety actively analyzes 723177 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 13 of 16

0.8.0

Enhancements

Online updates of {class}`~scvi.model.SCVI`, {class}`~scvi.model.SCANVI`, and {class}`~scvi.model.TOTALVI` with the scArches method <!-- markdownlint-disable -->

It is now possible to iteratively update these models with new samples, without altering the model
for the "reference" population. Here we use the
[scArches method](https://github.com/theislab/scarches). For usage, please see the tutorial in the
user guide.

To enable scArches in our models, we added a few new options. The first is `encode_covariates`,
which is an `SCVI` option to encode the one-hotted batch covariate. We also allow users to exchange
batch norm in the encoder and decoder with layer norm, which can be though of as batch norm but per
cell. As the layer norm we use has no parameters, it's a bit faster than models with batch norm. We
don't find many differences between using batch norm or layer norm in our models, though we have
kept defaults the same in this case. To run scArches effectively, batch norm should be exhanged
with layer norm.

Empirical initialization of protein background parameters with totalVI

The learned prior parameters for the protein background were randomly initialized. Now, they can be
set with the `empirical_protein_background_prior` option in {class}`~scvi.model.TOTALVI`. This
option fits a two-component Gaussian mixture model per cell, separating those proteins that are
background for the cell and those that are foreground, and aggregates the learned mean and variance
of the smaller component across cells. This computation is done per batch, if the `batch_key` was
registered. We emphasize this is just for the initialization of a learned parameter in the model.

Use observed library size option

Many of our models like `SCVI`, `SCANVI`, and {class}`~scvi.model.TOTALVI` learn a latent library
size variable. The option `use_observed_lib_size` may now be passed on model initialization. We
have set this as `True` by default, as we see no regression in performance, and training is a bit
faster.

Important changes

- To facilitate these enhancements, saved {class}`~scvi.model.TOTALVI` models from previous
versions will not load properly. This is due to an architecture change of the totalVI encoder,
related to latent library size handling.
- The default latent distribtuion for {class}`~scvi.model.TOTALVI` is now `"normal"`.
- Autotune was removed from this release. We could not maintain the code given the new API changes
and we will soon have alternative ways to tune hyperparameters.
- Protein names during `setup_anndata` are now stored in `adata.uns["_scvi"]["protein_names"]`,
instead of `adata.uns["scvi_protein_names"]`.

Bug fixes

- Fixed an issue where the unlabeled category affected the SCANVI architecture prior distribution.
Unfortunately, by fixing this bug, loading previously trained (\<v0.8.0)
{class}`~scvi.model.SCANVI` models will fail.

0.7.1

This small update provides access to our new Discourse forum from the documentation.

0.7

scvi History

The scvi-tools package used to be scvi. This page commemorates all the hard work on the scvi
package by our numerous contributors.

Contributors

- [romain]
- [adam]
- [eddie]
- [jeff]
- [pierre]
- [max]
- [yining]
- [gabriel]
- [achille]
- [chenling]
- [jules]
- [david-kelley]
- [william-yang]
- [oscar]
- [casey-greene]
- [jamie-morton]
- [valentine-svensson]
- [stephen-flemming]
- [michael-raevsky]
- [james-webber]
- [galen]
- [francesco-brundu]
- [primoz-godec]
- [eduardo-beltrame]
- [john-reid]
- [han-yuan]
- [gokcen-eraslan]

0.7.0

scvi is now scvi-tools. Version 0.7 introduces many breaking changes. The best way to learn how to
use scvi-tools is with our documentation and tutorials.

- New high-level API and data loading, please see tutorials and examples for usage.
- `GeneExpressionDataset` and associated classes have been removed.
- Built-in datasets now return `AnnData` objects.
- `scvi-tools` now relies entirely on the [AnnData] format.
- `scvi.models` has been moved to `scvi.core.module`.
- `Posterior` classes have been reduced to wrappers on `DataLoaders`
- `scvi.inference` has been split to `scvi.core.data_loaders` for `AnnDataLoader` classes and
`scvi.core.trainers` for trainer classes.
- Usage of classes like `Trainer` and `AnnDataLoader` now require the `AnnData` data object as
input.

0.6.7

- downgrade anndata>=0.7 and scanpy>=1.4.6 [galen]
- make loompy optional, raise sckmisc import error [adam]
- fix PBMCDataset download bug [galen]
- fix AnnDatasetFromAnnData \_X in adata.obs bug [galen]

0.6.6

- add tqdm to within cluster DE genes [adam]
- restore tqdm to use simple bar instead of ipywidget [adam]
- move to numpydoc for doctstrings [adam]
- update issues templates [adam]
- Poisson variable gene selection [valentine-svensson]
- BrainSmallDataset set defualt save_path_10X [gokcen-eraslan]
- train_size must be float between 0.0 and 1.0 [galen]
- bump dependency versions [galen]
- remove reproducibility notebook [galen]
- fix scanVI dataloading [pierre]

Page 13 of 16

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.