Release notes#
Starting from version 0.20.1, this format is based on Keep a Changelog, and this project adheres to Semantic Versioning. The full commit history is available in the commit logs.
Version 1.4#
1.4.3 (2026-05-12)#
Added#
Add support for Python 3.14, #3563.
Add support for Pandas3, #3638.
Add
scvi.external.DIAGVIfor integrating unpaired single-cell datasets, #3575.Add MuData support to
scvi.external.TOTALANVI#3797.
Fixed#
Fix PyTorch
scvi.external.MRVIto match JAX implementation architecture and work on GPU, #3749.Fix
MULTIVImodality reordering insetup_mudata()to avoidAttributeErrorwhen using mudata>=0.3, whereMuData.modis read-only #3776.Fix DE functionality in
scvi.external.SysVI#3783.
Changed#
Update SCVI-Tools Hub models, #3733.
Removed#
Removed grouped-label classification legacy code in
scvi.model.SCANVI,scvi.external.TOTALANVI, andscvi.external.METHYLANVI, #3805.
1.4.2 (2026-02-26)#
Added#
Add
differential_abundance()andget_aggregated_posterior()functions toscvi.model.base.VAEMixin, #3618Added a flag to turn on or off Importance Sampling in
scvi.external.RESOLVIdifferential_expression(), #3708.Add dispersion tests, including support for
scvi.external.SCVIVA, #3677.Add support for running scVI-Tools on TPU, #3690.
Add support for logging validation metrics in MultiGPU, #3712.
Add Support for MLX backend for Apple silicon with model
scvi.model.mlxSCVI#3598.Add support for covariates and multiGPU in
scvi.model.JaxSCVI, #3717.Add support for size_factor in
scvi.external.RESOLVI, #3701.
Fixed#
Fix checkpointing for
scvi.model.TOTALVI, #3651.Fix Integrated Gradients gets cont and categ covs in the reverse order, #3660.
Fix minified adata load into non-minified model, #3691.
Changed#
Change the use of Figshare as storage to SCVERSE S3, #3667.
Change explicit training configuration objects for scvi-tools, reducing reliance on loose kwargs and improving clarity across training APIs, #3666.
Change the default backend of
scvi.external.MRVIto torch instead of jax, #3717.
Removed#
Removed all Jax tests from mandatory tests and put them under a special tag, #3703.
1.4.1 (2025-12-10)#
Added#
Add MLFlow support, #3573.
Add support for MuData during Ray autotune #3545.
Add
get_normalized_expression()function toscvi.external.TorchMRVI, #3579.Add modality auto-ordering for mudata in
MULTIVI#3622 and fix DE.
Fixed#
Fix
scvi.model.TOTALVIconvert_legacy_save function with updated model parameters #3561.Fix configurable mdata filename for
scvi.autotune.AutotuneExperiment, #3580.Fix inference on GPU for PyTorch implementation of
scvi.external.MRVI, #3586.Fix model loading and DE with labels in PyTorch implementation of
scvi.external.MRVI, #3615.Fix in non-multi-GPU training to have history in memory, and not on disk by default #3543.
Fix missing model history for multi-GPU training, and add an option to log on step #3516.
Fix external indices validation in
scvi.dataloaders.SemiSupervisedDataSplitter#3601.Fix issues with hub model loaded from path during scarches query and model loaded with adata=None while adata not exists #3628.
Fix
batch_sizeinscvi.external.ContrastiveVIdata loader #3629.
Changed#
Update model
scvi.model.DestVIwith fine cell-type classifier #3380.
Removed#
1.4.0 (2025-09-14)#
Added#
Add a PyTorch implementation of
scvi.external.MRVI#3304.Add checkpointing with
scvi.autotune.AutotuneExperiment#3452.Add downstream analysis functions multi-GPU support #3443.
Add
scvi.external.CYTOVIfor dealing with cytometry data #3456.Add scArches support for
scvi.external.SCVIVA#3494.Add a backend parameter and make the class
scvi.external.MRVIa wrapper to the Jax or Torch implementations #3498.Add Lightning checkpointing to trainer fit #3501.
Add solver parameter for SVD stability in
scvi.autotune.AutotuneExperiment#3524.
Fixed#
Fix library size calculation in
scvi.model.TOTALVI#3452.Fix scArches surgery in
scvi.external.SysVI#3466.Fix VAE load size mismatch when using extra covariates with custom datamodule #3461.
Changed#
Made the Jax dependency optional in scvi-tools #3426.
Removed#
Version 1.3#
1.3.3 (2025-07-23)#
Added#
Add support for using AnnCollection
scvi.dataloaders.CollectionAdapterdataloader forscvi.model.SCVIandscvi.model.SCANVI, #3362.
Fixed#
Add a fix to
differential_expression(), #3418.Add
scvi.module.base.SupervisedModuleClassto the classifier, #3430.
Changed#
Temporarily pinned the Jax version to <0.7.0 to be able to install numpyro.
Removed#
Removed a bad legacy code in
scvi.model.base.ArchesMixin, #3417.Removed Deprecated
scvi.train.SaveBestStatefrom code #3420.
1.3.2 (2025-06-22)#
Added#
Fixed#
Fix bug in
scvi.external.TOTALANVIscArches #3355.Fix bug in
scvi.external.MRVIdownstream analysis use of external adata #3324.Fix bug in perplexity calculation in
scvi.model.AmortizedLDA#3373.
Changed#
Update Read the Docs tutorials with one main preprocessing tutorial #3363.
Removed#
Removed default arguments from test function parameters due to ruff pre-commit v0.12.0 with PT028 rule #3393.
1.3.1 (2025-05-15)#
Added#
Add
scvi.external.METHYLANVIfor modeling methylation-labeled data from single-cell bisulfite sequencing (scBS-seq) #3066.Add supervised module class
scvi.module.base.SupervisedModuleClass#3237.Add
get_normalizedmodel property for any generative model, and changeget_accessibility_estimatestoget_normalized_accessibilitywhere needed #3238Add
scvi.external.TOTALANVIfor modeling single-cell RNA and CITE-seq protein data that integrates semi-supervised cell type annotations to jointly infer both protein expression and cell states #3259Add Custom Dataloaders registry support #2932
Add support for using Census and LaminAI custom dataloaders for
scvi.model.SCVIandscvi.model.SCANVI#2932Add early stopping KL warmup steps #3262
Add a minification option to
LinearSCVI#3294Update the Read the Docs tutorials index page with interactive, filterable options #3276
Fixed#
Changed#
Removed#
Removed Jax version constraint for mrVI training. #3309.
1.3.0 (2025-02-28)#
Added#
Add
scvi.external.Decipherfor dimensionality reduction and interpretable representation learning in single-cell RNA sequencing data #3015, #3091.Add multiGPU support for
SCVI,SCANVI,CondSCVIandLinearSCVI,TOTALVI,MULTIVIandPEAKVI. #3125.Add an exception callback to
scvi.train._callbacks.SaveCheckpointin order to save optimal model during training, in case of failure because of Nan’s in gradients. #3159.Add
get_normalized_expression()for models:PEAKVI,POISSONVI,CondSCVI,AUTOZI,CellAssignandGIMVI. #3121.Add
scvi.external.RESOLVIfor bias correction in single-cell resolved spatial transcriptomics #3144.Add semisupervised training mixin class
scvi.model.base.SemisupervisedTrainingMixin. #3164.Add scib-metrics support for
scvi.autotune.AutotuneExperimentandscvi.train._callbacks.ScibCallbackfor autotune for scib metrics #3168.Add Support of dask arrays in AnnTorchDataset. #3193.
Add a common use cases section in the docs’ user guide. #3200.
Add
scvi.external.SysVIfor cycle consistency loss and VampPrior #3195.
Fixed#
Fixed bug in distributed
scvi.dataloaders.ConcatDataLoader#3053.Fixed bug when loading Pyro-based models and scArches support for Pyro #3138
Fixed a disable vmap in
scvi.external.MRVIfor large sample sizes to avoid out-of-memory errors. Store distance matrices as a numpy array in xarray to reduce memory usage #3146.Fixed
scvi.external.MRVIMixtureSameFamily log probability calculation #3189.
Changed#
Updated the CI workflow with multiGPU tests #3053.
Set
mode="change"as default DE method. Compute positive and negative LFC separately by default (test_mode="three"). Corrected computation of pseudocounts and make if default to add a pseudocounts for genes not expressed (pseudocount=None). According to Eq. Ten of Boyeau et al., PNAS 2023 #2826
Removed#
Version 1.2#
1.2.2 (2024-12-31)#
Added#
Fixed#
Fixed batch_size pop to get in
scvi.dataloaders.DataSplitter#3128.
Changed#
Removed#
Removed the support for loompy and local mde function #2842.
1.2.1 (2024-12-04)#
Added#
Added adaptive handling for last training minibatch of 1–2 cells in case of
datasplitter_kwargs={"drop_last": False}andtrain_size = Noneby moving them into the validation set, if available. #3036.Add
batch_keyandlabels_keytoscvi.external.SCAR.setup_anndata(). #3045.Implemented variance of ZINB distribution. #3044.
Support for minified mode while retaining counts to skip the encoder.
New Training plan argument
update_only_decoderto use stored latent codes and skip training of the encoder.Refactored code for minified models. #2883.
Add
scvi.external.METHYLVIfor modeling methylation data from single-cell bisulfite sequencing (scBS-seq) experiments #2834.
Fixed#
Breaking Change: Fix
get_outlier_cell_sample_pairsfunction inscvi.external.MRVIto correctly compute the maximum log-density across in-sample cells rather than the aggregated posterior log-density #3007.Fix references to
scvi.externalinscvi.external.SCAR.setup_anndata().Fix gimVI to append mini batches first into CPU during get_imputed and get_latent operations #3058.
Changed#
Removed#
1.2.0 (2024-09-26)#
Added#
Add support for Python 3.12 #2966.
Add support for categorial covariates in scArches in
scvi.model.base.ArchesMixin#2936.Add assertion error in cellAssign for checking duplicates in celltype markers #2951.
scvi.settings.dl_persistent_workersallows using persistent workers inscvi.dataloaders.AnnDataLoader#2924.Add option for using external indexes in data splitting classes that are under
scvi.dataloadersby passingexternal_indexing=list[train_idx,valid_idx,test_idx]as well as in all models available #2902.Add warning if creating data splits in
scvi.dataloadersthat create last batch with less than 3 cells #2916.Add new experimental functional API for hyperparameter tuning with
scvi.autotune.run_autotune()andscvi.autotune.AutotuneExperimentto replacescvi.autotune.ModelTuner,scvi.autotune.TunerManager, andscvi.autotune.TuneAnalysis#2561.Add experimental class
scvi.nn.Embeddingimplementing methods for extending embeddings #2574.Add experimental support for representing batches with continuously valued embeddings by passing in
batch_representation="embedding"toscvi.model.SCVI#2576.Add experimental mixin classes
scvi.model.base.EmbeddingMixinandscvi.module.base.EmbeddingModuleMixin#2576.Add the option to generate synthetic spatial coordinates in
scvi.data.synthetic_iid()with argumentgenerate_coordinates#2603.Add experimental support for using custom
lightning.pytorch.core.LightningDataModules inscvi.autotune.run_autotune()#2605.Add
scvi.external.VELOVIfor RNA velocity estimation using variational inference #2611.Add
unsignedargument toscvi.hub.HubModel.pull_from_s3()to allow for unsigned downloads of models from AWS S3 #2615.Add support for
batch_keyinscvi.model.CondSCVI.setup_anndata()#2626.Add support for
scvi.model.base.RNASeqMixin()inscvi.model.CondSCVI#2915.Add
load_best_on_endargument toscvi.train.SaveCheckpointto load the best model state at the end of training #2672.Add experimental class
scvi.distributions.BetaBinomialimplementing the Beta-Binomial distribution with mean-dispersion parameterization for modeling scBS-seq methylation data #2692.Add support for custom dataloaders in
scvi.model.base.VAEMixinmethods by specifying thedataloaderargument #2748.Add the option to use a normal distribution in the generative model of
scvi.model.SCVIby passing ingene_likelihood="normal"#2780.Add
scvi.external.MRVIfor modeling sample-level heterogeneity in single-cell RNA-seq data #2756.Add support for reference mapping with
mudata.MuDatamodels toscvi.model.base.ArchesMixin#2578.Add argument
return_meantoscvi.model.base.VAEMixin.get_reconstruction_error()andscvi.model.base.VAEMixin.get_elbo()to allow computation without averaging across cells #2362.Add support for setting
weights="importance"inscvi.model.SCANVI.differential_expression()#2362.
Changed#
Deprecate
scvi.data.cellxgene(), to be removed in v1.3. Please directly use the cellxgene-census instead #2542.Deprecate
scvi.nn.one_hot(), to be removed in v1.3. Please directly use theone_hotfunction in PyTorch instead #2608.Deprecate
scvi.train.SaveBestState, to be removed in v1.3. Please usescvi.train.SaveCheckpointinstead #2673.Deprecate
save_bestargument inscvi.model.PEAKVI.train()andscvi.model.MULTIVI.train(), to be removed in v1.3. Please pass inenable_checkpointingor specify a custom checkpointing procedure withscvi.train.SaveCheckpointinstead #2673.Move
scvi.model.base._utils._load_legacy_saved_files()toscvi.model.base._save_load._load_legacy_saved_files()#2731.Move
scvi.model.base._utils._load_saved_files()toscvi.model.base._save_load._load_saved_files()#2731.Move
scvi.model.base._utils._initialize_model()toscvi.model.base._save_load._initialize_model()#2731.Move
scvi.model.base._utils._validate_var_names()toscvi.model.base._save_load._validate_var_names()#2731.Move
scvi.model.base._utils._prepare_obs()toscvi.model.base._de_core._prepare_obs()#2731.Move
scvi.model.base._utils._de_core()toscvi.model.base._de_core._de_core()#2731.Move
scvi.model.base._utils._fdr_de_prediction()toscvi.model.base._de_core_._fdr_de_prediction()#2731.scvi.data.synthetic_iid()now generates unique variable names for protein and accessibility data #2739.The
data_moduleargument inscvi.model.base.UnsupervisedTrainingMixin.train()has been renamed todatamodulefor consistency #2749.Change the default saving method of variable names for
mudata.MuDatabased models (e.g.scvi.model.TOTALVI) to a dictionary of per-mod variable names instead of a concatenated array of all variable names. Users may replicate the previous behavior by passing inlegacy_mudata_format=Truetoscvi.model.base.BaseModelClass.save()#2769.Changed internal activation function in
scvi.nn.DecoderTOTALVIto Softplus to increase numerical stability. This is the new default for new models. Previously trained models will be loaded with exponential activation function #2913.
Fixed#
Fix logging of accuracy for cases with one sample per class in scANVI #2938.
Disable adversarial classifier if training with a single batch. Previously this raised a None error #2914.
get_normalized_expression()fixed for Poisson distribution and Negative Binomial with latent_library_size #2915.Fix
scvi.module.VAE.marginal_ll()whenn_mc_samples_per_pass=1#2362.scvi.module.VAE.marginal_ll()whenn_mc_samples_per_pass=1#2362.Enable the option to drop_last minibatch during training by
datasplitter_kwargs={"drop_last": True}#2926.Fix JAX to be deterministic on CUDA when seed is manually set #2923.
Removed#
Remove
scvi.autotune.ModelTuner,scvi.autotune.TunerManager, andscvi.autotune.TuneAnalysisin favor of new experimental functional API withscvi.autotune.run_autotune()andscvi.autotune.AutotuneExperiment#2561.Remove
feed_labelsargument and corresponding code paths inscvi.module.SCANVAE.loss()#2644.Remove
scvi.train._callbacks.MetricsCallbackand argumentadditional_val_metricsinscvi.train.Trainer#2646.
Version 1.1#
1.1.6 (2024-08-19)#
Fixed#
Breaking change: In
scvi.autotune._managerwe changed the parameter in RunConfig fromlocal_dirtostorage_pathsee issue2908#2689.
1.1.5 (2024-06-30)#
1.1.4 (2024-06-30)#
Added#
Add argument
return_logitstoscvi.external.SOLO.predict()that allows returning logits instead of probabilities when passing insoft=Trueto replicate the buggy behavior previous to v1.1.3 #2870.
1.1.3 (2024-06-26)#
Fixed#
Breaking change: Fix
scvi.external.SOLO.predict()to correctly return probabilities instead of logits when passing insoft=True(the default option) #2689.Breaking change: Fix
scvi.dataloaders.SemiSupervisedDataSplitterto properly sample unlabeled observations without replacement #2816.
1.1.2 (2024-03-01)#
Changed#
Address AnnData >= 0.10 deprecation warning for
anndata.read()by replacing instances withanndata.read_h5ad()#2531.Address AnnData >= 0.10 deprecation warning for
anndata._core.sparse_dataset.SparseDatasetby replacing instances withanndata.abc.CSCDatasetandanndata.abc.CSRDataset#2531.
1.1.1 (2024-02-19)#
Fixed#
Correctly apply non-default user parameters in
scvi.external.POISSONVI#2522.
1.1.0 (2024-02-13)#
Added#
Add
scvi.external.ContrastiveVIfor contrastiveVI #2242.Add
scvi.dataloaders.BatchDistributedSamplerfor distributed training #2102.Add
additional_val_metricsargument toscvi.train.Trainer, allowing to specify additional metrics to compute and log during the validation loop usingscvi.train._callbacks.MetricsCallback#2136.Expose
acceleratoranddevicearguments inscvi.hub.HubModel.load_model()pr{2166}.Add
load_sparse_tensorargument inscvi.data.AnnTorchDatasetfor directly loading SciPy CSR and CSC data structures to their PyTorch counterparts, leading to faster data loading depending on the sparsity of the data #2158.Add per-group LFC information to
scvi.criticism.PosteriorPredictiveCheck.differential_expression().metrics["diff_exp"]is now a dictionary wheresummarystores the summary dataframe, andlfc_per_model_per_groupstores the per-group LFC #2173.Expose
torch.save()keyword arguments inscvi.model.base.BaseModelClass.saveandscvi.external.GIMVI.save#2200.Add
model_kwargsandtrain_kwargsarguments toscvi.autotune.ModelTuner.fit()#2203.Add
datasplitter_kwargsto modeltrainmethods #2204.Add
use_posterior_meanargument toscvi.model.SCANVI.predict()for stochastic prediction of cell type labels #2224.Add support for Python 3.10+ type annotations in
scvi.autotune.ModelTuner#2239.Add the option to log device statistics in
scvi.autotune.ModelTuner.fit()with argumentmonitor_device_stats#2260.Add the option to pass in a random seed to
scvi.autotune.ModelTuner.fit()with argumentseed#2260.Automatically log the learning rate when
reduce_lr_on_plateau=Truein training plans #2280.Add
scvi.external.POISSONVIto model scATAC-seq fragment counts with a Poisson distribution #2249scvi.train.SemiSupervisedTrainingPlannow logs the classifier calibration error #2299.Passing
enable_checkpointing=Trueintotrainmethods is now compatible with our model saves. Additional options can be specified by initializing withscvi.train.SaveCheckpoint#2317.scvi.settings.dl_num_workersis now correctly applied as the defaultnum_workersinscvi.dataloaders.AnnDataLoader#2322.Passing in
indicestoscvi.criticism.PosteriorPredictiveCheckallows for running metrics on a subset of the data #2361.Add
seedargument toscvi.model.utils.mde()for reproducibility #2373.Add
scvi.hub.HubModel.save()andscvi.hub.HubMetadata.save()#2382.Add support for Optax 0.1.8 by renaming instances of
optax.additive_weight_decay()tooptax.add_weight_decay()#2396.Add support for hosting
scvi.hub.HubModelon AWS S3 viascvi.hub.HubModel.pull_from_s3()andscvi.hub.HubModel.push_to_s3()#2378.Add a clearer error message for
scvi.data.poisson_gene_selection()when input data does not contain raw counts #2422.Add API for using custom dataloaders with
scvi.model.SCVIby makingadataargument optional on initialization and adding optional argumentdata_moduletoscvi.model.base.UnsupervisedTrainingMixin.train()#2467.Add support for Ray 2.8–2.9 in
scvi.autotune.ModelTuner#2478.
Fixed#
Fix bug where
n_hiddenwas not being passed intoscvi.nn.Encoderinscvi.model.AmortizedLDA#2229Fix bug in
scvi.module.SCANVAEwhere classifier probabilities were interpreted as logits. This is backwards compatible as loading older models will use the old code path #2301.Fix bug in
scvi.external.GIMVIwherebatch_sizewas not properly used in inference methods #2366.Fix error message formatting in
scvi.data.fields.LayerField.transfer_field()#2368.Fix ambiguous error raised in
scvi.distributions.NegativeBinomial.log_prob()andscvi.distributions.ZeroInflatedNegativeBinomial.log_prob()whenscalenot passed in and value not in support #2395.Fix initialization of
scvi.distributions.NegativeBinomialandscvi.distributions.ZeroInflatedNegativeBinomialwhenvalidate_args=Trueand optional parameters not passed in #2395.Fix error when re-initializing
scvi.external.GIMVIwith the same datasets #2446.
Changed#
Replace
sparsewithsparse_formatargument inscvi.data.synthetic_iid()for increased flexibility over dataset format #2163.Revalidate
deviceswhen automatically switching from MPS to CPU accelerator inscvi.model._utils.parse_device_args()#2247.Refactor
scvi.data.AnnTorchDataset, now loads continuous data asnumpy.float32and categorical data asnumpy.int64by default #2250.Support fractional GPU usage in
scvi.autotune.ModelTunerpr{2252}.Tensorboard is now the default logger in
scvi.autotune.ModelTunerpr{2260}.Match
momentumandepsiloninscvi.module.JaxVAEto the default values in PyTorch #2309.Change
scvi.train.SemiSupervisedTrainingPlanandscvi.train.ClassifierTrainingPlanaccuracy and F1 score computations to use"micro"reduction rather than"macro"#2339.Internal refactoring of
scvi.module.VAE.sample()andscvi.model.base.RNASeqMixin.posterior_predictive_sample()#2377.Change
xarrayandsparsefrom mandatory-to-optional dependencies #2480.Use
anndata.abc.CSCDatasetandanndata.abc.CSRDatasetinstead of the deprecatedanndata._core.sparse_dataset.SparseDatasetfor type checks #2485.Make
use_observed_lib_sizeargument adjustable inscvi.module.LDVAEpr{2494}.
Removed#
Version 1.0#
1.0.4 (2023-10-13)#
Added#
Add support for AnnData 0.10.0 #2271.
1.0.3 (2023-08-13)#
Changed#
Disable the default selection of MPS when
accelerator="auto"in Lightning #2167.Change JAX models to use
dictinstead offlax.core.FrozenDictaccording to the Flax migration guide google/flax#3191 #2222.
Fixed#
Fix bug in
scvi.model.base.PyroSviTrainMixinwheretraining_planargument is ignored #2162.Fix missing docstring for
unlabeled_categoryinscvi.model.SCANVI.setup_anndataand reorder arguments #2189. — Fix Pandas 2.0 unpickling error inscvi.model.base.BaseModelClass.convert_legacy_save()by switching topandas.read_pickle()for the setup dictionary #2212.
1.0.2 (2023-07-05)#
Fixed#
1.0.1 (2023-07-04)#
Added#
Add support for Python 3.11 #1977.
Changed#
Upper bound Chex dependency to 0.1.8 due to NumPy installation conflicts #2132.
1.0.0 (2023-06-02)#
Added#
Add
scvi.criticism.PosteriorPredictiveCheckfor model evaluation #2058.Add
scvi.data.reads_to_fragments()for scATAC data #1946Add default
stacklevelforwarningsinscvi.settings#1971.Add scBasset motif injection procedure #2010.
Add importance-sampling-based differential expression procedure #1872.
Raise clearer error when initializing
scvi.external.SOLOfromscvi.model.SCVIwith extra categorical or continuous covariates #2027.Add the option to generate
mudata.MuDatainscvi.data.synthetic_iid()#2028.Add option for disabling shuffling prior to splitting data in
scvi.dataloaders.DataSplitter#2037.Add
scvi.data.AnnDataManager.create_torch_dataset()and expose custom sampler ability #2036.Log training loss through Lightning’s progress bar #2043.
Filter Jax undetected GPU warnings #2044.
Raise warning if MPS backend is selected for PyTorch, see pytorch/pytorch#77764 #2045.
Add
deregister_managerfunction toscvi.model.base.BaseModelClass, allowing to clearscvi.data.AnnDataManagerinstances from memory #2060.Add the option to use a linear classifier in
scvi.model.SCANVI#2063.Add lower bound 0.12.1 for Numpyro dependency #2078.
Add a new section in scBasset tutorial for motif scoring #2079.
Fixed#
Fix creation of minified adata by copying original uns dict #2000. This issue arises with anndata>=0.9.0.
Fix
scvi.model.TOTALVIscvi.model.MULTIVIhandling of missing protein values #2009.Fix bug in
scvi.distributions.NegativeBinomialMixture.sample()wherethetaandmuarguments were switched around #2024.Fix bug in
scvi.dataloaders.SemiSupervisedDataLoader.resample_labels()where the labeled dataloader was not being reinitialized on subsample #2032.Fix typo in
scvi.model.JaxSCVIexample snippet #2075.
Changed#
Use sphinx book theme for documentation #1673.
scvi.model.base.RNASeqMixin.posterior_predictive_sample()now outputs 3-dsparse.GCXSmatrices #1902.Add an option to specify
dropout_ratioinscvi.data.synthetic_iid()#1920.Update to lightning 2.0 #1961
Hyperopt is a new default searcher for tuner #1961
scvi.train.AdversarialTrainingPlanno longer encodes data twice during a training step, instead uses same latent for both optimizers #1961, #1980Switch back to using sphinx autodoc typehints #1970.
Disable default seed, run
scvi.settings.seedafter import for reproducibility #1976.Deprecate
use_gpuin favor of PyTorch Lightning argumentsacceleratoranddevices, to be removed in v1.1 #1978.Docs organization #1983.
Validate training data and code URLs for
scvi.hub.HubMetadataandscvi.hub.HubModelCardHelper#1985.Keyword arguments for encoders and decoders can now be passed in from the model level #1986.
Expose
local_diras a public property inscvi.hub.HubModel#1994.Use
anndata.concat()internally insidescvi.external.SOLO.from_scvi_model()#2013.scvi.train.SemiSupervisedTrainingPlanandscvi.train.ClassifierTrainingPlannow log accuracy, F1 score, and AUROC metrics #2023.Switch to cellxgene census for backend for cellxgene data function #2030.
Change default
max_cellsandtruncationinscvi.model.base.RNASeqMixin.get_importance_weights()#2064.Refactor heuristic for default
max_epochsas a separate functionscvi.model._utils.get_max_epochs_heuristic()#2083.
Removed#
Remove the ability to set up ST data in
from_rna_model, which was deprecated. ST data should be set up usingsetup_anndata#1949.Remove custom reusable doc decorator which was used for the docs #1970.
Remove
drop_lastas an integer fromAnnDataLoader, add typing and code cleanup #1975.Remove seqfish and seqfish plus datasets #2017.
Remove support for Python 3.8 (NEP 29) #2021.
Version 0.20#
0.20.3 (2023-03-21)#
Fixed#
Changed#
Allow passing in
map_locationintofrom_dir()andfrom_dir()and set default to"cpu"#1960.Updated tutorials #1966.
0.20.2 (2023-03-10)#
Fixed#
Fix
return_distdocstring ofscvi.model.base.VAEMixin.get_latent_representation()#1932.Fix hyperlink to pymde docs #1944
Changed#
Use sphinx autodoc instead of sphinx-autodoc-typehints #1941.
Remove .flake8 and .prospector files #1923.
Log individual loss terms in
scvi.module.MULTIVAE.loss()#1936.Setting up ST data in
from_rna_modelis deprecated. ST data should be set up usingsetup_anndata#1803.
0.20.1 (2023-02-21)#
Fixed#
Fixed the computation of ELBO during training plan logging when using global kl terms. #1895
Fixed usage of
scvi.train.SaveBestStatecallback, which affectedscvi.model.PEAKVItraining. If usingPEAKVI, please upgrade. #1913Fixed the original seed for jax-based models to work with jax 0.4.4. #1907, #1909
New in 0.20.0 (2023-02-01)#
Major changes#
Model hyperparameter tuning is available through
ModelTuner(beta) #1785,#1802,#1831.Pre-trained models can now be uploaded to and downloaded from Hugging Face models using the
hubmodule #1779,#1812,#1828,#1841, #1851,#1862.AnnData.varand.varmattributes can now be registered through new fields infields#1830,#1839.SCBASSET, a reimplementation of the original scBasset model, is available for representation learning of scATAC-seq data (experimental) #1839,#1844, #1867,#1874,#1882.LowLevelPyroTrainingPlanandPyroModelGuideWarmupadded to allow the use of vanilla PyTorch optimization on Pyro models #1845,#1847.Add
scvi.data.cellxgene()function to download cellxgene datasets #1880.
Minor changes#
Latent mode support changed so that user data is no longer edited in-place #1756.
Minimum supported PyTorch Lightning version is now 1.9 #1795,#1833,#1863.
Minimum supported Python version is now 3.8 #1819.
Poetry removed in favor of Hatch for builds and publishing #1823.
setup_anndatadocstrings fixed,setup_mudatadocstrings added #1834,#1837.add_dna_sequence()adds DNA sequences toAnnDataobjects using genomepy #1839,#1842.Update tutorial formatting with pre-commit #1850
Development in GitHub Codespaces is now supported #1836.
Breaking changes#
LossRecorderhas been removed in favor ofLossOutput#1869.
Bug Fixes#
JaxTrainingPlannow correctly updatesglobal_stepthrough PyTorch Lightning by using a dummy optimizer. #1791.Device-backed
AnnTorchDatasetfixed to work with sparse data #1824.Fix bug
compute_reconstruction_error()causing the first batch to be ignored, see more details in #1854 #1857.
Contributors#
Version 0.19#
New in 0.19.0 (2022-10-31)#
Major Changes#
TrainingPlanallows custom PyTorch optimizers #1747.Improvements to
JaxTrainingPlan#1747 #1749.LossRecorderis deprecated. Please substitute withLossOutput#1749All training plans require keyword args after the first positional argument #1749
JaxBaseModuleClassabsorbed features from theJaxModuleWrapper, rendering theJaxModuleWrapperobsolete, so it was removed. #1751Add
scvi.external.Tangramandscvi.external.tangram.TangramMapperthat implement Tangram for mapping scRNA-seq data to spatial data #1743.
Minor changes#
Remove confusing warning about kl warmup, log kl weight instead #1773
Breaking changes#
Bug Fixes#
Contributors#
Version 0.18#
New in 0.18.0 (2022-10-12)#
Major Changes#
Add latent mode support in
SCVI#1672. This allows for loading a model using latent representations only (i.e., without the full counts). Not only does this speed up inference by using the cached latent distribution parameters (thus skipping the encoding step), but this also helps in scenarios where the full counts are not available but cached latent parameters are. We provide utility functions and methods to dynamically convert a model to latent mode.Added
SCARas an external model for ambient RNA removal #1683.
Minor changes#
Faster inference in PyTorch with
torch.inference_mode#1695.Upgrade to Lightning 1.6 #1719.
Update the CI workflow to separate static code checking from pytest #1710.
Add Python 3.10 to CI workflow #1711.
Use sphinx-contrib-bibtex for references #1731.
get_latent_representation(): more explicit and better docstring #1732.Replace custom attrdict with
ml_collectionsimplementation #1696.
Breaking changes#
Bug Fixes#
Contributors#
Version 0.17#
New in 0.17.4 (2021-09-20)#
Changes#
Bug Fixes#
Fix
get_likelihood_parameters()failure whengene_likelihood != "zinb"inRNASeqMixin#1618.Fix exception logic when not using the observed library size in
VAEinitialization #1660.Replace instances of
super().__init__()with an argument insuper(), causingautoreloadextension to throw errors #1671.Change cell2location tutorial causing docs to build to fail #1674.
Replace instances of
max_epochsasints for new PyTorch Lightning #1686.Catch case when
torch.backends.mpsis not implemented #1692.
Contributors#
New in 0.17.3 (2022-08-26)#
Changes#
Contributors#
New in 0.17.2 (2022-08-26)#
Changes#
Move
trainingargument inJaxVAEconstructor to a keyword argument into the call method. This simplifies theJaxModuleWrapperlogic and avoids the reinstantiation ofJaxVAEduring evaluation #1580.Add a static method on the BaseModelClass to return the AnnDataManger’s full registry #1617.
Clarify docstrings for continuous and categorical covariate keys #1637.
Remove poetry lock, use newer build system #1645.
Bug Fixes#
Breaking Changes#
Fix an issue where
max_epochsis never determined heuristically for totalVI, instead it would always default to 400 #1639.
Contributors#
New in 0.17.1 (2022-07-14)#
Make sure notebooks are up to date for real this time :).
Contributors#
New in 0.17.0 (2022-07-14)#
Major Changes#
Experimental MuData support for
TOTALVIvia the methodsetup_mudata(). For several of the existingAnnDataFieldclasses, there is now a MuData counterpart with an additionalmod_keyargument used to indicate the modality where the data lives (e.g.LayerFieldtoMuDataLayerField). These modified classes are simply wrapped versions of the originalAnnDataFieldcode via the newscvi.data.fields.MuDataWrappermethod #1474.Modification of the
generative()method’s outputs to return prior and likelihood properties asDistributionobjects. Concerned modules areAmortizedLDAPyroModule,AutoZIVAE,MULTIVAE,PEAKVAE,TOTALVAE,SCANVAE,VAE, andVAEC. 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
JaxSCVI. Support for Jax remains experimental and is subject to breaking changes:Consistent module interface for Flax modules (Jax-backed) via
JaxModuleWrapper, such that they are compatible with the existingBaseModelClass#1506.JaxTrainingPlannow leverages Pytorch Lightning to factor out Jax-specific training loop implementation #1506.Enable basic device management in Jax-backed modules #1585.
Minor changes#
Add
on_load()callback which is called onload()prior to loading the module state dict #1542.Refactor metrics code and use
MetricCollectionto update metrics in bulk #1529.Add
max_kl_weightandmin_kl_weighttoTrainingPlan#1595.Add a warning to
UnsupervisedTrainingMixinthat is raised ifmax_kl_weightis not reached during training #1595.
Breaking changes#
Any methods relying on the output of
inferenceandgenerativefrom existing scvi-tools models (e.g.SCVI,SCANVI) will need to be modified to accepttorch.Distributionobjects rather than tensors for each parameter (e.g.px_m,px_v) #1356.The signature of
compute_and_log_metrics()has changed to support the use ofMetricCollection. The typical modification required will look like changingself.compute_and_log_metrics(scvi_loss, self.elbo_train)toself.compute_and_log_metrics(scvi_loss, self.train_metrics, "train"). The same is necessary for validation metrics except withself.val_metricsand the mode"validation"#1529.
Bug Fixes#
Fix issue with
get_normalized_expression()with multiple samples and additional continuous covariates. This bug originated fromgenerative()failing to match the dimensions of the continuous covariates with the input whenn_samples>1ininference()in multiple module classes #1548.Add support for padding layers in
prepare_query_anndata()which is necessary to runload_query_data()for a model setup with a layer instead of X #1575.
Contributors#
Version 0.16#
New in 0.16.4 (2022-06-14)#
Note: When applying any model using the AdversarialTrainingPlan (e.g.
TOTALVI, MULTIVI), you should make sure to use v0.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
AdversarialTrainingPlanwherekl_weightwas overwritten to 0 at each step (#1566). Users should avoid using v0.16.2 and v0.16.3, which both include this bug.
Contributors#
New in 0.16.3 (2022-06-04)#
Changes#
Removes sphinx max version and removes jinja dependency (#1555).
Breaking changes#
Bug Fixes#
Contributors#
New in 0.16.2 (2022-05-10)#
Changes#
Breaking changes#
Bug Fixes#
Contributors#
New in 0.16.1 (2022-04-22)#
Changes#
Update scArches Pancreas tutorial, DestVI tutorial (#1520).
Breaking changes#
SemiSupervisedDataLoaderandSemiSupervisedDataSplitterno longer takeunlabeled_categoryas an initial argument. Instead, theunlabeled_categoryis fetched from the labels’ state registry, assuming that theAnnDataManagerobject is registered with aLabelsWithUnlabeledObsField(#1515).
Bug Fixes#
Bug fixed in
SCANVIwhereself._labeled_indiceswas being improperly set (#1515).Fix issue where
load_query_datawould not properly add an obs column with the unlabeled category when thelabels_keywas not present in the query data.Disable extension of categories for labels in
load_query_data(#1519).Fix an issue with
prepare_query_data()to ensure it does nothing when genes are completely matched (#1520).
Contributors#
New in 0.16.0 (2022-04-12)#
This release features a refactor of DestVI (#1457):
Bug fix in cell type amortization, which leads to on par performance of cell type amortization
V_encoderwith free parameter for cell type proportionsV.Bug fix in library size in
CondSCVI, that lead to downstream dependency between sum over cell type proportionsv_indand library sizelibraryinDestVI.neg_log_likelihood_prioris not computed anymore on random subset of single cells but cell-type-specific subclustering using cluster variancevar_vprior, cluster mean, and cluster mixture proportionmp_vpriorfor computation. This leads to more stable results and faster computation time. Settingvamp_prior_pinfrom_rna_model()to the expected resolution is critical in this algorithm.The new default is to also use dropout
dropoutduring the decoder ofCondSCVIand subsequentlydropout_decoderinDestVI, we found this to be beneficial after bug fixes listed above.We changed the weighting of the loss on the variances of beta and the prior of eta.
Note
Due to bug fixes listed above this version of DestVI is not backwards
compatible. Despite instability in training in the outdated version, we were able to reproduce
results generated with this code. We therefore do not strictly encourage it to rerun old experiments.
We published a new tutorial. This new tutorial incorporates a new utility package
destvi_utils that generates exploratory plots of the
results of DestVI. We refer to the manual of this package for further
documentation.
Changes#
Breaking changes#
Support for loading legacy loading is removed from
load(). Utility to convert old files to the new file as been addedconvert_legacy_save()(#1505).
Bug Fixes#
get_likelihood_parameters()fix forn_samples > 1anddispersion="gene_cell"#1504.Fix backwards compatibility for legacy TOTALVI models #1502.
Contributors#
Version 0.15#
New in 0.15.5 (2022-04-06)#
Changes#
Bug fixes#
Contributors#
New in 0.15.4 (2022-03-28)#
Changes#
Add peakVI publication reference #1463.
Update notebooks with new install functionality for Colab #1466.
Simplify changing the training plan for pyro #1470.
Optionally scale ELBO by a scalar in
PyroTrainingPlan#1469.
Bug fixes#
Contributors#
New in 0.15.3 (2022-03-24)#
Changes#
Bug fixes#
Raise
NotImplementedErrorwhencategorical_covariate_keysare used withscvi.model.SCANVI.load_query_data(). (#1458).Fix behavior when
continuous_covariate_keysare used withscvi.model.SCANVI.classify(). (#1458).Unlabeled category values are automatically populated when
scvi.model.SCANVI.load_query_data()run onadata_targetmissing labels column. (#1458).Fix dataframe rendering in dark mode docs (#1448) - Fix variance constraint in
AmortizedLDAthat set an artificial bound on latent topic variance (#1445).Fix
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#
New in 0.15.2 (2022-03-15)#
Changes#
Remove the setuptools pinned requirement due to the new PyTorch 1.11 fix (#1436).
Switch to myst-parsed Markdown for docs (#1435).
Add
prepare_query_data(adata, reference_model)toArchesMixinto enable query data cleaning prior to reference mapping (#1441).Add Human Lung Cell Atlas tutorial (#1442).
Bug fixes#
Contributors#
New in 0.15.1 (2022-03-11)#
Changes#
Remove
labels_keyfromMULTIVIas it is not used in the model (#1393).Use scvi-tools mean/inv_disp parameterization of negative binomial for
JaxSCVIlikelihood (#1386).Use
setupfor Flax-based modules (#1403).Reimplement
JaxVAEusing inference/generative paradigm withJaxBaseModuleClass(#1406).Class docs are now one page on the docs’ site (#1415).
Copied AnnData objects are assigned a new uuid and transfer is attempted (#1416).
Bug fixes#
Contributors#
New in 0.15.0 (2022-02-28)#
In this release, we have completely refactored the logic behind our data handling strategy (i.e.
setup_anndata) to allow for:
Readable data handling for existing models.
Modular code for the easy addition of custom data fields to incorporate into models.
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 (except a
small change to 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 AnnDataManager class which
orchestrates any data processing necessary for scvi-tools and stores necessary information, rather
than adding additional fields to the AnnData input.
Schematic of data handling strategy with AnnDataManager#
We also have an exciting new experimental Jax-based scVI implementation via
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
AnnDataManager(#1237).Prevent clobbering between models using the same AnnData object with model instance specific
AnnDataManagermappings (#1342).Add
size_factor_keytoSCVI,MULTIVI,SCANVI, andTOTALVI(#1334).Add references to the scvi-tools journal publication to the README (#1338, #1339).
Addition of
scvi.model.utils.mde()(#1372) for faster visualization of scvi-tools embeddings.Furo docs theme (#1290)
Add
scvi.model.JaxSCVIandscvi.module.JaxVAE, drop Numba dependency for checking if data is count data (#1367).
Breaking changes#
The keyword argument
run_setup_anndatahas been removed from built-in datasets since there is no longer a model-agnosticsetup_anndatamethod (#1237).The function
scvi.model._metrics.clustering_scoreshas been removed due to incompatibility withnew data handling (#1237).
SCANVInow takesunlabeled_categoryas an argument tosetup_anndata()rather than on initialization (#1237).setup_anndatais now a class method on model classes and requires specific function calls to ensure properAnnDataManagersetup and model save/load. Any model inheriting fromBaseModelClasswill need to re-implement this method (#1237).To adapt existing custom models to v0.15.0, one can reference 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._CONSTANTShas been changed toscvi.REGISTRY_KEYS.setup_anndata()functions are now class functions and follow a specific structure. Please refer tosetup_anndata()for an example.scvi.data.get_from_registry()has been removed. This method can be replaced byscvi.data.AnnDataManager.get_from_registry().The setup dict stored directly on the AnnData object,
adata["_scvi"], has been deprecated. Instead, this information now lives inscvi.data.AnnDataManager.registry.The data registry can be accessed at
scvi.data.AnnDataManager.data_registry.Summary stats can be accessed at
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 functionget_state_registry().register_tensor_from_anndata()has been removed. To register tensors with no relevantAnnDataFieldsubclass, create a new subclass ofBaseAnnDataFieldand add it to appropriate model’ssetup_anndata()function.
Contributors#
Version 0.14#
New in 0.14.6 (2021-02-05)#
Bug fixes, minor improvements of docs, code formatting.
Changes#
Update black formatting to the stable release (#1324)
Refresh readme, move tasks image to docs (#1311).
Add a 0.14.5 release note to the index (#1296).
Add test to ensure extra
SCANVItraining of a pre-trainedSCVImodel does not change original model weights (#1284).Fix issue in
TOTALVIprotein 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#
New in 0.14.5 (2021-11-22)#
Bug fixes, new tutorials.
Changes#
Contributors#
New in 0.14.4 (2021-11-16)#
Bug fixes, some tutorial improvements.
Changes#
kl_weighthandling for Pyro-based models (#1242).Allow override of missing protein inference in
TOTALVI(#1251). This allows treating all 0s in a particular batch for one protein as biologically valid.Fix model history on the load with Pyro-based models (#1255).
Model construction tutorial uses new static setup anndata (#1257).
Add a codebase overview figure to docs (#1231).
Contributors#
New in 0.14.3 (2021-10-19)#
Bug fix.
Changes#
Bug fix to
BaseModelClass()to retain tensors registered byregister_tensor_from_anndata(#1235).Expose an instance of our
DocstringProcessorto aid in documenting derived implementations ofsetup_anndatamethod (#1235).
Contributors#
New in 0.14.2 (2021-10-18)#
Bug fix and new tutorial.
Changes#
Bug fix in
RNAStereoscopewhere loss was computed with mean for a minibatch instead of the sum. This ensures reproducibility with the original implementation (#1228).New Cell2location contributed tutorial (#1232).
Contributors#
New in 0.14.1 (2021-10-11)#
Minor hotfixes.
Changes#
Contributors#
New in 0.14.0 (2021-10-07)#
In this release, we have completely revamped the scvi-tools documentation website by creating a new set of user guides that provide:
The math behind each method (in a succinct, online methods-like way)
The relationship between the math and the functions associated with each model
The relationship between math variables and code variables
Our previous User Guide has been renamed to Tutorials and contains all of our existing tutorials (including tutorials for developers).
Another noteworthy addition in this release is the implementation of the (amortized) Latent Dirichlet Allocation (aka LDA) model applied to single-cell gene expression data. We have also prepared a tutorial that demonstrates how to use this model, using a PBMC 10K dataset from 10x Genomics as an example application.
Lastly, in this release we have made a change to reduce user and developer confusion by making the
previously global setup_anndata method a static class-specific method instead. This provides more
clarity on which parameters are applicable for this call, for each model class. Below is a
before/after for the DESTVI and TOTALVI model classes:
setup_anndata before and after#
Changes#
Added fixes to support PyTorch Lightning 1.4 (#1103)
Simplified data handling in R tutorials with sceasy and addressed bugs in package installation (#1122).
Moved library size distribution computation to model init (#1123)
Updated Contribution docs to describe how we backport patches (#1129)
Implemented Latent Dirichlet Allocation as a PyroModule (#1132)
Made
setup_anndataa static method on model classes rather than one global function (#1150)Used Pytorch Lightning’s
seed_everythingmethod to set seed (#1151)Fixed a bug in
PyroSampleMixinfor posterior sampling (#1158)Added CITE-seq datasets (#1182)
Added user guides to our documentation (#1127, #1157, #1180, #1193, #1183, #1204)
Early stopping now prints the reason for stopping when applicable (#1208)
Breaking changes#
setup_anndatais now an abstract method on model classes. Any model inheriting fromBaseModelClasswill need to implement this method (#1150)
Contributors#
Version 0.13#
New in 0.13.0 (2021-08-23)#
Changes#
Breaking changes#
None!
Contributors#
Version 0.12#
New in 0.12.2 (2021-08-11)#
Changes#
Updated
OrderedDicttyping import to support all Python 3.7 versions (#1114).
Breaking changes#
None!
Contributors#
New in 0.12.1 (2021-07-29)#
Changes#
Update Pytorch Lightning version dependency to
>=1.3,<1.4(#1104).
Breaking changes#
None!
Contributors#
New in 0.12.0 (2021-07-15)#
This release adds features for tighter integration with Pyro for model development, fixes for
SOLO, and other enhancements. Users of SOLO are
strongly encouraged to upgrade as previous bugs will affect performance.
Enhancements#
Add
scvi.model.base.PyroSampleMixinfor easier posterior sampling with Pyro (#1059).Add
scvi.model.base.PyroSviTrainMixinfor automated training of Pyro models (#1059).Ability to pass kwargs to
Classifierwhen usingSOLO(#1078).Ability to get doublet predictions for simulated doublets in
SOLO(#1076).Add “comparison” column to differential expression results (#1074).
Clarify
CellAssignsize factor usage. See class docstring.
Changes#
Update minimum Python version to
3.7.2(#1082).Slight interface changes to
PyroTrainingPlan."elbo_train"and"elbo_test"are now the average over minibatches as ELBO should be on scale of full data andoptim_kwargscan be set on initialization of training plan (#1059, #1101).Use pandas’ read pickle function for pbmc dataset metadata loading (#1099).
Adds
n_samples_overallparameter to functions for denoised expression/accessibility/etc. This is used in during differential expression (#1090).Ignore configure optimizers warning when training Pyro-based models (#1064).
Bug fixes#
Fix scale of library size for simulated doublets and expression in
SOLOwhen using observed library size to train originalSCVImodel (#1078, #1085). Currently, library sizes in this case are not appropriately put on the log scale.Fix issue where anndata setup with a layer led to errors in
SOLO(#1098).Fix
adataparameter ofscvi.external.SOLO.from_scvi_model(), which previously did nothing (#1078).Fix default
max_epochsofSCANVIwhen initializing using pre-trained model ofSCVI(#1079).Fix bug in
predict()function ofSCANVI, which only occurred for soft predictions (#1100).
Breaking changes#
None!
Contributors#
Version 0.11#
New in 0.11.0 (2021-05-23)#
From the user perspective, this release features the new differential expression functionality (to
be described in a manuscript). For now, it is accessible from
differential_expression(). From the developer perspective, we made changes
with respect to scvi.dataloaders.DataSplitter and surrounding the Pyro backend. Finally,
we also made changes to adapt our code to PyTorch Lightning version 1.3.
Changes#
Bug fixes#
Breaking changes#
These breaking changes do not affect the user API, though will impact model developers.
Use PyTorch Lightning data modules for
scvi.dataloaders.DataSplitter(#1061). This induces a breaking change in the way the data splitter is used. It is no longer callable and now has asetupmethod. SeeTrainRunnerand its source code, which is straightforward.No longer require training plans to be initialized with
n_obs_trainingargument (#1061).n_obs_trainingis now a property that can be set before actual training to rescale the loss.Log Pyro loss as
train_elboand sum over steps (#1071)
Contributors#
Version 0.10#
New in 0.10.1 (2021-05-04)#
Changes#
Contributors#
New in 0.10.0 (2021-04-20)#
Changes#
PeakVI minor enhancements to differential accessibility and fix scArches support (#1019)
Add DestVI to the codebase (#1011)
Versioned tutorial links (#1005)
Remove old VAEC (#1006)
Use
.numpy()to convert torch tensors to numpy ndarrays (#1016)Support backed AnnData (#1017), just load anndata with
scvi.data.read_h5ad(path, backed='r+')Solo interface enhancements (#1009)
Updated README (#1028)
Use Python warnings instead of logger warnings (#1021)
Change totalVI protein background default to
Falseis fewer than 10 proteins used (#1034)
Bug fixes#
Fix
SaveBestStatewarning (#1024)New default SCANVI max epochs if loaded with pretrained SCVI model (#1025), restore old
<v0.9behavior.Fix marginal log likelihood computation, which was only being computed on the final minibatch of a dataloader. This bug was introduced in the
0.9.Xversions (#1033).Fix bug where extra categoricals were not properly extended in
transfer_anndata_setup(#1030).
Contributors#
Version 0.9#
New in 0.9.1 (2021-03-20)#
Changes#
Update Pyro module backend to better enforce usage of
modelandguide, automate passing of number of training examples to Pyro modules (#990)Minimum Pyro version bumped (#988)
Improve docs’ clarity (#989)
Add glossary to developer user guide (#999)
Add num threads config option to
scvi.settings(#1001)Add CellAssign tutorial (#1004)
Contributors#
New in 0.9.0 (2021-03-03)#
This release features our new software development kit for building new probabilistic models. Our hope is that others will be able to develop new models by importing scvi-tools into their own packages.
Important changes#
From the user perspective, there are two package-wide API breaking changes and one
SCANVI specific breaking change enumerated below. From the method developer
perspective, the entire model backend has been revamped using PyTorch Lightning, and no old code
will be compatible with this and future versions. Also, we dropped support for Python 3.6.
Breaking change: The train method#
n_epochsis nowmax_epochsfor consistency with PytorchLightning and to better reflect the functionality of the parameter.use_cudais nowuse_gpufor consistency with PytorchLightning.frequencyis nowcheck_val_every_n_epochfor consistency with PytorchLightning.train_fun_kwargsandkwargsthroughout thetrain()methods in the codebase have been removed and various arguments have been reorganized intoplan_kwargsandtrainer_kwargs. Generally speaking,plan_kwargsdeal with model optimization like kl warmup, whiletrainer_kwargsdeal with the actual training loop like early stopping.
Breaking change: GPU handling#
use_cudawas removed from the init of each model and was not replaced byuse_gpu. By default, every model is initialized on CPU but can be moved to a device viamodel.to_device(). If a model is trained withuse_gpu=Truethe model will remain on the GPU after training.When loading saved models, scvi-tools will always attempt to load the model on GPU unless otherwise specified.
We now support specifying which GPU device to use if there are multiple available GPUs.
Breaking change: SCANVI#
SCANVIno longer pretrains anSCVImodel by default. This functionality however is preserved via the newfrom_scvi_model()method.n_epochs_unsupervisedandn_epochs_semisupervisedhave been removed fromtrain. It has been replaced withmax_epochsfor semisupervised training.n_samples_per_labelis a new argument which will subsample the number of labeled training examples to train on per label each epoch.
New Model Implementations#
CellAssignimplementation (#940)RNAStereoscopeandSpatialStereoscopeimplementation (#889, #959)Pyro integration via
PyroBaseModuleClass(#895 #903, #927, #931)
Enhancements#
TOTALVI,SCVI, andSCANVInow support multiple covariates (#886)Added callback for saving the best state of a model (#887)
Option to disable progress bar (#905)
load() documentation improvements (#913)
updated tutorials, guides, documentation (#924, #925, #929, #934, #947, #971)
the track is now public (#938)
get_likelihood_parameter() bug (#967)
model.history is now pandas DataFrames (#949)
Contributors#
Version 0.8#
New in 0.8.1 (2020-12-23)#
Enhancements#
freeze_classifieroption inload_query_data()for the case whenweight_decaypassed totrain()also passes toClassifierTrainer
New in 0.8.0 (2020-12-17)#
Enhancements#
Online updates of SCVI, SCANVI, and TOTALVI with the scArches method #
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. 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
find few 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 exchanged
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 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 the observed library size option#
Many of our models like SCVI, SCANVI, and 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
TOTALVImodels 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 distribution for
TOTALVIis 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_anndataare now stored inadata.uns["_scvi"]["protein_names"], instead ofadata.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)
SCANVImodels will fail.
Version 0.7#
New in 0.7.1 (2020-10-20)#
This small update provides access to our new Discourse forum from the documentation.
New in 0.7.0 (2020-10-14)#
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.
GeneExpressionDatasetand associated classes have been removed.Built-in datasets now return
AnnDataobjects.scvi-toolsnow relies entirely on the [AnnData] format.scvi.modelshas been moved toscvi.core.module.Posteriorclasses have been reduced to wrappers onDataLoadersscvi.inferencehas been split toscvi.core.data_loadersforAnnDataLoaderclasses andscvi.core.trainersfor trainer classes.Usage of classes like
TrainerandAnnDataLoadernow require theAnnDatadata object as input.
Pre-Version 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#
0.6.7 (2020-8-05)#
0.6.6 (2020-7-08)#
add tqdm to within cluster DE genes @adam
restore tqdm to use a simple bar instead of ipywidget @adam
move to numpydoc for docstrings @adam
update issues templates @adam
Poisson variable gene selection @valentine-svensson
BrainSmallDataset set default save_path_10X @gokcen-eraslan
train_size must be a float between 0.0 and 1.0 @galen
bump dependency versions @galen
remove reproducibility notebook @galen
fix scanVI dataloading @pierre
0.6.5 (2020-5-10)#
0.6.4 (2020-4-14)#
add back Python 3.6 support @adam
get_sample_scale() allows gene selection @valentine-svensson
bug fix to the dataset to anndata method with how cell measurements are stored @adam
fix requirements @adam
0.6.3 (2020-4-01)#
bug in the version for Louvain in setup.py @adam
0.6.2 (2020-4-01)#
update highly variable gene selection to handle sparse matrices @adam
update DE docstrings @pierre
improve posterior save load to also handle subclasses @pierre
Create NB and ZINB distributions with torch and refactor code accordingly @pierre
typos in autozivae @achille
bug in csc sparse matrices in anndata data loader @adam
0.6.1 (2020-3-13)#
0.6.0 (2020-2-28)#
0.5.0 (2019-10-17)#
do not automatically upper case genes @adam
AutoZI @oscar
Made the intro tutorial more user-friendly @adam
Tests for LDVAE notebook @adam
fix compatibility issues with sklearn and numba @romain
fix Anndata @francesco-brundu
docstring, totalVI, totalVI notebook and CITE-seq data @adam
fix type @eduardo-beltrame
fixing installation guide @jeff
improved error message for dispersion @stephen-flemming
0.4.1 (2019-08-03)#
0.4.0 (2019-07-25)#
gimVI @achille
synthetic correlated datasets, fixed bug in marginal log likelihood @oscar
autotune, dataset enhancements @gabriel
documentation @jeff
more consistent posterior API, docstring, validation set @adam
fix anndataset @michael-raevsky
linearly decoded VAE @valentine-svensson
support for scanpy, fixed bugs, dataset enhancements @achille
fix filtering bug, synthetic correlated datasets, docstring, differential expression @pierre
better docstring @jamie-morton
classifier based on library size for doublet detection @david-kelley
0.3.0 (2019-05-03)#
corrected notebook @jules
support for batch indices in csvdataset @primoz-godec
speeding up likelihood computations @william-yang
better anndata interop @casey-greene
early stopping based on classifier accuracy @david-kelley
0.2.4 (2018-12-20)#
updated to torch v1 @jules
added stress tests for harmonization @chenling
fixed autograd breaking @romain
make removal of empty cells more efficient @john-reid
switch to os.path.join @casey-greene
0.2.2 (2018-11-08)#
0.2.0 (2018-09-04)#
annotation notebook @eddie
Memory footprint management @jeff
updated early stopping @max
docstring @james-webber
0.1.6 (2018-08-08)#
0.1.5 (2018-07-24)#
0.1.3 (2018-06-22)#
0.1.2 (2018-06-13)#
0.1.0 (2017-09-05)#
First scVI TensorFlow version @romain