EvSys

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) -> TrainingBatch

Produce the batch for step_idx (0-based).

paramself
paramstep_idxint

Returns

evsys_sdk.training.loop.TrainingBatch
funcstep_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).

paramself
paramstep_idxint
parambatchTrainingBatch
paramfb_resultAny

Returns

dict[str, float]

On this page