How to capture exception generated by runtime.initialize() #668
Replies: 1 comment
-
HI @waltergallegog. In the above example you are trying to access private APIs and Lava was not designed to work in this way. Also, the error message you are trying to capture is from nxcore, the hardware interface to Loihi. While nxcore errors are visible, they are not part of the same call stack due to the way lava-loihi and nxcore communicate and the specific error seems poorly written to pass any information back up the stack:
I'd suggest you instantiate your runtime with higher logging level like this:
You might get useful output here that you could use to decide if the test is possible. However, I think the real problem is that the runtime does not know about the You could probably setup a pretest that tries to initialize and run with the intended config and have that fail fast if you receive the |
Beta Was this translation helpful? Give feedback.
-
Hello,
Is it possible to capture exceptions generated when calling
runtime.initialize()
due to issues during the building ?In my case, I'm testing a network in Loihi2 which does not fit in the Loihi2 hardware (I'm using a number of layers higher than the limit).
The log shows that an assertion error is raised:
However, I can not capture this exception from my code. I want to capture the exception to understand if the initialization has been successful before calling
runtime.start()
.I guess the issue is in how the exceptions are handled in the
MultiProcessing
message passage interface, but I'm not sure how it works exactly and how can I use it.This is what I'm trying:
Thanks!
PS: I'm posting this here instead of sending an email as it seems more related to the lava framework (runtime, builders, MultiProcessing) than to the specifics of the loihi2 builder.
Beta Was this translation helpful? Give feedback.
All reactions