torchcell.trainers.dcell_regression.DCellRegressionTask
- class DCellRegressionTask(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, train_wt_diff: bool = True, *, aux_reduction: Literal['sum', 'mean'], **kwargs: object)[source]
Bases:
LightningModuleLightningModule for training models on graph-based regression datasets.
- setup(stage: str | None = None) None[source]
Move submodels to device and init prediction/true-value buffers.
- forward(batch: HeteroData) dict[str, Tensor][source]
Run the DCell subsystem and linear heads, returning per-node outputs.
- training_step(batch: HeteroData, batch_idx: int) Tensor[source]
Run a manual-optimization training step and log loss and metrics.
- validation_step(batch: HeteroData, batch_idx: int) None[source]
Run a validation step, logging loss/metrics and storing predictions.
- on_validation_epoch_end() None[source]
Log val metrics and, on plotting epochs, the root-prediction box plot.
- 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 log loss, regression metrics, and correlations.