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_epochs
is nowmax_epochs
for consistency with PytorchLightning and to better relect the functionality of the parameter.use_cuda
is nowuse_gpu
for consistency with PytorchLightning.frequency
is nowcheck_val_every_n_epoch
for consistency with PytorchLightning.train_fun_kwargs
andkwargs
throughout thetrain()
methods in the codebase have been removed and various arguments have been reorganized intoplan_kwargs
andtrainer_kwargs
. Generally speaking,plan_kwargs
deal with model optimization like kl warmup, whiletrainer_kwargs
deal with the actual training loop like early stopping.
Breaking change: GPU handling#
use_cuda
was removed from the init of each model and was not replaced byuse_gpu
. By default every model is intialized on CPU but can be moved to a device viamodel.to_device()
. If a model is trained withuse_gpu=True
the 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
#
SCANVI
no longer pretrains anSCVI
model by default. This functionality however is preserved via the newfrom_scvi_model()
method.n_epochs_unsupervised
andn_epochs_semisupervised
have been removed fromtrain
. It has been replaced withmax_epochs
for semisupervised training.n_samples_per_label
is a new argument which will subsample the number of labelled training examples to train on per label each epoch.
New Model Implementations#
CellAssign
implementation (#940)RNAStereoscope
andSpatialStereoscope
implementation (#889, #959)Pyro integration via
PyroBaseModuleClass
(#895 #903, #927, #931)
Enhancements#
TOTALVI
,SCVI
, andSCANVI
now 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)
track is now public (#938)
get_likelihood_parameter() bug (#967)
model.history are now pandas DataFrames (#949)