nvalchemi.training.ComposedLossOutput#
- class nvalchemi.training.ComposedLossOutput[source]#
Output returned by
ComposedLossFunction.This is solely used as a type hint, and not as a concrete data structure; it’s used to signal to users that the emitted dict from composed losses will always at least contain the keys within this
TypedDict.The mapping always contains
total_lossand four per-component sub-mappings keyed by component name.per_component_unweightedholds each raw component loss before multiplication by its effective weight.per_component_weightholds the effective (possibly normalized) weight actually applied to each component at this call;per_component_raw_weightholds the pre-normalization resolved weight — identical toper_component_weightwhennormalize_weights=Falseand useful for logging the underlying schedule value regardless of normalization.per_component_samplecarries per-component weighted per-sample loss tensors of shape(B,), detached; seeBaseLossFunction.per_sample_lossfor the per-leaf populate-or-skip contract.