Skip to content

OverflowError when setting negative synaptic weight PointNet #439

@Jballbe

Description

@Jballbe

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions