PyRates

Open-source, graph-based Python code generator and analysis toolbox for dynamical systems (pre-implemented and custom models). Most pre-implemented models belong to the family of neural population models.

GPL-3.0 License

Downloads
1.3K
Stars
74
Committers
10

Bot releases are hidden (Show)

PyRates - v1.0.6: Bug Fixes and Fortran Backend Improvements Latest Release

Published by Richert 3 months ago

  • fixed a bug that caused vectorization to fail if the same operator was used multiple times on a single node
  • fixed a bug that caused an error in the generation of unique variable names on nodes with more than 10 operators defined on them
  • fixed a bug that caused CircuitTemplate.clear() calls to not clear all attributes on a CircuitTemplate instace, causing issues with multiple calls of CircuitTemplate.get_run_func
  • updated the fortran backend to work with the recent changes to the numpy.f2py module for generating a modulate that can be imported into python from a fortran file
  • fixed a bug in the ComputeGraph class of computegraph.py that caused function names to not be updated properly for backend-specific function definitions
PyRates - v1.0.5: Resolved backend bugs with the equation parser

Published by Richert 7 months ago

  • adjusted the call of the max/min functions: Use maxi and mini in the equations. Both functions take two input arguments, and return the larger/smaller one, respectively
  • updated the PyRates reference in the readme and on the documentation website (using the PLOS CB paper now instead of the arxiv preprint)
  • removed a bug where differential equations with a constant right-hand side were not properly handled by the automated compute graph optimization
  • resolved an issue with the fortran backend where complex data types were not properly processed during the code generation
  • updated readthedocs configuration file
  • added keyword argument adaptive to the CircuitTemplate.get_run_func method, which allows to indicate whether the generated equation file is expected to be called with an adaptive step-size solver (adaptive=True) or not
  • reduced computational overhead for the creation and simulation of delayed differential equation systems
  • removed a bug where edge attribute dictionaries were changed by mistake during the CircuitIR instantiation
  • improved working directory management in the backend
  • dropped official support for python 3.6 and added support for python 3.10
PyRates - v1.0.3: Simplified variable name generation

Published by Richert about 1 year ago

  • simplified automated generation of unique variable names. Recursive calls etc. were replaced with look-up tables, thus improving speed during the file generation process.
  • improved variable passing between different operators within a node. Less additional variables are now created, thus reducing the memory load during run time.
PyRates - v1.0.2: Improved Fortran Backend Functions and PyCoBi integration

Published by Richert over 1 year ago

  • fixed bug in fortran backend where the NPAR parameter for Auto-07p files was not properly set
  • improved code readability in fortran backend
  • moved selection of output variables from the results of a numerical simulation from the backend to the computegraph, thus reducing the amount of variables that had to be passed between the different classes
  • after each simulation, the value of all state variables in the compute graph is updated to the value at the final simulation step
  • added functionalities to the CircuitTemplate that allow to remember the state of all network variables from a previous simulation, even if a new backend is chosen for function generation or more simulations
PyRates - v1.0.1: Improved edge adding mechanism

Published by Richert over 1 year ago

  • added a background input parameter to the izhikevich population template
  • updated the documentation example for parameter sweeps to account for recent changes in the keyword arguments to the grid_search function
  • changed keyword argument vectorization of the function grid_search to vectorize, to be consistent with the naming of the same argument in CircuitTemplate.run
  • updated the CircuitTemplate.add_edges_from_matrix method to allow for edges that connect separate network nodes
PyRates - v1.0.0: First Official PyRates Release

Published by Richert over 1 year ago

This official release is a combination of all the bug fixes and improvements in the
pre 1.0 versions up to v0.17.4.

It establishes PyRates as a code-generation tool for dynamical systems modeling
with a flexible, intuitive, and well organized language for model definition.
At this stage, PyRates comes with support for ordinary and delayed differential equations and can
generate vector-field evaluation functions for any ODE/DDE system for each of the following backends:

  • NumPy
  • Tensorflow
  • PyTorch
  • Julia
  • Fortran
    While PyRates still provides extensive support for numerical simulations and parameter sweeps itself, its main advantage is that it can generate run functions for dynamical systems that can be used in combination with dynamical systems analysis tools in any of the above mentioned tools/languages.

Minor improvements since 0.17.4:

  • removed typos in documentation
  • improved layout of the online documentation
  • updated documentation to account for latest changes
  • removed bug where a delayed different
PyRates - v0.17.4: Added documentation examples

Published by Richert over 1 year ago

  • added sign function to the backend that returns the sign of its input (1 or -1)
  • improved readthedocs documentation (removed bug with display of math, added new use example for edge templates)
  • added a safe guard for defining edge templates: An error is raised now when edge template input variables have the
    same name as their source variable.
PyRates - v0.17.3: Fortran Backend Debugging

Published by Richert about 2 years ago

  • minor debugging of the model introduction use examples
  • adjustments of the template cheat sheet template_specification.rst
  • debugged issue in base backend, where file names specified by the users that contained a file ending wre not handled properly
  • debugged issue with fortran backend where file names that contained a directory path were not handled properly for module imports
  • debugged issue with fortran backend where adjustments of the default auto meta parameters were not applied correctly
PyRates - v0.17.2

Published by Richert about 2 years ago

  • the state variable indices and parameter names returned as the fourth and third return values of CircuitTemplate.get_run_func, respectively, now use the frontend variable names instead of the backend variable names
  • implemented a method CircuitIR.get_frontend_varname that returns the frontend variable name given a backend variable name
PyRates - v0.17.1: Documentation overhaul

Published by Richert about 2 years ago

  • changed the theme of the readthedocs documentation website
  • added documentation for all supported backend functions
  • added documentation for dependencies and requirements
  • added documentation for YAML template structure to the documentation website
  • added documentation for mathematical syntax
  • added the changelog to the documentation website
PyRates - v0.17.0: Improved template views

Published by Richert about 2 years ago

  • added __getitem__ methods on all frontend template classes that allow for a less convoluted examination of the major properties of the template classes
  • added pytests that test these new features
  • users can now quickly access each node on CircuitTemplate, each operator on NodeTemplate and EdgeTemplate, and each variable on OperatorTemplate
PyRates - v0.16.0: New parameter sweep functionalities

Published by Richert about 2 years ago

  • added class for interactive grid search results visualization to utility
  • changed organization of the pandas DataFrames that grid-search returns: Each different parameterization of the model appears only once in the param_grid.index and the results DataFrame uses a full hierarchical column organization.
  • The pandas DataFrame returned by CircuitTemplate.run uses a fully hierarchical column organization now: Every node hierarchy level is a separate level in the column index hierarchy.
  • minor docstring improvements
  • fixed bug in edge equation setup where a wrong index was provided to the target variable sometimes
  • fixed bug in variable updating that occurred for numpy.ndarray variables where the shape attribute was an empty tuple
  • applied all changed to the gallery examples in the documentation
PyRates - v0.15.1: New ComputeGraph Subclass

Published by Richert about 2 years ago

  • added generic method for state variable indexing to circuit.py that is used for all edge-related indexing operations now (replacing multiple, slightly different implementations at various places in circuit.py)
  • added an alternative compute graph class that can be used to generate function files that do not perform in-place manipulations of the vectorfield dy but instead just create a new variable. This is relevant for gradient-based optimization.
  • improved the modularity of the ComputeGraph
  • added a method add_import to the backend that allows adding import statements to the top of a function file
  • added a backend function concatenate that can be used in equation strings now in order to combine vectorized variables
  • removed a bug where calling clear_frontend_caches did not clear all IR caches properly
PyRates - v0.15.0: Support for vectorized state variables

Published by Richert about 2 years ago

  • added support for models with vectorized state-variables
  • improved performance of edge operations
  • more detailed output about returned function arguments when calling CircuitTemplate.get_run_func
  • improved memory consumption during model initialization
  • complex-valued models use complex variable types for all variables and parameters now, to prevent type conversions
  • added a new method CircuitTemplate.get_var that allows users to access backend variables after calling CircuitTemplate.get_run_func
  • added automated reduction of vectorized constants, if all constants are identical
  • added possibility to pass iterables to CircuitTemplate.update_var, thus allowing to update vectorized variables in one go
  • updated CircuitTemplate.add_edges_from_matrix such that only edges with non-zero weights are added to the CircuitTemplate instance
PyRates - v0.14.3: Minor convenience functions

Published by Richert about 2 years ago

  • run-function generating method ComputeGraph.to_func() now returns the keys of the function arguments together with the arguments (tuple of size 3 is the new return value)
  • implemented a method CircuitTemplate.get_variable_positions that allows to get the indices of state variables within the system state vector
PyRates - v0.14.2: Updated changelog

Published by Richert over 2 years ago

Updated changelog to account for changes between v0.14.0 and v0.14.1

PyRates - v0.14.1: Improved Izhikevich model support

Published by Richert over 2 years ago

  • added more Izhikevich mean-field model versions (biophysical and unitless, distributed background currents and spike thresholds)
  • moved all Izhikevich model templates into a separate yaml file
  • improved documentation gallery examples (removed typos from equations, debugged image embeddings)
PyRates - v0.14.0: Heun's method

Published by Richert over 2 years ago

  • added Heun's method as a new method for solving the DE systems
  • Heun's method has been integrated with all backends
  • correct implementation of Heun's method is ensured by testing it against Eulers method and a Runge-Kutta method
  • added Heun's method to the simulations gallery example
  • improved the backend implementation of choosing between different solvers (less overlap between different backends)
  • improved documentation of the numerical solvers used in the simulations gallery example
PyRates - v0.13.0: Delayed Differential Equations

Published by Richert over 2 years ago

  • added support for delayed differential equation (DDE) systems
  • a function past(y, tau) is now available for any backend that allows to evaluate a state variable y at time t-tau
  • edges with discrete delays that are to be used in combination with an adaptive step-size solver are translated into past calls
  • a gallery example was added that demonstrates how to interface the Python package ddeint via a DDE system generated by PyRates
  • the Julia backend received support for performing DDE simulations from within PyRates via its interface to DifferentialEquations.jl