You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow a subflow to be saved as a reusable, parameterized component definition and instantiated multiple times across diagrams. Definitions should expose a formal interface while hiding their internal graph, similar to PrototypeML blocks.
A reusable ResidualBlock, for example, should declare named ports and public parameters once, then be instantiated with different bindings without copying and manually maintaining its internal nodes.
Introduce a versioned component format such as .nnm-component.json containing:
schema version, component ID, name, description, and component version;
named input/output port definitions;
typed public parameters with defaults and validation;
private/local variables;
the internal nodes, edges, and nested component references;
optional documentation and preview metadata.
Diagrams keep a shared componentDefinitions table. Component instances reference a definition ID/version and store only instance name, position, port connections, and parameter bindings. This avoids duplicating the same internal graph for every instance while keeping the diagram self-contained.
Each instance creates independent PyTorch modules and weights. Weight sharing is never implicit.
Overview
Allow a subflow to be saved as a reusable, parameterized component definition and instantiated multiple times across diagrams. Definitions should expose a formal interface while hiding their internal graph, similar to PrototypeML blocks.
A reusable
ResidualBlock, for example, should declare named ports and public parameters once, then be instantiated with different bindings without copying and manually maintaining its internal nodes.Dependencies
Definition and instance model
Introduce a versioned component format such as
.nnm-component.jsoncontaining:Diagrams keep a shared
componentDefinitionstable. Component instances reference a definition ID/version and store only instance name, position, port connections, and parameter bindings. This avoids duplicating the same internal graph for every instance while keeping the diagram self-contained.Each instance creates independent PyTorch modules and weights. Weight sharing is never implicit.
Parameters and encapsulation
Version and update semantics
Detachaction converts one instance into a normal editable local subflow.UX
Compilation and packaging
convert.pyand the Python runtime instantiate each component independently.Acceptance criteria
.nnm-component.jsondefinition.Out of scope