De-duplicate variables#35
Conversation
|
I am closing PR #34; this PR subsumes it completely and seems to not include the bug you noticed. |
|
Still get this: |
|
The missing case is (Cmp::Gt, Cmp::Eq) In general the following cases seem to be missing there: |
|
These should be the cases that we rewrite into some other form, right?
|
|
Could you provide me an input that triggers the problem? |
|
So, there were some missing and honestly plain incorrect cases in there. Please double check again. |
|
Seems like I missed the github notifications. The input that triggered the problem was Hay et al 2011. The missing cases problem is solved now. With the new version, I get this: which looks like a quotation error. But raising a string is also not possible in Python. Maybe: |
|
If I fix this in main.py the resulting voltage trace is also completely wrong (settles to -85) |
|
Oh dear. |
|
The only differences in the mod files are things like 101,105c73
< if (gates_h_forwardRate_x == 0) {
< gates_h_forwardRate_r = 0.09000000357627869
< } else {
< gates_h_forwardRate_r = 0
< }
---
> gates_h_forwardRate_r = 0.09000000357627869which I guess means that the previous case was wrong and that it's now fixed? So I suspect it's the input generator that's broken |
|
No, this is an honest to god bug, we want to reduce redundant variables like to What you observe is a unrelated and wrong. |
|
Here def event_generators(self, gid):
res = []
if gid in self.gid_to_inputs:
for seg, frac, inp in self.gid_to_inputs[gid]:
tag = f'(on-components {frac} (region \"{seg}\"))'
if inp in self.poisson_generators:
syn, avg, wgt = self.poisson_generators[inp]
res.append(A.event_generator(f'syn_{syn}@seg_{seg}_frac_{frac}', wgt, A.poisson_schedule(0, avg, gid)))
if inp in self.regular_generators:
raise 1
return resThe tag variable is unused |
|
Fixed the Python template, it's now the same as the CXX template. |
gid_to_cell is a list and doesnt need the int(k):v thing |
|
Apart from that, Hay et al. works as expected again |
|
👍 |
Still need to remove the .items() call |
|
main.cxx also contains a lot of things like this: which also looks like quotation errors |
|
Python code now works. For C++ via run.sh I still get: |
|
If I put I get this error: which might be related to the nlohman_json version. Still, 3.10 is the Ubuntu 22 LTS default and as such I think we should support it |
|
This does work: gid_to_cell = data["gid_to_cell"].get<decltype(gid_to_cell)>();Now when I do this: I get: which is 'logical' given that I should have typed |
|
Another bug: if you execute main.py from another directory than where main.py resides it will fail. Arbor-build-catalogue creates the local-catalogue.so file in the current directory, but then main.py will try to load it from the |
| match child.tag_name().name() { | ||
| "MultiInstantiate" => body.push(ForEachBody::MultiInstantiate(MultiInstantiate::from_node(&child))), | ||
| t => panic!("Unexpected tag {t} in body of ForEach.") | ||
| t => panic!("Unexpected tag {} in body of ForEach.", t) |
| pub cat_prefix: String, | ||
| } | ||
|
|
||
| pub fn export(lems: &LemsFile, nml: &[String], ions: &[String], cfg: Bundle) -> Result<()> { |
There was a problem hiding this comment.
Bundle cfg is a good idea
|
Another bug when trying to convert the GLC network: which is the line let threshold = cell_to_threshold[pre_cell_id];where Adding a continue statement later leads to |
|
Hi @llandsmeer as you note C++ support is still pretty rough. It also won't work without running the Python code first. Regarding the Poisson Input problem, this arise since nmlcc doesn't model Spike Source Cells, yet. |
…arse delay and weight from parameters, not attributes. Duh.
No description provided.