pyrovelocity._trainer#

class pyrovelocity._trainer.EnumTrainingPlan(pyro_velocity, optim=None)[source]#

Bases: PyroTrainingPlan

__init__(pyro_velocity, optim=None)[source]#
training_epoch_end(outputs)[source]#
training_step(batch, batch_idx, optimizer_idx=0)[source]#
validation_epoch_end(outputs)[source]#

Aggregate validation step information.

validation_step(batch, batch_idx)[source]#
class pyrovelocity._trainer.VelocityAdam(*args, **kwargs)[source]#

Bases: ClippedAdam

step(closure=None)[source]#
Return type:

Optional[Any]

pyrovelocity._trainer.VelocityClippedAdam(optim_args)[source]#

Wraps pyro.optim.clipped_adam.ClippedAdam with PyroOptim.

Return type:

PyroOptim

class pyrovelocity._trainer.VelocityTrainingMixin[source]#

Bases: object

train(use_gpu=0, early_stopping=False, seed=99, lr=0.001, train_size=1.0, valid_size=0.0, batch_size=256, max_epochs=100, check_val_every_n_epoch=1, patience=10, min_delta=0.0, **kwargs)[source]#
train_faster(use_gpu=0, seed=99, lr=0.01, max_epochs=5000, log_every=100, patient_init=45, patient_improve=0.001)[source]#

this method input all adata input gpu for faster IO, increase larger dataset by 5-6 fold, however should not be used for >20k cells with less than 40GB GPU memory, this ignores validation cells

Return type:

List[float]

train_faster_with_batch(use_gpu=0, seed=99, lr=0.01, max_epochs=5000, log_every=100, indices=None, batch_size=None, new_valid_guide=None, patient_init=45, patient_improve=0.0, elbo_name='-ELBO')[source]#