AllenInstitute / AllenInstitute/bmtk

OverflowError when setting negative synaptic weight PointNet

Open
#439 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 set up a network of point neuron model using PointNet, but I encountered an error when trying to set inhibitory synapses.
I tried to use this example on the BMTK GitHub, but I got the following error:

---------------------------------------------------------------------------
OverflowError                             Traceback (most recent call last)
Cell In[11], line 7
      4 configure.build_env()
      6 network = pointnet.PointNetwork.from_config(configure)
----> 7 sim = pointnet.PointSimulator.from_config(configure, network)
      8 sim.run()

File [/opt/anaconda3/envs/Test_BMTK/lib/python3.12/site-packages/bmtk/simulator/pointnet/pointsimulator.py:340](http://localhost:8888/opt/anaconda3/envs/Test_BMTK/lib/python3.12/site-packages/bmtk/simulator/pointnet/pointsimulator.py#line=339), in PointSimulator.from_config(cls, configure, graph, n_thread)
    337 graph.build_nodes()
    339 graph.io.log_info('Building recurrent connections')
--> 340 graph.build_recurrent_edges()
    342 io.log_info('Network created.')
    343 return network

File [/opt/anaconda3/envs/Test_BMTK/lib/python3.12/site-packages/bmtk/simulator/pointnet/pointnetwork.py:175](http://localhost:8888/opt/anaconda3/envs/Test_BMTK/lib/python3.12/site-packages/bmtk/simulator/pointnet/pointnetwork.py#line=174), in PointNetwork.build_recurrent_edges(self, force_resolution)
    172     return
    174 for edge_pop in recurrent_edge_pops:
--> 175     for edge in edge_pop.get_edges():
    176         nest_srcs = self.gid_map.get_nestids(edge_pop.source_nodes, edge.source_node_ids)
    177         nest_trgs = self.gid_map.get_nestids(edge_pop.target_nodes, edge.target_node_ids)

File [/opt/anaconda3/envs/Test_BMTK/lib/python3.12/site-packages/bmtk/simulator/core/sonata_reader/network_reader.py:191](http://localhost:8888/opt/anaconda3/envs/Test_BMTK/lib/python3.12/site-packages/bmtk/simulator/core/sonata_reader/network_reader.py#line=190), in SonataEdges.get_edges(self)
    189 edge_adaptor = self._edge_adaptors[edge_group.group_id]
    190 if edge_adaptor.batch_process:
--> 191     for edge in edge_adaptor.get_batches(edge_group):
    192         yield edge
    193 else:

File [/opt/anaconda3/envs/Test_BMTK/lib/python3.12/site-packages/bmtk/simulator/pointnet/sonata_adaptors.py:396](http://localhost:8888/opt/anaconda3/envs/Test_BMTK/lib/python3.12/site-packages/bmtk/simulator/pointnet/sonata_adaptors.py#line=395), in PointEdgeAdaptor.get_batches(self, edge_group)
    393         raise Exception('Could not find syn_weight value')
    395     # caluclate weight
--> 396     type_params[edge_id]['weight'] = nsyns * syn_weight
    398 yield PointEdgeBatched(source_nids=grp_vals['src_nids'].values, target_nids=grp_vals['trg_nids'].values,
    399                        nest_params=type_params[edge_id])

OverflowError: Python integer -550 out of bounds for uint32

I tried with a custom network, but I had the same error. From what I understand, I cannot assign negative synaptic weight, but then, I don't know how to make a specific connection inhibitory.

Do you have any idea why I am getting this error and what I could do?

I am using BMTK version 1.1.2 in python 3.12.11.

Thank you for your help!

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

Start with simulator/pointnet/sonata_adaptors.py in PointEdgeAdaptor.get_batches, where the traceback shows the synaptic weight is calculated, then trace the edge values through simulator/core/sonata_reader/network_reader.py. Reproduce the failure with examples/ei_networks/pointnet/build_network.py and determine how negative weights should be represented. Done means the example and a custom inhibitory PointNet network initialize without the reported OverflowError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.