- Aug 11, 2022
-
-
Thorsten Hater authored
* Add find_private_gpu and arbor.env.
-
- Aug 10, 2022
-
-
Thorsten Hater authored
- Add stacktraces to 1. arbor_exception (and all derived) as `where` 2. arbor_internal_error as `where` 3. arb_assert - Propagate stacktraces to Python exceptions derived from the above. - Expand dev/doc on debugging
-
- Jan 24, 2022
-
-
Brent Huisman authored
* Pyarb specific. * `proc_allocation_shim()` throws error if user sets threads to zero. * `arbor.context` constructor accepts `threads` set to `"avail_threads"`, which sets the number of threads to `arbenv::thread_concurrency()` * This introduces a dependency on arbenv for Pyarb. * Docs and tests added. Fixes #1692
-
- Oct 12, 2021
-
-
Thorsten Hater authored
* Add platform abstraction for loading DLL/SOs. * Throw more informative exceptions when handling DLL/SOs. * More informative errors when dealing with dynamically loaded catalogues. * Translate `arb::file_not_found_error` to `FileNotFoundError` in Python.
-
- Jun 16, 2021
-
-
Benjamin Cumming authored
* Sort collected spikes in Python API lfirst by time, then gid, then lid. * Remove redundant old spike handling code from Python lib.
-
- Mar 31, 2021
-
-
Nora Abi Akar authored
* Implements parsers and writers in `arborio` for the s-expression based Arbor Cable-Cell Format defined in #1336. * Moves `s_expr.hpp` to the public interface. * Adds python wrappers to support the features in pyarb. * Adds unit tests. * Adds docs. Fixes #1336 Partially addresses #1233
-
- Dec 14, 2020
-
-
Benjamin Cumming authored
Make the `cable_cell` interface read only by passing the decorations to its constructor in a new `decor` type. C++ library * Remove the paint/place/set_default interface from `cable_cell` * Create a `decor` type that: * stores lists of paintings and placings * stores a set of cable cell parameters * uses the `paint`, `place`, `set_default` interface that was deprecated from `cable_cell`. * Create `paintable`, `placeable` and `defaultable` variants that are sum types over the respective types that can be painted, placed and defaulted. * Remove the overloaded `cable_cell::paint`, `cable_cell::place`, `cable_cell::set_default` methods to single methods that consume the sum types. Unit Tests * Many small changes because many many tests use cable cell API. * There were no `cable_cell` unit tests! Not such a big deal, since cable_cell is tested implicitly in so many other tests * but I added cable_cell tests: not much at the moment but will quickly fill up as we work on reading, writing, etc. Python * Wrap the new decor type. * Update cable cell type to reflect read only API. * Wrap the cv_policy types and implement the same operator overloading.
-
- Nov 18, 2020
-
-
Sam Yates authored
Major changes in Python library and documentation: * Add global state (immutable after initialization) for the Python module that manages the mapping between probe metadata types and the method by which the corresponding [sample data can be collected and presented as Python objects. This is necessary for decoupling the implementation of the simulation wrapper from that of the various cable cell probe types. * Wrap each of the C++ cable cell probe types with a Python function that returns a `probe_info` object. * Add code for converting and accumulating C++ probe metadata and sample data, registered in the module global state against the metadata type info. * Make the `arbor.simulator` object responsible for recording all spike and sample data, with corresponding new methods. * Use NumPy arrays and structured datatypes for returning spike and sample data. * Place Python schedule proxies under an abstract interface so that consumers of the proxies can be made generic over schedule types. * Add unit tests for the `arbor.simulator` class and its new functionality, including distributed spike collection. * Rework all Python API documentation concerning probes, sampling, and spike recording; add information on newly exposed cable cell probe addresses. * Add new python example `single_cell_recipe.py` which is a generic recipe version of `single_cell_model.py`. * Adjust other code in the wrapper and examples to accommodate these changes. Minor changes in Python library: * Add equality tests for `arbor.location` and `arbor.cable` Python classes. * Use the `py::` namespace shorthand more often in the Python wrapping sources. * Add an implicit conversion for a pair of numbers to `arbor.cell_member`, so that e.g. probe ids can be specified simply as `(gid, index)`. * Add an implicit conversion from a tuple to `arbor.mpoint` so that a morphological point can be specified simply as `(x, y, z, radius)`. * Modify the interface to `arbor.regular_schedule` so that the overloads correspond more closely to the C++ API. In particular, `arbor.regular_schedule(dt)` now describes a schedule with times 0, dt, 2*dt, etc. Minor changes in C++ library: * Change test in FVM lowered cell implementation and exception message for `bad_source_description`: assert number of detectors is exactly the number of sources promised by the recipe. * Add comment describing `probe_metadata` object in `sampling.hpp` which asserts that the type and value of probe-specific metadata completely determines the correct interpretation of sampled data provided to a callback.
-
- Jun 24, 2020
-
-
Benjamin Cumming authored
Update core library: * support derivation of named mechanisms in catalogue from a string description of the parent. * fix bug in radois_ge region expression that was finding region_lt. * fix test for radius_ge region expression Add support for mechanism, global properties and catalogue shenanigans to python wrapper
-
- Feb 25, 2020
-
-
Benjamin Cumming authored
Improve the Python wrapper generation and installation: - install a proper module that can be extended with Python code; - give the user more control over where to install the module (e.g. as a user package or in a virtualenv). During building, the following sub-directory is built in the build director (`CMAKE_BINARY_DIR`) ``` └── python └── arbor ├── __init__.py ├── arbor.so └── VERSION ``` This path can then be copied VERBATIM to the target installation path. By default this will be in `CMAKE_INSTALL_PREFIX/lib/python%d.%d/site-packages`. An additional CMake parameter `ARB_PYTHON_PREFIX` can be used to specify an alternative destination for installing the Python module. The Python part of the wrapper, implemented in `__init__.py` is currently very limited, only providing `__version__` and `__config__` variables. The installation guide was updated to cover the Python installation.
-
- Feb 04, 2020
-
-
Benjamin Cumming authored
A big update that wraps over 90% of the public C++ API, with enough functionality to let Python users to perform useful modelling. Key features - wrapping of cable cell functionality - user-defined explicit compartmentalisation not supported - `single_cell_model` abstraction unique to the Python wrapper that simplifies developing and testing single cell models - one-dimensional cell builder for Python wrapper that simplfies building cells that - in and of itself limited in scope, but a very useful example of mapping a richer morphology builder onto `sample_tree`s. - parsing of region and location expressions from strings - implements a generic s-expression parser that we can use for other purposes later
-
- Sep 25, 2019
-
-
akuesters authored
Adds * to `recipe.cpp`: `num_probes` and `get_probe` with helper function `cable_probe(kind, id, location)` * `sample.cpp`: `sample` type with attributes `time` and `value`; a `sampler` with `samples()` and `clear()` and helper functions `attach_sampler(sim, dt)` for adding all probes as well as `attach_sampler(sim, dt, probe_id)` for adding one probe * `morphology.cpp`: `location` as `arb::mlocation` with `branch` and `position` * corresponding docs and example * update to new cable cell semantics in c++ validation test fixes #762
-
- Jul 03, 2019
-
-
Wraps the `meter_manager` with - the constructor - `start(ctx)` - `checkpoint(name, ctx)` - `checkpoint_names` - `times` and the `meter_report` with - `make_meter_report(meter_manager, ctx)` Fixes #765
-
- Jun 24, 2019
-
-
Benjamin Cumming authored
Support for recording spikes generated by a simulation in the Python wrapper * Implement a `spike_recorder` that holds a shared pointer to a `std::vector` of spikes, and a callback for the `arb::simulation` spike recording API. * Add `python/example/ring.py` that creates a ring network, then records and prints spikes. * Some fixes to get the full `recipe` -> `domain_decomposition` -> `simulation` -> `spikes` workflow to work * always use default `global_parameters`: user customization of global parameters for cable cells can wait until the ion species interface is finished. * change the Python recipe interface for `recipe::connections_on` to use `pybind11::objects` because of shim. * Some small improvements to error and help messages. Fixes #764
-
- Jun 12, 2019
-
-
Benjamin Cumming authored
Add full wrappers for - `lif_cell` - `spike_source_cell` - `benchmark_cell And an opaque wrapper for cable_cell with a helper function that generates a random morphology identical to the ones in the nsuite benchmarks. Fixes #767.
-
Wrap `arb::simulation` type and interface for running `run()`, resetting `reset()`, and `set_binning_policy(policy, bin_interval)`. Wrap `enum binning_kind`, used to set event binning on `simulation` API. Fixes #763
-
- Jun 07, 2019
-
-
Domain decomposition in python wrapper * functions: `partition_load_balance` * types: `group_description` and `domain_decomposition` Also includes * remove comment that `gid` in a `group_description` must be sorted. * a host of small clean ups of python wrapper Fixes #761
-
- Jun 05, 2019
-
-
Benjamin Cumming authored
-
- Jun 04, 2019
-
-
Fixes #760 Wraps arbor recipe (without probes, i.e. num_probes, probe_info, get_probe) including - cell_connection, - gap_junction_connection, - recipe with - num_cells - cell_description - cell_kind - num_sources - num_targets - num_gap_junctions_sites - event_generators - connections_on - gap_junctions_on - global_properties - enum cell_kind in `identifiers.cpp`
-
- May 09, 2019
-
-
Wrapped the following C++ features in Python: - Identifiers (`cell_member`) + according tests - `event_generator` and schedules (`regular_schedule`, `explicit_schedule`, `poisson_schedule`) + according tests
-
- Mar 01, 2019
-
-
Remove old code and comments from Python config code.
-
Fixes #700 Usage in python as: ``` >>>import arbor >>>arbor.config() {'mpi': True, 'mpi4py': True, 'gpu': False, 'version': '0.1.1-dev'} >>>d = arbor.config() >>>arbor.print_config(d) Arbor's configuration: mpi : True mpi4py : True gpu : False version: 0.1.1-dev ```
-
- Feb 26, 2019
-
-
First step towards the Python front end. This commit sets up the structure of the python implementation * directory structure * git submodule for pybind11 * best practices for making bindings with pybind11 * unit testing for the python front end It implements the following features in the Python front end * execution contexts * gpu detection * thread count detection * MPI initialization helpers. Fixes #667.
-