Scvi-tools

Latest version: v1.2.2.post1

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

Scan your dependencies

Page 8 of 16

0.15.3

Changes

Bug fixes

- Raise `NotImplementedError` when `categorical_covariate_keys` are used with
{meth}`scvi.model.SCANVI.load_query_data`. ([1458]).
- Fix behavior when `continuous_covariate_keys` are used with {meth}`scvi.model.SCANVI.classify`.
([1458]).
- Unlabeled category values are automatically populated when
{meth}`scvi.model.SCANVI.load_query_data` run on `adata_target` missing labels column.
([1458]).
- Fix dataframe rendering in dark mode docs ([1448])
- Fix variance constraint in {class}`~scvi.model.AmortizedLDA` that set an artifical bound on
latent topic variance ([1445]).
- Fix {meth}`scvi.model.base.ArchesMixin.prepare_query_data` to work cross device (e.g., model
trained on cuda but method used on cpu; see [1451]).

Contributors

- [jjhong922]
- [adamgayoso]

0.15.2

Changes

- Remove setuptools pinned requirement due to new PyTorch 1.11 fix ([1436]).
- Switch to myst-parsed markdown for docs ([1435]).
- Add `prepare_query_data(adata, reference_model)` to {class}`~scvi.model.base.ArchesMixin` to
enable query data cleaning prior to reference mapping ([1441]).
- Add Human Lung Cell Atlas tutorial ([1442]).

Bug fixes

- Errors when arbitrary kwargs are passed into `setup_anndata()` ([1439]).
- Fix {class}`scvi.external.SOLO` to use `train_size=0.9` by default, which enables early stopping
to work properly ([1438]).
- Fix scArches version warning ([1431]).
- Fix backwards compat for {class}`~scvi.model.SCANVI` loading ([1441]).

Contributors

- [jjhong922]
- [adamgayoso]
- [grst]

0.15.1

Changes

- Remove `labels_key` from {class}`~scvi.model.MULTIVI` as it is not used in the model ([1393]).
- Use scvi-tools mean/inv_disp parameterization of negative binomial for
{class}`~scvi.model.JaxSCVI` likelihood ([1386]).
- Use `setup` for Flax-based modules ([1403]).
- Reimplement {class}`~scvi.module.JaxVAE` using inference/generative paradigm with
{class}`~scvi.module.base.JaxBaseModuleClass` ([1406]).
- Use multiple particles optionally in {class}`~scvi.model.JaxSCVI` ([1385]).
- {class}`~scvi.external.SOLO` no longer warns about count data ([1411]).
- Class docs are now one page on docs site ([1415]).
- Copied AnnData objects are assigned a new uuid and transfer is attempted ([1416]).

Bug fixes

- Fix an issue with using gene lists and proteins lists as well as `transform_batch` for
{class}`~scvi.model.TOTALVI` ([1413]).
- Error gracefully when NaNs present in {class}`~scvi.data.fields.CategoricalJointObsmField`
([1417]).

Contributors

- [jjhong922]
- [adamgayoso]

0.15

0.15.0

In this release, we have completely refactored the logic behind our data handling strategy (i.e.
`setup_anndata`) to allow for:

1. Readable data handling for existing models.
1. Modular code for easy addition of custom data fields to incorporate into models.
1. Avoidance of unexpected edge cases when more than one model is instantiated in one session.

**Important Note:** This change will not break pipelines for model users (with the exception of a
small change to {class}`~scvi.model.SCANVI`). However, there are several breaking changes for model
developers. The data handling tutorial goes over these changes in detail.

This refactor is centered around the new {class}`~scvi.data.AnnDataManager` class which
orchestrates any data processing necessary for scvi-tools and stores necessary information, rather
than adding additional fields to the AnnData input.

:::{figure} docs/\_static/img/anndata_manager_schematic.svg
:align: center
:alt: Schematic of data handling strategy with AnnDataManager
:class: img-fluid

Schematic of data handling strategy with {class}`~scvi.data.AnnDataManager`
:::

We also have an exciting new experimental Jax-based scVI implementation via
{class}`~scvi.model.JaxSCVI`. While this implementation has limited functionality, we have found it
to be substantially faster than the PyTorch-based implementation. For example, on a 10-core Intel
CPU, Jax on only a CPU can be as fast as PyTorch with a GPU (RTX3090). We will be planning further
Jax integrations in the next releases.

Changes

- Major refactor to data handling strategy with the introduction of
{class}`~scvi.data.AnnDataManager` ([1237]).
- Prevent clobbering between models using the same AnnData object with model instance specific
{class}`~scvi.data.AnnDataManager` mappings ([1342]).
- Add `size_factor_key` to {class}`~scvi.model.SCVI`, {class}`~scvi.model.MULTIVI`,
{class}`~scvi.model.SCANVI`, and {class}`~scvi.model.TOTALVI` ([1334]).
- Add references to the scvi-tools journal publication to the README ([1338], [1339]).
- Addition of {func}`scvi.model.utils.mde` ([1372]) for accelerated visualization of scvi-tools
embeddings.
- Documentation and user guide fixes ([1364], [1361])
- Fix for {class}`~scvi.external.SOLO` when {class}`~scvi.model.SCVI` was setup with a `labels_key`
([1354])
- Updates to tutorials ([1369], [1371])
- Furo docs theme ([1290])
- Add {class}`scvi.model.JaxSCVI` and {class}`scvi.module.JaxVAE`, drop Numba dependency for
checking if data is count data ([1367]).

Breaking changes

- The keyword argument `run_setup_anndata` has been removed from built-in datasets since there is
no longer a model-agnostic `setup_anndata` method ([1237]).

- The function `scvi.model._metrics.clustering_scores` has been removed due to incompatbility with
new data handling ([1237]).

- {class}`~scvi.model.SCANVI` now takes `unlabeled_category` as an argument to
{meth}`~scvi.model.SCANVI.setup_anndata` rather than on initialization ([1237]).

- `setup_anndata` is now a class method on model classes and requires specific function calls to
ensure proper {class}`~scvi.data.AnnDataManager` setup and model save/load. Any model
inheriting from {class}`~scvi.model.base.BaseModelClass` will need to re-implement this method
([1237]).

- To adapt existing custom models to v0.15.0, one can references the guidelines below. For
some examples of how this was done for the existing models in the codebase, please
reference the following PRs: ([1301], [1302]).
- `scvi._CONSTANTS` has been changed to `scvi.REGISTRY_KEYS`.
- `setup_anndata()` functions are now class functions and follow a specific structure. Please
refer to {meth}`~scvi.model.SCVI.setup_anndata` for an example.
- `scvi.data.get_from_registry()` has been removed. This method can be replaced by
{meth}`scvi.data.AnnDataManager.get_from_registry`.
- The setup dict stored directly on the AnnData object, `adata["_scvi"]`, has been deprecated.
Instead, this information now lives in {attr}`scvi.data.AnnDataManager.registry`.
- The data registry can be accessed at {attr}`scvi.data.AnnDataManager.data_registry`.
- Summary stats can be accessed at {attr}`scvi.data.AnnDataManager.summary_stats`.
- Any field-specific information (e.g. `adata.obs["categorical_mappings"]`) now lives in
field-specific state registries. These can be retrieved via the function
{meth}`~scvi.data.AnnDataManager.get_state_registry`.
- `register_tensor_from_anndata()` has been removed. To register tensors with no relevant
`AnnDataField` subclass, create a new a new subclass of
{class}`~scvi.data.fields.BaseAnnDataField` and add it to appropriate model's
`setup_anndata()` function.

Contributors

- [jjhong922]
- [adamgayoso]
- [watiss]

0.14.6

Bug fixes, minor improvements of docs, code formatting.

Changes

- Update black formatting to stable release ([1324])
- Refresh readme, move tasks image to docs ([1311]).
- Add 0.14.5 release note to index ([1296]).
- Add test to ensure extra {class}`~scvi.model.SCANVI` training of a pre-trained
{class}`~scvi.model.SCVI` model does not change original model weights ([1284]).
- Fix issue in {class}`~scvi.model.TOTALVI` protein background prior initialization to not include
protein measurements that are known to be missing ([1282]).
- Upper bound setuptools due to PyTorch import bug ([1309]).

Contributors

- [adamgayoso]
- [watiss]
- [jjhong922]

Page 8 of 16

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.