Scvi-tools

Latest version: v1.2.0

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

Scan your dependencies

Page 6 of 16

0.17.0

Major Changes

- Experimental MuData support for {class}`~scvi.model.TOTALVI` via the method
{meth}`~scvi.model.TOTALVI.setup_mudata`. For several of the existing `AnnDataField` classes,
there is now a MuData counterpart with an additional `mod_key` argument used to indicate the
modality where the data lives (e.g. {class}`~scvi.data.fields.LayerField` to
{class}`~scvi.data.fields.MuDataLayerField`). These modified classes are simply wrapped
versions of the original `AnnDataField` code via the new
{class}`scvi.data.fields.MuDataWrapper` method [1474].

- Modification of the {meth}`~scvi.module.VAE.generative` method's outputs to return prior and
likelihood properties as {class}`~torch.distributions.distribution.Distribution` objects.
Concerned modules are {class}`~scvi.module.AmortizedLDAPyroModule`, {class}`AutoZIVAE`,
{class}`~scvi.module.MULTIVAE`, {class}`~scvi.module.PEAKVAE`, {class}`~scvi.module.TOTALVAE`,
{class}`~scvi.module.SCANVAE`, {class}`~scvi.module.VAE`, and {class}`~scvi.module.VAEC`. This
allows facilitating the manipulation of these distributions for model training and inference
[1356].

- Major changes to Jax support for scvi-tools models to generalize beyond
{class}`~scvi.model.JaxSCVI`. Support for Jax remains experimental and is subject to breaking
changes:

- Consistent module interface for Flax modules (Jax-backed) via
{class}`~scvi.module.base.JaxModuleWrapper`, such that they are compatible with the
existing {class}`~scvi.model.base.BaseModelClass` [1506].
- {class}`~scvi.train.JaxTrainingPlan` now leverages Pytorch Lightning to factor out
Jax-specific training loop implementation [1506].
- Enable basic device management in Jax-backed modules [1585].

Minor changes

- Add {meth}`~scvi.module.base.PyroBaseModuleClass.on_load` callback which is called on
{meth}`~scvi.model.base.BaseModuleClass.load` prior to loading the module state dict [1542].
- Refactor metrics code and use {class}`~torchmetrics.MetricCollection` to update metrics in bulk
[1529].
- Add `max_kl_weight` and `min_kl_weight` to {class}`~scvi.train.TrainingPlan` [1595].
- Add a warning to {class}`~scvi.model.base.UnsupervisedTrainingMixin` that is raised if
`max_kl_weight` is not reached during training [1595].

Breaking changes

- Any methods relying on the output of `inference` and `generative` from existing scvi-tools models
(e.g. {class}`~scvi.model.SCVI`, {class}`~scvi.model.SCANVI`) will need to be modified to
accept `torch.Distribution` objects rather than tensors for each parameter (e.g. `px_m`,
`px_v`) [1356].
- The signature of {meth}`~scvi.train.TrainingPlan.compute_and_log_metrics` has changed to support
the use of {class}`~torchmetrics.MetricCollection`. The typical modification required will look
like changing `self.compute_and_log_metrics(scvi_loss, self.elbo_train)` to
`self.compute_and_log_metrics(scvi_loss, self.train_metrics, "train")`. The same is necessary
for validation metrics except with `self.val_metrics` and the mode `"validation"` [1529].

Bug Fixes

- Fix issue with {meth}`~scvi.model.SCVI.get_normalized_expression` with multiple samples and
additional continuous covariates. This bug originated from {meth}`~scvi.module.VAE.generative`
failing to match the dimensions of the continuous covariates with the input when `n_samples>1`
in {meth}`~scvi.module.VAE.inference` in multiple module classes [1548].
- Add support for padding layers in {meth}`~scvi.model.SCVI.prepare_query_anndata` which is
necessary to run {meth}`~scvi.model.SCVI.load_query_data` for a model setup with a layer
instead of X [1575].

Contributors

- [jjhong922]
- [adamgayoso]
- [PierreBoyeau]
- [RK900]
- [FlorianBarkmann]

0.16.4

instead of v0.16.3 or v0.16.2. This release fixes a critical bug in the training plan.

Changes

Breaking changes

Bug Fixes

- Fix critical issue in {class}`~scvi.train.AdversarialTrainingPlan` where `kl_weight` was
overwritten to 0 at each step ([1566]). Users should avoid using v0.16.2 and v0.16.3 which
both include this bug.

Contributors

- [jjhong922]
- [adamgayoso]

0.16.3

Changes

- Removes sphinx max version and removes jinja dependency ([1555]).

Breaking changes

Bug Fixes

- Upper bounds protobuf due to pytorch lightning incompatibilities ([1556]). Note that [1556]
has unique changes as PyTorch Lightning >=1.6.4 adds the upper bound in their requirements.

Contributors

- [jjhong922]
- [adamgayoso]

0.16.2

Changes

Breaking changes

Bug Fixes

- Raise appropriate error when `backup_url` is not provided and file is missing on
{meth}`~scvi.model.base.BaseModelClass.load` ([1527]).
- Pipe `loss_kwargs` properly in {class}`~scvi.train.AdversarialTrainingPlan`, and fix incorrectly
piped kwargs in {class}`~scvi.model.TOTALVI` and {class}`~scvi.model.MULTIVI` ([1532]).

Contributors

- [jjhong922]
- [adamgayoso]

0.16.1

Changes

- Update scArches Pancreas tutorial, DestVI tutorial ([1520]).

Breaking changes

- {class}`~scvi.dataloaders.SemiSupervisedDataLoader` and
{class}`~scvi.dataloaders.SemiSupervisedDataSplitter` no longer take `unlabeled_category` as an
initial argument. Instead, the `unlabeled_category` is fetched from the labels state registry,
assuming that the {class}`~scvi.data.AnnDataManager` object is registered with a
{class}`~scvi.data.fields.LabelsWithUnlabeledObsField` ([1515]).

Bug Fixes

- Bug fixed in {class}`~scvi.model.SCANVI` where `self._labeled_indices` was being improperly set
([1515]).
- Fix issue where {class}`~scvi.model.SCANVI.load_query_data` would not properly add an obs column
with the unlabeled category when the `labels_key` was not present in the query data.
- Disable extension of categories for labels in {class}`~scvi.model.SCANVI.load_query_data`
([1519]).
- Fix an issue with {meth}`~scvi.model.SCANVI.prepare_query_data` to ensure it does nothing when
genes are completely matched ([1520]).

Contributors

- [jjhong922]
- [adamgayoso]

0.16

Page 6 of 16

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.