nvalchemi.training.distillation.default_distillation_fn#

nvalchemi.training.distillation.default_distillation_fn(models, batch)[source]#

Run the student forward pass and prefix output keys with predicted_.

The teacher is never called here: teacher knowledge reaches the loss as teacher_* batch fields, either written offline by label_dataset() or attached to the batch by DistillationStrategy.attach_teacher_labels().

Parameters:
  • models (Mapping[str, BaseModelMixin]) – Named models of the strategy; only "student" is read.

  • batch (Batch) – Input batch of atomic graphs.

Returns:

Predictions keyed by predicted_<output_name> with None outputs omitted.

Return type:

dict[str, torch.Tensor]