lava-nc / lava

A Software Framework for Neuromorphic Computing
https://lava-nc.org
Other
555 stars 143 forks source link

Access to process name during initialization for all AbstractProcess children #804

Open ngr-francesco opened 11 months ago

ngr-francesco commented 11 months ago

User story

I am currently working on the Brian2Lava project to bring together the UX of Brian with the backend of Lava. For debugging purposes we name every process we create with the same naming convention used in Brian. While implementing a new feature which requires the initialization of a RingBuffer, I noticed that the RingBuffer __init__ method does not accept a name argument. I suspect this might be the case for other AbstractProcesses , too. At the same time by printing ring_buffer.name returns a name using the convention Process_N, which implies that as expected the attribute is present, but the user is simply not allowed to set it at initialization. Even though a workaround is easily implemented, I believe adding this feature should be relatively straightforward, and it would be useful for our team. As a separate small question/comment, why are there two versions of RingBuffer (in the io.source and io.sink modules) with different use cases and not two classes with different names, since they have different jobs?

Conditions of satisfaction

Acceptance tests

PhilippPlank commented 10 months ago

Thank you for pointing that inconsistencies out. I guess nothing speaks against adding a name parameter to the RingBuffer and setting it for the AbstractProcess which always has it anyways. If you want that feature, feel free to start a PR.

ngr-francesco commented 10 months ago

Okay, I'll get to it in the next days