AllenInstitute / AllenInstitute/bmtk

Cannot set glif_cond model parameters in PointNet

Open
#376 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
335
Forks
102
Avg merge
1d 5h
Merged PRs (30d)
6

Description

Hi,

I am trying to create a network using a glif_cond model in PointNet, as I already did using a glif_asc model previously (and which worked well).
To do so, I followed the same procedure described in your tutorial, which is by using json configuration file downloaded from the Allen Cell Type Database. However, when I try to create the network using glif_cond models (specifying glif_cond in the add_nodescall, I get the following error :

sim = pointnet.PointSimulator.from_config(configure, network)
2024-06-27 15:06:52,685 [INFO] Setting up output directory
2024-06-27 15:06:52,686 [INFO] Building cells.
/Users/julienballbe/anaconda3/envs/wBMTKAllenSDKNEST/lib/python3.11/site-packages/nest/lib/hl_api_nodes.py:151: UserWarning:

SetStatus() call failed, but nodes have already been created! The node IDs of the new nodes are: NodeCollection(metadata=None, model=glif_cond, size=19, first=1, last=19).

Traceback (most recent call last):

  Cell In[65], line 1
    sim = pointnet.PointSimulator.from_config(configure, network)

  File ~/anaconda3/envs/wBMTKAllenSDKNEST/lib/python3.11/site-packages/bmtk/simulator/pointnet/pointsimulator.py:278 in from_config
    graph.build_nodes()

  File ~/anaconda3/envs/wBMTKAllenSDKNEST/lib/python3.11/site-packages/bmtk/simulator/pointnet/pointnetwork.py:152 in build_nodes
    node.build()

  File ~/anaconda3/envs/wBMTKAllenSDKNEST/lib/python3.11/site-packages/bmtk/simulator/pointnet/sonata_adaptors.py:65 in build
    self._nest_objs = nest.Create(self.nest_model, self.n_nodes, self.nest_params)

  File ~/anaconda3/envs/wBMTKAllenSDKNEST/lib/python3.11/site-packages/nest/ll_api.py:216 in stack_checker_func
    return f(*args, **kwargs)

  File ~/anaconda3/envs/wBMTKAllenSDKNEST/lib/python3.11/site-packages/nest/lib/hl_api_nodes.py:149 in Create
    SetStatus(node_ids, params)

  File ~/anaconda3/envs/wBMTKAllenSDKNEST/lib/python3.11/site-packages/nest/ll_api.py:216 in stack_checker_func
    return f(*args, **kwargs)

  File ~/anaconda3/envs/wBMTKAllenSDKNEST/lib/python3.11/site-packages/nest/lib/hl_api_info.py:315 in SetStatus
    sli_func("SetStatus", nodes, params)

  File ~/anaconda3/envs/wBMTKAllenSDKNEST/lib/python3.11/site-packages/nest/ll_api.py:152 in sli_func
    sli_run(slifun)  # SLI support code to execute func on args

  File ~/anaconda3/envs/wBMTKAllenSDKNEST/lib/python3.11/site-packages/nest/ll_api.py:103 in catching_sli_run
    raise exceptionCls(commandname, message)

NESTErrors.DictError: DictError in SLI function SetStatus_id: Unused dictionary items:  dt type El_reference C asc_amp_array init_threshold threshold_reset_method th_inf spike_cut_length init_AScurrents init_voltage threshold_dynamics_method voltage_reset_method extrapolation_method_name voltage_dynamics_method El asc_tau_array R_input AScurrent_dynamics_method AScurrent_reset_method dt_multiplier th_adapt coeffs

Even though the same script works if I specify "glif_psc" model in the add_nodes call.

I tried to create two neurons directly in NEST (one current based using glif_psc, and one conductance based using glif_cond), and I get the same error for both.
Do you know where the error comes from? I guess it is because the parameters specified in the json configuration files of models (El_ref, C, ...) do not appear under the same denomination in the glif_psc/glif_conf cpp files
Is there in the BMTK some shortcuts which convert parameters names in the json configuration file for glif_psc models?

Thank you for any help you can give me,

Best,

Julien

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the glif_cond failure from the JSON configuration and trace node creation through pointsimulator.py, pointnetwork.py, and sonata_adaptors.py, then compare the parameters passed to NEST with glif_cond.cpp. Done means the configuration can create glif_cond nodes without the SetStatus unused-dictionary error while preserving the existing glif_psc path.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.