lava
lava copied to clipboard
Composable Process features
User story
As a user, I would like to combine multiple features into a Lava Process on-the-fly to reduce code duplication and make Processes more modular.
Conditions of satisfaction
- When a Process is composed of multiple features, it has the combined interfaces required for all features (all their Ports and Vars).
- When a Process is composed, its behavior at the ProcessModel level is a combination of all features.
- The API of Processes has not become more complicated.
- Present API prototype to a wider audience
- Composition of Processes has been applied to at least one Process in Lava (e.g.,
DenseandLearningDense). - A Jupyter tutorial explains how to use this new feature.
- The test coverage of the newly added module is >95%.
- The code has been reviewed and is merged into
main.
Acceptance tests
- Test composing a Process with two features that can be combined.
- Test composing a Process with two features that can not be composed because they are incompatible (e.g., the feature "learning" with a LIF neuron).
- Test composing a Process with two features that have a name clash between their Ports or Vars.
- Test composing three features into a Process.
- Test composing a Process with something that is not a "feature".
- Test or think about whether ProcessModels with different protocols are a problem for composition.
- Test or think about whether ProcessModels for different hardware backends are a problem for composition.
Stories
- [x] #558
Most generally, we want to compose 'features'. I would leave it open at this point whether we want to be able to compose entire processes. If we have a "Dense" Proc, then the 'thing' that makes it 'learning' is not a standalone Proc. It's just something that may add tags, a learning rule API and traces.
Good point! I updated the story accordingly.