EvSys

ForwardBackwardResult

What forward_backward_*_async resolves to.

Tinker's own ForwardBackwardOutput is opaque (pydantic with no public attrs in the installed version), so consumers go through the loss_fn_outputs field on the actual response. The Protocol here lists what the loop reads so the contract is explicit; MockBackend constructs duck-typed objects.

Attributes

attributeloss_fn_outputslist[dict[str, Any]]

One entry per Datum. Each carries algorithm-specific keys - "logprobs" for cross_entropy, "loss" / "advantage_sum" for IS, etc.

On this page