dbbs-lab / bsb-core Goto Github PK
View Code? Open in Web Editor NEWThe Brain Scaffold Builder
Home Page: https://bsb.readthedocs.io
License: GNU General Public License v3.0
The Brain Scaffold Builder
Home Page: https://bsb.readthedocs.io
License: GNU General Public License v3.0
Currently the morphology_repository
attribute is problematic: It looks for the specified file relative to the cwd and not to where the configuration was found or some other sane behavior, so when you compile from another folder it won't find the morphology repository anymore
Right now, hours of radio-silence pass when connecting GrCs to PCs. It would be useful to track the progress %.
For some connections, divergence values are not used for connectivity (e.g. for IO to PC connections), but it should be checked and a warning should be thrown.
For IO to PC values see Helveg/cerebellum-scaffold#104.
For PC-DCN: "Because 30โ50 Purkinje cells converge onto each CbN cell (Person & Raman, 2012a), the number of inhibitory inputs was held constant at 40 in all experiments." [https://physoc.onlinelibrary.wiley.com/doi/pdf/10.1113/JP274321]
In VoxelIntersection it's contacts
and in TouchDetection it's synapses
When we complete Helveg/cerebellum-scaffold#369 we rename the old nest
to nest2
and the class to Nest2Adapter
When we #369 we rename the old nest
to nest2
and the class to Nest2Adapter
Transform the Configuration and its current state back into a configuration tree (ignore breakpoints and multifiles for now)
Currently the global CLI arguments are position specific and there's no unified way access global scaffold settings. It would be better that there's an options
module where the values of singleton settings can be read from and stored in from 3 sources:
bsb.options.verbosity = 2
?class Options(types.ModuleType):
verbosity = IntegerOption(cli=("verbosity", "v"), env="BSB_VERBOSITY", default=1)
log = StringOption(cli=("log", "l"), env="BSB_LOG")
sys.modules[__name__] = Options()
Previous (less) or future (more)?
Time to split foolks.
File "/home/alberto/workspace/cerebellum-scaffold/scaffold/postprocessing.py", line 263, in after_connectivity
compartment_matrix = self.scaffold.connection_compartments[tag]
KeyError: 'golgi_to_glomerulus'
Even if using "detailed" for golgi_to_glomerulus:
"golgi_to_glomerulus": {
"class": "scaffold.connectivity.ConnectomeGolgiGlomerulus",
"from_cell_types": [{"type": "golgi_cell", "compartments": ["axon"]}],
"to_cell_types": [{"type": "glomerulus", "compartments": ["soma"]}],
"divergence": 40,
"detailed": true
},
We should check that NEST-specific variables are properly set when running NEST simulations with the scaffold (e.g. local_num_threads
or RNG variables).
Tests are being skipped to allow #494 to merge. We should:
A) Check if we can do weekly builds and tests of full scale networks that we can then cache on Travis, or upload as build artifacts to possibly Amazon AWS or our own cluster?
B) Re-enable push
and branch
testing by using the old mouse_cerebellum.json
as basis for these smaller per-commit tests
File "/home/alberto/workspace/cerebellum-scaffold/scaffold/postprocessing.py", line 263, in after_connectivity
compartment_matrix = self.scaffold.connection_compartments[tag]
KeyError: 'golgi_to_glomerulus'
Even if using "detailed" for golgi_to_glomerulus:
"golgi_to_glomerulus": {
"class": "scaffold.connectivity.ConnectomeGolgiGlomerulus",
"from_cell_types": [{"type": "golgi_cell", "compartments": ["axon"]}],
"to_cell_types": [{"type": "glomerulus", "compartments": ["soma"]}],
"divergence": 40,
"detailed": true
},
as_cache
should return an empty MorphologyCache based on the MR. MorphologyCaches should produce singleton morphologies that are immutable by default.
Usecase:
The user wants to compile an hdf5 exploiting the morphologies, but it does not want to simulate it in NEURON and does not have NEURON installed.
Actual behaviour:
The user has to remove from the json the"NEURON" simulation part.
Desired behaviour:
The compilation should in principle work even if NEURON is not installed.
Tests are being skipped to allow #494 to merge. We should:
A) Check if we can do weekly builds and tests of full scale networks that we can then cache on Travis, or upload as build artifacts to possibly Amazon AWS or our own cluster?
B) Re-enable push
and branch
testing by using the old mouse_cerebellum.json
as basis for these smaller per-commit tests
bsb
console_script
entry point is renamed to bsb
(so the command is bsb compile
instead of scaffold compile
)bsb
bsb
module instead of the scaffold
module.Users (which we don't have) need to uninstall the dbbs-scaffold
package and pip install bsb
instead.
Developers need to run pip install -e .
from the git repo root to register the new bsb
command and change all from scaffold
/ import scaffold
statements to from bsb
/import bsb
Closes #482
Previous (less) or future (more)?
Usecase:
The user wants to compile an hdf5 exploiting the morphologies, but it does not want to simulate it in NEURON and does not have NEURON installed.
Actual behaviour:
The user has to remove from the json the"NEURON" simulation part.
Desired behaviour:
The compilation should in principle work even if NEURON is not installed.
In order to print output during an MPI process stdout
needs to operate in unbuffered mode. The reporting module can overwrite stdout
if MPI is present.
Since point neuron models ignore any compartments given, there are many duplicate entries between the same neuron pairs in connectivity sets created with detailed connectivity strategies. To optimize, a reduced dataset with unique pairs and a parallel dataset with the amount of times they occur could be provided.
The ConnectivitySet
s get_intersection
method should be adapted to incorporate a get_intersection_iterator
.
Multi-contact connections are created only once. Unitary weights are tuned to get the right population firing rates, and then multiplied by the synaptic contact multiplicity to get the single connection weight (population weight will be an array)
None, the get_intersections
function should produce the same result. To optimize, we should switch to the get_intersection_iterator
to reduce memory footprint.
File "/home/claudia/.local/bin/scaffold", line 11, in <module>
load_entry_point('dbbs-scaffold', 'console_scripts', 'scaffold')()
File "/home/claudia/cerebellum-scaffold/scaffold/cli.py", line 26, in scaffold_cli
start_cli()
File "/home/claudia/cerebellum-scaffold/scaffold/cli.py", line 238, in start_cli
scaffoldInstance.run_simulation(cl_args.simulation, quit=True)
File "/home/claudia/cerebellum-scaffold/scaffold/core.py", line 381, in run_simulation
simulation, simulator = self.prepare_simulation(simulation_name)
File "/home/claudia/cerebellum-scaffold/scaffold/core.py", line 415, in prepare_simulation
simulator = simulation.prepare()
File "/home/claudia/cerebellum-scaffold/scaffold/simulators/nest.py", line 328, in prepare
self.reset_kernel()
File "/home/claudia/cerebellum-scaffold/scaffold/simulators/nest.py", line 418, in reset_kernel
self.set_threads(self.threads)
File "/home/claudia/cerebellum-scaffold/scaffold/simulators/nest.py", line 458, in set_threads
"total_num_virtual_procs": virtual,
File "/home/claudia/nest-simulator-2.18.0-build/lib/python3.6/site-packages/nest/ll_api.py", line 246, in stack_checker_func
return f(*args, **kwargs)
File "/home/claudia/nest-simulator-2.18.0-build/lib/python3.6/site-packages/nest/lib/hl_api_simulation.py", line 243, in SetKernelStatus
sr('SetStatus')
File "/home/claudia/nest-simulator-2.18.0-build/lib/python3.6/site-packages/nest/ll_api.py", line 132, in catching_sli_run
raise exceptionCls(commandname, message)
nest.ll_api.BadProperty: ('BadProperty in SetStatus_id: Number of virtual processes (threads*processes) must be an integer multiple of the number of processes. Value unchanged.', 'BadProperty', <SLILiteral: SetStatus_id>, ': Number of virtual processes (threads*processes) must be an integer multiple of the number of processes. Value unchanged.')
Not optimized number of possible searches..
probably n^(2)*log(n) searches , useless..
Fixes dbbs-lab/models-old#25
And wrap them in more information such as cell model, current context, ...
Fixes dbbs-lab/models-old#25
Time to split foolks.
Right now, hours of radio-silence pass when connecting GrCs to PCs. It would be useful to track the progress %.
In [2]: conf = JSONConfig() # loads the default config which has granule & golgi configured
...: scaffold = Scaffold(conf)
...:
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
<ipython-input-2-6bd56f02d068> in <module>()
1 conf = JSONConfig() # loads the default config which has granule & golgi configured
----> 2 scaffold = Scaffold(conf)
/home/stefano/Documenti/cerebellum-scaffold/scaffold/core.py in __init__(self, config, from_file)
74 # Use the configuration to initialise all components such as cells and layers
75 # to prepare for the network architecture compilation.
---> 76 self._intialise_components()
77 self._intialise_simulators()
78
/home/stefano/Documenti/cerebellum-scaffold/scaffold/core.py in _intialise_components(self)
117 self._initialise_morphologies()
118 self._initialise_placement_strategies()
--> 119 self._initialise_connection_types()
120 self._initialise_simulations()
121 self._initialise_hooks()
/home/stefano/Documenti/cerebellum-scaffold/scaffold/core.py in _initialise_connection_types(self)
166 def _initialise_connection_types(self):
167 for connection_type in self.configuration.connection_types.values():
--> 168 connection_type.initialise(self)
169 # Wrap the connect function.
170 connection_type._wrap_connect()
/home/stefano/Documenti/cerebellum-scaffold/scaffold/helpers.py in initialise(self, scaffold)
51 self.cast_config()
52 self.boot()
---> 53 self.validate()
54
55 def boot(self):
/home/stefano/Documenti/cerebellum-scaffold/scaffold/connectivity/connectome/glomerulus_granule.py in validate(self)
26 )
27 mr = self.scaffold.morphology_repository
---> 28 morphology = mr.get_morphology(morphologies[0])
29 dendritic_compartments = morphology.get_compartments(["dendrites"])
30 dendrites = {}
/home/stefano/Documenti/cerebellum-scaffold/scaffold/output.py in get_morphology(self, name, scaffold)
443 Load a morphology from repository data
444 """
--> 445 with self.load() as handler:
446 # Check if morphology exists
447 if not self.morphology_exists(name):
/usr/lib/python3.6/contextlib.py in __enter__(self)
79 def __enter__(self):
80 try:
---> 81 return next(self.gen)
82 except StopIteration:
83 raise RuntimeError("generator didn't yield") from None
/home/stefano/Documenti/cerebellum-scaffold/scaffold/output.py in load(self, mode)
29 if self._handle is not None:
30 self.release_handle(self._handle)
---> 31 self._handle = self.get_handle(mode)
32
33 def handler():
/home/stefano/Documenti/cerebellum-scaffold/scaffold/output.py in get_handle(self, mode)
238 """
239 # Open a new handle to the HDF5 resource.
--> 240 handle = HDF5TreeHandler.get_handle(self, mode)
241 if handle.mode != "r":
242 # Repository structure missing from resource? Create it.
/home/stefano/Documenti/cerebellum-scaffold/scaffold/output.py in get_handle(self, mode)
68 """
69 # Open a new handle to the resource.
---> 70 return h5py.File(self.file, mode)
71
72 def release_handle(self, handle):
/home/stefano/.local/lib/python3.6/site-packages/h5py/_hl/files.py in __init__(self, name, mode, driver, libver, userblock_size, swmr, rdcc_nslots, rdcc_nbytes, rdcc_w0, track_order, **kwds)
406 fid = make_fid(name, mode, userblock_size,
407 fapl, fcpl=make_fcpl(track_order=track_order),
--> 408 swmr=swmr)
409
410 if isinstance(libver, tuple):
/home/stefano/.local/lib/python3.6/site-packages/h5py/_hl/files.py in make_fid(name, mode, userblock_size, fapl, fcpl, swmr)
171 if swmr and swmr_support:
172 flags |= h5f.ACC_SWMR_READ
--> 173 fid = h5f.open(name, flags, fapl=fapl)
174 elif mode == 'r+':
175 fid = h5f.open(name, h5f.ACC_RDWR, fapl=fapl)
h5py/_objects.pyx in h5py._objects.with_phil.wrapper()
h5py/_objects.pyx in h5py._objects.with_phil.wrapper()
h5py/h5f.pyx in h5py.h5f.open()
OSError: Unable to open file (unable to open file: name = 'morphologies.hdf5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)
as_cache
should return an empty MorphologyCache based on the MR. MorphologyCaches should produce singleton morphologies that are immutable by default.
The report module requires a slight refactoring so that report listeners
can be added. Reporting to screen should then be added as a default report listener. This should improve the design for a variety of future logging functions (better than the messy report file which is mostly obsolete when #495 is implemented)
In order to print output during an MPI process stdout
needs to operate in unbuffered mode. The reporting module can overwrite stdout
if MPI is present.
They're a mess, should become similar to the PlacementSet
They're a mess, should become similar to the PlacementSet
Since point neuron models ignore any compartments given, there are many duplicate entries between the same neuron pairs in connectivity sets created with detailed connectivity strategies. To optimize, a reduced dataset with unique pairs and a parallel dataset with the amount of times they occur could be provided.
The ConnectivitySet
s get_intersection
method should be adapted to incorporate a get_intersection_iterator
.
Multi-contact connections are created only once. Unitary weights are tuned to get the right population firing rates, and then multiplied by the synaptic contact multiplicity to get the single connection weight (population weight will be an array)
None, the get_intersections
function should produce the same result. To optimize, we should switch to the get_intersection_iterator
to reduce memory footprint.
More plotting functions now return their produced fig
s, and fixed some other small bugs. PSTHs can now be stacked.
Not optimized number of possible searches..
probably n^(2)*log(n) searches , useless..
Currently the morphology_repository
attribute is problematic: It looks for the specified file relative to the cwd and not to where the configuration was found or some other sane behavior, so when you compile from another folder it won't find the morphology repository anymore
We should check that NEST-specific variables are properly set when running NEST simulations with the scaffold (e.g. local_num_threads
or RNG variables).
Transform the Configuration and its current state back into a configuration tree (ignore breakpoints and multifiles for now)
For some connections, divergence values are not used for connectivity (e.g. for IO to PC connections), but it should be checked and a warning should be thrown.
For IO to PC values see #104.
For PC-DCN: "Because 30โ50 Purkinje cells converge onto each CbN cell (Person & Raman, 2012a), the number of inhibitory inputs was held constant at 40 in all experiments." [https://physoc.onlinelibrary.wiley.com/doi/pdf/10.1113/JP274321]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.