Concepts¶
Most ML projects do not become difficult because torch.nn.Module is difficult. They become difficult because dataset handling, model wiring, training, evaluation, logging, and export gradually turn into project-specific glue code.
A reusable project template helps with folders, but it still encourages copying implementations between projects. NexuML takes a different approach: reusable pieces live in libraries, while a scenario composes those pieces into an explicit experiment.
The design borrows the useful part of block-based systems such as Simulink: reusable blocks, explicit inputs/outputs, clear data flow, and per-block configuration, while keeping the implementation in normal Python/PyTorch code.
The core concepts¶
- Mental model — define → persist → materialize → run.
- Architecture — typed definitions, runtime construction, persistence, and ownership boundaries.
- TensorDict data flow — the named tensor container connecting pipeline blocks.
- Scenarios and configuration — how data, pipeline, training, evaluation, and execution are composed.
- Components and discovery — why Python uses concrete definitions while registry identities remain stable for discovery/YAML.
- Coming from Lightning — mapping from familiar Lightning concepts.
- Pipeline diagrams — visualizing the compiled graph.
- Library discovery — built-in, installed, and local component libraries.
A useful shorthand¶
If you remember only four things:
- ScenarioSpec describes the experiment.
- Typed definitions describe reusable components.
- TensorDict keys make the pipeline flow explicit.
- Lightning runs the lifecycle after NexuML materializes the graph.
For hands-on learning, use the Tutorials instead of reading every concept page first.