StepBuilder
The only thing each algorithm overrides.
Owns data shaping + per-step metrics. Owns nothing about checkpointing / logging / eval / resume.
Functions
funcbuild_batch(self, step_idx) -> TrainingBatchProduce the batch for step_idx (0-based).
paramselfparamstep_idxintReturns
evsys_sdk.training.loop.TrainingBatchfuncstep_metrics(self, step_idx, batch, fb_result) -> dict[str, float]Compute per-step metrics from the forward-backward result.
fb_result is what the backend's
forward_backward_*_async() future resolved to. For
MockBackend it's a duck-typed
:class:~evsys_sdk.training.backend.ForwardBackwardResult; for
TinkerBackend it's the native tinker.ForwardBackwardOutput.
The StepBuilder is free to inspect fb_result.loss_fn_outputs
(one entry per Datum).
paramselfparamstep_idxintparambatchTrainingBatchparamfb_resultAnyReturns
dict[str, float]