Repository navigation
v0.14.1
- Execution stages are now a class-level declaration.
Nodegains
EXECUTION_STAGES: frozenset[ExecutionStage](default{ALWAYS}) beside_category/
_tags; a subclass declares its stages on the class body (a set literal or stage names are
normalized to a frozenset at class creation, invalid entries raise at import) and no longer
needs to re-plumb anexecution_stagesdefault through every__init__. The constructor
argument stays as the per-instance override, which is what a pipeline yaml's
hparams: {execution_stages: [inference]}reaches throughPipelineFactory; string values
are coerced and an unknown name ([Inference],[infer]) raisesValueErrornaming the node
instead of silently never running it.node.execution_stagesis a read-only property
returning the frozenset; assigning to it raisesAttributeErrorunless the subclass opts in
withEXECUTION_STAGES_MUTABLE = True.Node.get_execution_stages()mirrors
get_category()/get_tags().consume_base_kwargsis unchanged and still works.
Breaking for code that assignednode.execution_stages = {...}after construction
(two example scripts in cuvis-ai-unet do): pass the stages to the constructor, or declare the
class mutable.should_execute, serialization (stages are still not part ofhparams) and the
pipeline's stage pruning are unchanged.
What's Changed
- Declare execution stages on the node class by @nghorbani in #70
Full Changelog: v0.14.0...v0.14.1