Thanks Pooja.

 

My problem was loading a nestml generated neural model into PyNN.  In particular, the problem is loading into PyNN and then executing the simulation in nest.  (It seems one of the benefits of nestML is that it generates code for SpiNNaker, and I hope to try that eventually.)

 

From python I

import pyNN.nest as sim

from pyNN.nest import native_cell_type

igSpike_neuron = native_cell_type('ignore_and_spike')

cells=sim.Population(2,igSpike_neuron,{})

sim.run(100.0)

#the model gives two emited spike

sim.setup(timestep=1.0)

cells=sim.Population(2,igSpike_neuron,{})

 

#the error output culminating with….

#error File "/home/christian3/CAs/jun24/nest-simulator-3.7/nest-install/lib/python3.12/site-packages/nest/ll_api.py", line 103, in catching_sli_run

#    raise exceptionCls(commandname, message)

#nest.lib.hl_api_exceptions.NESTErrors.UnknownComponent: UnknownComponent in SLI function GetDefaults_l: /ignore_and_spike is not a known component.

 

So, it loads the model properly, and runs it.  However, when I do a setup, it no longer recognises ignore_and_spike.  (Almost all of my existing scripts use setup.)

 

 

 

The name of the model wasn’t my problem. The name of model is easy to modify as I did.  (I am sure your answer about that is correct, though I haven’t tried it.)

-Chris

 

 

From: Babu, Pooja <p.babu@fz-juelich.de>
Sent: 19 June 2024 12:29
To: NEST User Mailing List <users@nest-simulator.org>
Subject: [NEST Users] Re: nestml syntax problem

 

Hello Chris,

 

If you want to generate the neuron models which has the same name in NEST, you can use the “suffix” option in the “generate_nest_target” function. This adds the suffix to the model name during code generation.

 

For example:

generate_nest_target(input_path=“test_model.nestml",

                     target_path="target",

                     logging_level="INFO",

                     suffix=“_nestml”)

nest.Install(“nestmlmodule”)

n = nest.Create(“test_model_nestml”)

 

We do not currently provide pyNN support for NESTML models. If you manage to run NESTML models in pyNN, do let us know.

 

Regards,

Pooja



On 19. Jun 2024, at 10:58, Chris Huyck <C.Huyck@mdx.ac.uk> wrote:

 

I seem to be having problems with pyNN accessing the new model.  I should note that the first problem is that all of the 7.0.2 nesml models are already in the standard nest.  So, it’s not clear, which version one is using.  So, I switched to the ignore_and_fire model, but changed the name to ignore_and_spike.  A simple change of file name and model name was sufficient.  I got that running in pyNest.  (It’s a really simple model to work with.)

 

I can also get it running in pyNN, but I can’t use the Setup.  If I do, it changes something and I no longer have access to ignore_and_spike model.  I’m using pyNN 0.12.3.

-Chris

 

From: Chris Huyck
Sent: 13 June 2024 16:34
To: NEST User Mailing List <users@nest-simulator.org>
Subject: RE: [NEST Users] Re: nestml syntax problem

 

This was a pretty straight forward solution.  I used the hill_tononi.nestml file below, and nestml ran and compiled.  The nest.Install works, but I can’t actually run the model.  I’ll try to sort that out.

 

So, thanks!

-Chris

 

From: Babu, Pooja <p.babu@fz-juelich.de>
Sent: 13 June 2024 11:15
To: NEST User Mailing List <users@nest-simulator.org>
Subject: [NEST Users] Re: nestml syntax problem

 

Hi Chris,

 

The keywords “model”, “OnCondition” and “OnReceieve” are all the new changes to the NESTML language which is not yet released. 

 

As I mentioned earlier, it looks like you have the NESTML 7.0.2 installed, but the model files you are using are the new ones with the language updates. The “hill_tonini” model corresponding to your version should be: https://github.com/nest/nestml/blob/v7.0.2/models/neurons/hill_tononi.nestml

 

We will fix the documentation to point to the "release version" to avoid further confusion.

 

Regards,

Pooja

 

On 13. Jun 2024, at 11:55, Chris Huyck <C.Huyck@mdx.ac.uk> wrote:

 

Hello Pooja,

Firstly, thanks for the quick response. 

I’ve taken the hill_tononi_neuron model from  Models library — NESTML documentation 1.0.0 documentation, and it gives me the an error mismatched input 'model' expecting {newline, 'neuron', 'synapse}.  I change model to neuron in the .nestml file, and I get an extraneous input ‘onCondition’ error.  If I try with izhekivich_task.nestml fromraw.githubusercontent.com/nest/nestml/master/doc/tutorials/izhikevich/izhikevich_task.nestml I get the ‘model’ error;  if I change model to neuron I get an extraneous input ‘onRecieve’ error.  Are there any working models in nestml 7.0.2 that work?

-Chris

 

 

From: Babu, Pooja <p.babu@fz-juelich.de>
Sent: 13 June 2024 10:40
To: NEST User Mailing List <users@nest-simulator.org>
Subject: [NEST Users] Re: nestml syntax problem

 

You don't often get email from p.babu@fz-juelich.de. Learn why this is important

Hello Chris, 

 

The latest release of NESTML (v7.0.2) uses the “neuron” or “synapse” at the beginning of the model definition. We have unified this in our latest changes to the language where they are replaced by “model”, however, this is not yet released.

 

It looks like you have conflicting versions of NESTML installed. I would suggest you uninstall all the old NESTML instances and install it again via pip.

 

The pip-installed version should have models that begin with either “neuron” or “synapse”. The corresponding grammar can be found here: https://github.com/nest/nestml/tree/v7.0.2/pynestml/grammars

 

Apologies for the confusion. We are in the process of doing a pre-release of the new language changes soon. 

 

Hope this helps!

 

Best regards,

Pooja




On 13. Jun 2024, at 11:11, thanh-binh.to@online.de wrote:

 

Personal I‘d like to recommend you to use the newest version of Nestml and to adapt your old neuron model to the new syntax.

For doing it you have to compare a nestml model of any neuron in the current nestml version to the old one.

Normally you have to put a word “end” at the end of each segment in model

Hope that help

BR Binh

Gesendet mit der mobilen Mail App

Am 13.06.24 um 10:59 schrieb Chris Huyck

Von: "Chris Huyck" <C.Huyck@mdx.ac.uk>
Datum: 13. Juni 2024
An: "NEST User Mailing List" <users@nest-simulator.org>
Cc: 
Betreff: [NEST Users] nestml syntax problem

 

 

I was using an old version of nest (3.5) and nestml.  Someone sent me a nestml model, and that worked.  I wanted to make my own model, but the tutorials had a different format.  In particular, it seems like the first line of code in the tutorials start with model, and the old version started with neuron of synapse.

 

 

 

 

So, I thought it was time to upgrade, so installed nest 3.7, and pip-ed nestml.  (I also installed PyNN as that's the way I typically work.) When I imported generate_target (through python 3.12), I got the typical PyGSL warning; I think that's because I'm using python 3.12 not 3.11, and I don't think it matters in this case.

 

 

 

 

Then I ran the generate_target and I got an error mismatched input 'model' expecting {newline, 'neuron', 'synapse}

 

 

 

 

I expect there's something like a yacc table that specifies the syntax, and somehow I've got the old syntax.

 

 

I've tried it with several version of nestml 7.0.2, 7.0.0, 6.0.0 and 5.0.0. I think 5.0.0 had the old syntax.   I've tried several models from the library, and the Izhikevich tutorial.

 

 

 

 

Any thoughts about how to fix it?  

 

 

-Chris

 

 

 

 

_______________________________________________
NEST Users mailing list -- users@nest-simulator.org
To unsubscribe send an email to users-leave@nest-simulator.org

 

_______________________________________________
NEST Users mailing list -- users@nest-simulator.org
To unsubscribe send an email to users-leave@nest-simulator.org

 

_______________________________________________
NEST Users mailing list -- users@nest-simulator.org
To unsubscribe send an email to users-leave@nest-simulator.org