lava
lava copied to clipboard
Current Monitor API needs to be updated
Objective of issue: Current Monitor API need to be updated to take into account new design of Monitors
Lava version:
- [x] 0.4.0 (feature release)
- [ ] 0.3.1 (bug fixes)
- [ ] 0.3.0 (current version)
- [ ] 0.2.0
- [ ] 0.1.2
I'm submitting a ...
- [ ] bug report
- [X] feature request
- [ ] documentation request
Current behavior:
- There is only one Monitor class,
- That can monitor only one Var or OutPort of a single Process
- User need to use get_data() function to create a data structure of collected data, which then can only be access by process name and Var/OutPort name combination (string) .e.g.
data1 = monitor1.get_data()data2 = monitor2.get_data()volt_data = data1[neuron.name][neuron.v.name]spike_data = data2[neuron.name][neuron.s_out.name]
Expected behavior:
- In the new design we will have multiple classes (e.g. Recorder, Live Streamer, etc.) inherited from an abstract Monitor class.
get_data()function should accept the Var or OutPort and directly return the datadata_v = recorder.get_data(neuron1.v)- Monitors will be able to probe with some time offset and interval with the following API:
recorder.probe(neuron.v, interval=2, offset=0) - Multiple Var probing should be done by roving list of Vars to the
probe()funtion:recorder.probe([neuron1.v, neuron2.v])