TrainingBatch
One step's worth of training data + loss spec.
Constructed by a :class:StepBuilder per step. The loop hands data
to the backend along with loss_fn and loss_fn_config.
Attributes
attributedatalist[tinker.Datum]attributeloss_fntinker.types.LossFnType | LossCallableEither a tinker-recognised string name ("cross_entropy" /
"importance_sampling" / ...) for a server-side loss, OR a Python
callable for a client-side custom loss. The loop dispatches the right
backend method based on the type.
attributeloss_fn_configdict[str, Any] | None= NoneOnly used when loss_fn is a string.
attributemetricsdict[str, float]= field(default_factory=dict)Algorithm-precomputed per-step metrics (e.g. teacher entropy, reward stats). Merged into the per-step log row.
Functions
func__init__(self, data, loss_fn, loss_fn_config=None, metrics=dict()) -> Noneparamselfparamdatalist[tinker.Datum]paramloss_fntinker.types.LossFnType | LossCallableparamloss_fn_configdict[str, Any] | None= Noneparammetricsdict[str, float]= dict()Returns
None