torchcell.trainers.dcell_regression_slim.DCellRegressionSlimTask
- class DCellRegressionSlimTask(models: dict[str, Module], target: str, boxplot_every_n_epochs: int = 10, learning_rate: float = 0.001, weight_decay: float = 1e-05, batch_size: int | None = None, alpha: float = 0.3, *, aux_reduction: Literal['sum', 'mean'], **kwargs: Any)[source]
Bases:
LightningModuleLightningModule for training models on graph-based regression datasets.
- setup(stage: str | None = None) None[source]
Move all submodels to the active device at the start of each stage.
- forward(batch: HeteroData) dict[str, Tensor][source]
Run the batch through the DCell subsystems and linear head.
- training_step(batch: HeteroData, batch_idx: int) Tensor[source]
Run a manual training step and log loss plus subsystem and root metrics.
- on_train_epoch_end() None[source]
Log and reset the subsystem and root training metrics at epoch end.
- validation_step(batch: HeteroData, batch_idx: int) None[source]
Run a validation step and update subsystem and root metrics.
- on_train_epoch_start() None[source]
Log the checkpoint the previous epoch saved, if it is a new best.
- test_step(batch: HeteroData, batch_idx: int) None[source]
Run a test step and update subsystem and root metrics.