pipeline.diff.validate_soft_tree
def validate_soft_tree(root: object, states: dict[str, State], lifecycle: object) -> NoneRaise if the differentiable tree still contains a hard component.
Run after :func:`walk_swap` / :func:`walk_swap_states` to catch
user-defined containers the structural recursion missed, or hard
Assignment subclasses tucked behind a non-default Associate. The
check keeps differentiable training honest: a caller seeing a NaN
loss can rule out a silently-retained hard node.
Parameters
| Name | Type | Description |
|---|---|---|
| root | object | Stage-tree root after the swap. |
| states | dict[str, State] | State mapping after the swap. |
| lifecycle | object | Lifecycle node after the swap. |
Raises
- TypeError — If any forbidden hard node survives.
Source: unitrack/pipeline/diff.py:273