-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Arbor internal syntax parser is coded in bluepyopt #494
Comments
Hi @anilbey, I found this by accident and as the resident Arbor person I thought I'd offer a hand. @lukasgd has made the BluePyOpt The API, including the parsers, are public. You'll find them by looking for |
Hi @thorstenhater thanks for offering your help. I will not be around (I am leaving soon) but the maintainers of BPO can help. |
Hi @anilbey and @thorstenhater, Thanks for bringing this up in an issue. I think there's a bit a misunderstanding with the purpose of the This functionality is necessary so that BluePyOpt can export models that can be run with Arbor and, therefore, also support Arbor as an optimization backend. When writing the ACC exporting infrastructure, I tried to stay as consistent as possible with the HOC/Neuron code, so that BluePyOpt could be used as a frontend to these different simulator backends. As such, it needs to be able to export model state to drive optimizations and store results. Having said this, I see your concern of having the exported format getting out of date with what Arbor expects. At the moment the tox tests on my system (Python 3.10) are still succeeding as I installed Arbor as a dependency through pip (v0.9.0), but the current main branch should introduce an exception as Thorsten says above. I believe this should already be visible in CI currently, since e.g. simplecell_arbor.ipynb is executed as part of it. The fix may then be done in the templates at bluepyopt/ephys/templates/acc. To regenerate the test data, you can use the Back when Arbor support was added, we did not add
which currently still works on my system. Probably more important would be to add additional
l5pc in that file, you'll see that the test checks for string equality of the label_dict and decor ACC files. It think it wouldn't harm to add more checks below, such as an arbor.load_component on these files. This would then guarantee that all three exported models - simplecell, l5pc and expsyn - are parsable in Arbor, so a faulty iexpr in l5pc would be caught in CI.
|
We also add a regular run of a simple BPO script to Arbor's CI to ensure we do not break you code. |
Hi @thorstenhater @lukasgd , it looks like since the new 0.10 arbor release, our tests here on BluePyOpt do not pass anymore. Is this related to this issue or is it something new? |
Hi @AurelienJaquier, it seems your tests are using a fixed Best, |
Is there maybe an automatic converter from the old format to the newer? |
No, currently not. A
Btw, this is precisely what I warned about on 20th of June. |
I opened a PR to make BluePyOpt compatible with latest arbor and make the tests pass: #498 |
Hi @AurelienJaquier, thanks for your work! I'm just having a brief look (would have more time in a month). I think you've correctly identified the There are some other changes to morphology (only for SWC) and protocols (stimulus envelope, units) that I'm not sure if they are required for compatibility. Did something not work there before? Also, to return to the earlier point about checking compatibility in tests - have you considered adding |
Hi @lukasgd thank you for checking my PR.
About the load_component tests, I have added the one depending on iexpr, as you described above. Could you have a look and tell me if it looks ok to you? I would like to be sure I am doing it correctly before doing the other ones (singlecell, l5pc and expsyn) |
Hi @AurelienJaquier, we made some changes to our I/O support.
Thus, all loaders share one interface and do more for the user. Units is also a new feature in v0.10.0, requiring the explicit use of a unit at the interface level. Since BluePyOpt+Arbor already depends on Arbor, is using something like this an option?
This will use our internal serialization to |
W.r.t. using Arbor for serialization vs. templates, see #498 (comment). For the iexpr loading test @AurelienJaquier, I think you could already stop at the line To check the examples, you could add an
|
This module for parsing Arbor syntax is part of BluePyOpt. Changes in newer versions of Arbor cannot be reflected in this module because it is integrated within BluePyOpt. To ensure BluePyOpt remains up-to-date with the latest Arbor versions, this module should be imported directly from Arbor.
BluePyOpt/bluepyopt/ephys/parameterscalers/acc_iexpr.py
Line 27 in aff67f8
The text was updated successfully, but these errors were encountered: