Closed NeZanyat closed 5 years ago
I have seen this error before too. My hackish workaround.
Even better again, would be to find the code that creates current injection dictionaries, without adding a inject_square_current
key.
if 'injected_square_current' in self.params.keys():
current = self.params.copy()['injected_square_current']
else:
temp = self.params
self.params['injected_square_current'] = temp
I think this is fixed in the dev branch. I would prefer that the changes made there be pulled back into the dash branch, rather than have conflicting fixes. I will handle it this week.
@NeZanyat Could you give a minimal example to reproduce this, so I make sure that I've fixed it?
Sure. Here is the example
https://github.com/NeZanyat/neuronunit/blob/dash/param_error.ipynb
@NeZanyat I think the relevant fix is in 85b706cfde0b70e44a89f67a3db9fe73b435b4ef in the dev branch, but it was difficult to try to figure out if any other commits were needed, so I just merged dev and dash completely. This could introduce new problems, but almost all of the dev commits were about optimization or direct simulation with NEURON and so shouldn't change much here. I also merged sciunit's dev and dash to match.
You can see a working version of something like your notebook above (with additional features to demonstrate what should work) here.
Let me know if this runs for you, and then what else breaks as a result of the merge.
Branch: dash
Error:
My guess is that it happens because parameters which was set here https://github.com/scidash/neuronunit/blob/dash/neuronunit/tests/fi.py#L25
are redefined at parent's init method here: https://github.com/scidash/sciunit/blob/dash/sciunit/tests.py#L33