nodes
Chain node definitions.
A stage node is one step of a unit of work: it names the kind of work, the lane capability it requires, and the generation-progress states that mark the stage starting and finishing. One generation object flows through all of the stage nodes of its chain; the generation's progress is the odometer and the chain is the routing plan.
ChainNodeHandle
dataclass
An opaque, hashable reference to a node within a chain flow.
Source code in horde_sdk/worker/chaining/nodes.py
name
instance-attribute
The unique (within a flow) name of the node this handle refers to.
ChainStageNode
dataclass
A stage of a unit of work, bound to a lane capability.
Stage completion is defined as the generation reaching completion_progress; the stage is considered started
when the generation reaches entry_progress.
Source code in horde_sdk/worker/chaining/nodes.py
entry_progress
instance-attribute
The generation progress value that marks this stage as executing.
completion_progress
instance-attribute
The generation progress milestone that marks this stage as completed.
required_capability
class-attribute
instance-attribute
The lane capability required to execute this stage, or None when the orchestrating process handles it.
optional
class-attribute
instance-attribute
Whether the stage may be skipped without failing the chain.
__init__
__init__(
name: str,
kind: CHAIN_NODE_KIND,
entry_progress: GENERATION_PROGRESS,
completion_progress: GENERATION_PROGRESS,
required_capability: CHAIN_CAPABILITY | None = None,
optional: bool = False,
) -> None
__post_init__
Validate the node definition.
Raises:
-
ValueError–If the name is empty or entry and completion progress are the same state.