Skip to content

Commit

Permalink
Merge branch 'brainpy:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
PraPaudel authored Nov 27, 2024
2 parents 085d5e0 + 589a27c commit fb5340c
Show file tree
Hide file tree
Showing 123 changed files with 3,738 additions and 14,977 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Test with pytest
run: |
cd brainpy
pytest _src/
export IS_GITHUB_ACTIONS=1 && pytest _src/
test_macos:
Expand Down Expand Up @@ -79,10 +79,12 @@ jobs:
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
pip uninstall brainpy -y
python setup.py install
pip install jax==0.4.30
pip install jaxlib==0.4.30
- name: Test with pytest
run: |
cd brainpy
pytest _src/
export IS_GITHUB_ACTIONS=1 && pytest _src/
test_windows:
Expand Down Expand Up @@ -113,4 +115,4 @@ jobs:
- name: Test with pytest
run: |
cd brainpy
pytest _src/ -p no:faulthandler
set IS_GITHUB_ACTIONS=1 && pytest _src/
4 changes: 2 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Docker Build & Push (version tag)
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: ${{ matrix.context }}
tags: ${{ matrix.base }}:${{ env.DOCKER_TAG_NAME }}
Expand All @@ -51,7 +51,7 @@ jobs:
- name: Docker Build & Push (latest tag)
if: |
(github.event_name == 'release' && ! github.event.release.prerelease)
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: ${{ matrix.context }}
tags: ${{ matrix.base }}:latest
Expand Down
37 changes: 19 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,21 @@ BrainPy is a flexible, efficient, and extensible framework for computational neu
- **Source on OpenI**: https://git.openi.org.cn/OpenI/BrainPy


---
**NOTE**

Starting from our experimental BrainPy package, a better and mature ecosystem for brain dynamics programming is emerging.
Please see the [Brain Dynamics Programming Ecosystem](https://ecosystem-for-brain-dynamics.readthedocs.io/) for more details.


If you are heavily using BrainPy, please consider using [brainstate](https://brainstate.readthedocs.io) for a more stable, efficient, concise, and powerful experience.


[brainstate](https://github.com/chaobrain/brainstate) is and will be active maintained and developed by our team. We highly recommend transferring your code to [brainstate](https://brainstate.readthedocs.io) for a better performance.

---



## Installation

Expand Down Expand Up @@ -50,8 +65,12 @@ We provide a Binder environment for BrainPy. You can use the following button to
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/brainpy/BrainPy-binder/main)




## Ecosystem


- **[Brain Dynamics Programming Ecosystem](https://ecosystem-for-brain-dynamics.readthedocs.io/)**: An emerging and mature ecosystem for brain dynamics programming.
- **[BrainPy](https://github.com/brainpy/BrainPy)**: The solution for the general-purpose brain dynamics programming.
- **[brainpy-examples](https://github.com/brainpy/examples)**: Comprehensive examples of BrainPy computation.
- **[brainpy-datasets](https://github.com/brainpy/datasets)**: Neuromorphic and Cognitive Datasets for Brain Dynamics Modeling.
Expand All @@ -67,21 +86,3 @@ Our team is committed to the long-term maintenance and development of the projec

If you are using ``brainpy``, please consider citing [the corresponding papers](https://brainpy.readthedocs.io/en/latest/tutorial_FAQs/citing_and_publication.html).



## Ongoing development plans

We highlight the key features and functionalities that are currently under active development.

We also welcome your contributions
(see [Contributing to BrainPy](https://brainpy.readthedocs.io/en/latest/tutorial_advanced/contributing.html)).

- [x] model and data parallelization on multiple devices for dense connection models
- [ ] model parallelization on multiple devices for sparse spiking network models
- [ ] data parallelization on multiple devices for sparse spiking network models
- [ ] pipeline parallelization on multiple devices for sparse spiking network models
- [ ] multi-compartment modeling
- [ ] measurements, analysis, and visualization methods for large-scale spiking data
- [ ] Online learning methods for large-scale spiking network models
- [ ] Classical plasticity rules for large-scale spiking network models

74 changes: 74 additions & 0 deletions brainpy-changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,80 @@


## brainpy>2.3.x
### Version 2.6.1
#### Breaking Changes
- Fixing compatibility issues between `numpy` and `jax`

#### What's Changed
* [doc] Add Chinese version of `operator_custom_with_cupy.ipynb` and Rename it's title by @Routhleck in https://github.com/brainpy/BrainPy/pull/659
* Fix "amsgrad" is used before being defined when initializing the AdamW optimizer by @CloudyDory in https://github.com/brainpy/BrainPy/pull/660
* fix issue #661 by @chaoming0625 in https://github.com/brainpy/BrainPy/pull/662
* fix flax RNN interoperation, fix #663 by @chaoming0625 in https://github.com/brainpy/BrainPy/pull/665
* [fix] Replace jax.experimental.host_callback with jax.pure_callback by @Routhleck in https://github.com/brainpy/BrainPy/pull/670
* [math] Update `CustomOpByNumba` to support JAX version >= 0.4.24 by @Routhleck in https://github.com/brainpy/BrainPy/pull/669
* [math] Fix `CustomOpByNumba` on `multiple_results=True` by @Routhleck in https://github.com/brainpy/BrainPy/pull/671
* [math] Implementing event-driven sparse matrix @ matrix operators by @Routhleck in https://github.com/brainpy/BrainPy/pull/613
* [math] Add getting JIT connect matrix method for `brainpy.dnn.linear` by @Routhleck in https://github.com/brainpy/BrainPy/pull/672
* [math] Add get JIT weight matrix methods(Uniform & Normal) for `brainpy.dnn.linear` by @Routhleck in https://github.com/brainpy/BrainPy/pull/673
* support `Integrator.to_math_expr()` by @chaoming0625 in https://github.com/brainpy/BrainPy/pull/674
* [bug] Replace `collections.Iterable` with `collections.abc.Iterable` by @Routhleck in https://github.com/brainpy/BrainPy/pull/677
* Fix surrogate gradient function and numpy 2.0 compatibility by @chaoming0625 in https://github.com/brainpy/BrainPy/pull/679
* :arrow_up: Bump docker/build-push-action from 5 to 6 by @dependabot in https://github.com/brainpy/BrainPy/pull/678
* fix the incorrect verbose of `clear_name_cache()` by @chaoming0625 in https://github.com/brainpy/BrainPy/pull/681
* [bug] Fix prograss bar is not displayed and updated as expected by @Routhleck in https://github.com/brainpy/BrainPy/pull/683
* Fix autograd by @chaoming0625 in https://github.com/brainpy/BrainPy/pull/687


**Full Changelog**: https://github.com/brainpy/BrainPy/compare/V2.6.0...V2.6.1

### Version 2.6.0

#### New Features

This release provides several new features, including:

- ``MLIR`` registered operator customization interface in ``brainpy.math.XLACustomOp``.
- Operator customization with CuPy JIT interface.
- Bug fixes.



#### What's Changed
* [doc] Fix the wrong path of more examples of `operator customized with taichi.ipynb` by @Routhleck in https://github.com/brainpy/BrainPy/pull/612
* [docs] Add colab link for documentation notebooks by @Routhleck in https://github.com/brainpy/BrainPy/pull/614
* Update requirements-doc.txt to fix doc building temporally by @chaoming0625 in https://github.com/brainpy/BrainPy/pull/617
* [math] Rebase operator customization using MLIR registration interface by @chaoming0625 in https://github.com/brainpy/BrainPy/pull/618
* [docs] Add kaggle link for documentation notebooks by @Routhleck in https://github.com/brainpy/BrainPy/pull/619
* update requirements by @chaoming0625 in https://github.com/brainpy/BrainPy/pull/620
* require `brainpylib>=0.2.6` for `jax>=0.4.24` by @chaoming0625 in https://github.com/brainpy/BrainPy/pull/622
* [tools] add `brainpy.tools.compose` and `brainpy.tools.pipe` by @chaoming0625 in https://github.com/brainpy/BrainPy/pull/624
* doc hierarchy update by @chaoming0625 in https://github.com/brainpy/BrainPy/pull/630
* Standardizing and generalizing object-oriented transformations by @chaoming0625 in https://github.com/brainpy/BrainPy/pull/628
* fix #626 by @chaoming0625 in https://github.com/brainpy/BrainPy/pull/631
* Fix delayvar not correct in concat mode by @CloudyDory in https://github.com/brainpy/BrainPy/pull/632
* [dependency] remove hard dependency of `taichi` and `numba` by @Routhleck in https://github.com/brainpy/BrainPy/pull/635
* `clear_buffer_memory()` support clearing `array`, `compilation`, and `names` by @chaoming0625 in https://github.com/brainpy/BrainPy/pull/639
* add `brainpy.math.surrogate..Surrogate` by @chaoming0625 in https://github.com/brainpy/BrainPy/pull/638
* Enable brainpy object as pytree so that it can be applied with ``jax.jit`` etc. directly by @chaoming0625 in https://github.com/brainpy/BrainPy/pull/625
* Fix ci by @chaoming0625 in https://github.com/brainpy/BrainPy/pull/640
* Clean taichi AOT caches by @chaoming0625 in https://github.com/brainpy/BrainPy/pull/643
* [ci] Fix windows pytest fatal exception by @Routhleck in https://github.com/brainpy/BrainPy/pull/644
* [math] Support more than 8 parameters of taichi gpu custom operator definition by @Routhleck in https://github.com/brainpy/BrainPy/pull/642
* Doc for ``brainpylib>=0.3.0`` by @chaoming0625 in https://github.com/brainpy/BrainPy/pull/645
* Find back updates by @chaoming0625 in https://github.com/brainpy/BrainPy/pull/646
* Update installation instruction by @chaoming0625 in https://github.com/brainpy/BrainPy/pull/651
* Fix delay bug by @chaoming0625 in https://github.com/brainpy/BrainPy/pull/650
* update doc by @chaoming0625 in https://github.com/brainpy/BrainPy/pull/652
* [math] Add new customize operators with `cupy` by @Routhleck in https://github.com/brainpy/BrainPy/pull/653
* [math] Fix taichi custom operator on gpu backend by @Routhleck in https://github.com/brainpy/BrainPy/pull/655
* update cupy operator custom doc by @chaoming0625 in https://github.com/brainpy/BrainPy/pull/656
* version 2.6.0 by @chaoming0625 in https://github.com/brainpy/BrainPy/pull/657
* Upgrade CI by @chaoming0625 in https://github.com/brainpy/BrainPy/pull/658

## New Contributors
* @CloudyDory made their first contribution in https://github.com/brainpy/BrainPy/pull/632

**Full Changelog**: https://github.com/brainpy/BrainPy/compare/V2.5.0...V2.6.0


### Version 2.5.0
Expand Down
5 changes: 5 additions & 0 deletions brainpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,8 @@

del deprecation_getattr2

# jax config
import os
os.environ['XLA_FLAGS'] = '--xla_cpu_use_thunk_runtime=false'
import jax
jax.config.update('jax_cpu_enable_async_dispatch', False)
2 changes: 1 addition & 1 deletion brainpy/_src/analysis/highdim/slow_points.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ def find_fps_with_gd_method(
"""
# optimization settings
if optimizer is None:
optimizer = optim.Adam(lr=optim.ExponentialDecay(0.2, 1, 0.9999),
optimizer = optim.Adam(lr=optim.ExponentialDecayLR(0.2, 1, 0.9999),
beta1=0.9, beta2=0.999, eps=1e-8)
else:
if not isinstance(optimizer, optim.Optimizer):
Expand Down
Loading

0 comments on commit fb5340c

Please sign in to comment.