Cubnm

Latest version: v0.0.5

Safety actively analyzes 685507 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.0.5

Changes
- Enabled custom integration step for the synaptic (`dt`) and BOLD models (`bw_dt`)
- Added cooperative launch mode which supports running a few simulations with massive number of nodes (e.g. A100 would support 55k simulations*nodes)
- Enabled empirical BOLD as a user input. Then FC and FCD are calculated from the BOLD signal consistent with the simulations.
- Made FC and FCD calculations optional (but still when FCD is calculated FC must be calculated)
- Enabled batch optimization. In this mode multiple `PymooOptimizer` instances can be run in parallel using a single GPU and without requiring CPU parallelization. This works by combining individual `SimGroup` instances of the optimizers into a `MultiSimGroup`.
- Added tests for optimizers
- Minor fixes including: detects GPUs based on `nvidia-smi`, fixed optimize error with models other than rWW, fixed error with TR and states sampling lower than 1 sec

0.0.4

Changes
- Considerable improvement in GPU performance (especially with higher number of simulations and nodes) due to coalesced reading of the structural connectome from unified memory
- Added a generic test for testing consistency of simulations in current and future models
- Return initialization and running time of simulations to user (recorded in `SimGroup.init_time` and `SimGroup.run_time` after simulations are run)
- Minor fixes

0.0.3

Changes
- Added command line interface
- Added stable and development Docker containers (but need more testing across different platforms)
- Added support for oscillation-based models and included Kuramoto model as an example of such models
- Created a boilerplate macro which will make it easier to add new models and reduces code repetition
- Noise can be returned to user (if `noise_out` is set to `True`)
- Versions will be set automatically by `versioneer`

0.0.2

Changes
- Added documentations (https://cubnm.readthedocs.io/en/latest/index.html) and example Kaggle notebooks
- Major changes in the core CUDA/C++ code structure with a modular design to support additional models
- Added `rWWEx`, excitatory-only reduced Wong Wang model (Deco et al. 2013), in addition to `rWW` which was supported previously
- Added conduction delay support to CPU simulations
- Added option to save time series of model states which can be sampled every TR (default) or at custom sampling rates
- Added MANY_NODES mode for 200-500 node simulations (only available when building from source)
- Shows progress of GPU simulations in verbose mode
- Tests of expected output compare the entire arrays of simulated data to the expected rather than a specific index
- Added serial implementation of simulations on GPU which use one thread per simulation and loops through nodes. This is experimental and at small N much slower than the default parallel mode.
- Added support for variable SCs across parallel simulations. This feature can be used for future support of parallel optimization runs (different optimizer seeds or different subjects) and was used in the `esc` branch.
- Various fixes most importantly including a bug resulting in an extra sample in the simulated BOLD, and a bug resulting in improper use of device heap memory which lead to crashes specially at large Ns



eidev
Includes the version of the code used in https://github.com/amnsbr/eidev. This release is created for the purpose of archiving the repository at Zenodo.

0.0.1

Initial release of `cuBNM` toolbox, a Python wrapper of C++ and CUDA code which runs simulations of biophysical network models of the brain on GPUs (and CPUs) and performs parameter optimization.

Features
- `cuBNM.sim.SimGroup`: enables defining model input data and parameters, runs single/multiple simulations in parallel on GPU/CPU (will use GPU by default if available), and calculates goodness of fit of the simulation to empirical data. This class directly interacts with the C++ extension in `cuBNM.core.run_simulations`.
- `cuBNM.optimizer.GridSearch`: runs simulation of a grid of the parameter space and calculates their goodness of fit.
- `cuBNM.optimizer.RWWProblem`: enables defining model input data, free parameters and their range. Local parameters can be regionally variable based on weights of fixed maps, or different free local parameters per each node or group of nodes.
- `cuBNM.optimizer.Optimizer`: a group of evolutionary optimizer classes which aim to solve the `cuBNM.optimizer.RWWProblem` by finding the optimal set of free parameters. Most of the optimizers are implemented by `pymoo`, and all of the `pymoo` optimizers (including those not included in the toolbox) can work with `cuBNM.optimizer.RWWProblem` since it inherits from `pymoo.core.problem.Problem`. Currently CMAES, NSGA-II and Bayesian optimizers are available. Only CMAES has been tested in practice and the other optimizers are at an experimental stage.
- `cuBNM.datasets`: loads test data including SC, FC and FCD and heterogeneity maps.
- The core C++ and CUDA code can is compiled with the compiler flags `NOISE_SEGMENT` by default, which precalculates a 30s segment of Gaussian noise which is reused in the simulation with shuffling after each repeat.

There is currently no documentation/tutorials but the doc strings and `./examples/examples.py` will be helpful.

Known Issues
- Binary wheels have been built for `manylinux_2_28` and should support a wide range of Linux systems, but they may not work. In that case it is recommended to build the toolbox from source. Also currently Windows and Mac are not supported but in theory using Docker GPU/CPU simulations on Windows and CPU simulations on Mac should work.
- Binary wheels also cannot do parallel simulations on CPU because they are not compiled with OpenMP (due to manylinux constraints). To enable this functionality the toolbox should be built from source.
- CPU simulations without FIC cause segmentation fault.

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.