|
1 | 1 | # Changelog |
2 | 2 |
|
3 | | - |
4 | 3 | ## Version 3.0.0 |
5 | 4 |
|
| 5 | +**Release Date:** October 2025 |
| 6 | + |
| 7 | +This is a major release with significant architectural changes and improvements. BrainPy 3.0.0 introduces a new API design while maintaining backward compatibility through the `brainpy.version2` module. |
| 8 | + |
| 9 | +### Major Changes |
| 10 | + |
| 11 | +#### Architecture Reorganization |
| 12 | +- **BREAKING CHANGE**: All existing BrainPy 2.x functionality has been moved to `brainpy.version2` module |
| 13 | + - Users can migrate existing code by replacing `import brainpy` with `import brainpy.version2 as brainpy` |
| 14 | + - The old `brainpy._src` module structure has been completely reorganized into `brainpy.version2` |
| 15 | + - All submodules (math, dyn, dnn, etc.) are now under `brainpy.version2.*` |
| 16 | + |
| 17 | +#### New Core API (brainpy.*) |
| 18 | +- Introduced simplified, streamlined API in the main `brainpy` namespace |
| 19 | +- New core modules include: |
| 20 | + - Base classes for neurons and synapses |
| 21 | + - LIF (Leaky Integrate-and-Fire) neuron models |
| 22 | + - Exponential synapse models |
| 23 | + - Synaptic projection modules |
| 24 | + - Short-term plasticity (STP) models |
| 25 | + - Input current generators |
| 26 | + - Readout layers |
| 27 | + - Error handling utilities |
| 28 | + |
| 29 | +### Dependencies |
| 30 | +- **Updated**: `brainstate>=0.2.0` (was `>=0.1.0`) |
| 31 | +- **Updated**: `brainevent>=0.0.4` (new requirement) |
| 32 | +- **Updated**: `braintools>=0.0.9` (integrated into brainpy) |
| 33 | +- **Removed**: Hard dependency on `taichi` and `numba` - now optional |
| 34 | +- **Updated**: JAX compatibility improvements for version 0.5.0+ |
| 35 | + |
| 36 | +### Features |
| 37 | + |
| 38 | +#### Integration of Brain Ecosystem Libraries |
| 39 | +- Integrated `brainstate` for state management (#763) |
| 40 | +- Integrated `brainevent` for event-driven computations (#771) |
| 41 | +- Integrated `braintools` utilities and formatting (#769) |
| 42 | + |
| 43 | +#### Math Module Enhancements (version2.math) |
| 44 | +- Added event-driven sparse matrix @ matrix operators (#613) |
| 45 | +- Added `ein_rearrange`, `ein_reduce`, and `ein_repeat` functions (#590) |
| 46 | +- Added `unflatten` function and `Unflatten` layer (#588) |
| 47 | +- Added JIT weight matrix methods (Uniform & Normal) for `dnn.linear` (#673) |
| 48 | +- Added JIT connect matrix method for `dnn.linear` (#672) |
| 49 | +- Replaced math operators with `braintaichi` for better performance (#698) |
| 50 | +- Support for custom operators using CuPy (#653) |
| 51 | +- Taichi operators as default customized operators (#598) |
| 52 | +- Enhanced taichi custom operator support with GPU backend (#655) |
| 53 | +- Support for more than 8 parameters in taichi GPU operator customization (#642) |
| 54 | +- Rebased operator customization using MLIR registration interface (#618) |
| 55 | +- Added transparent taichi caches with clean caches function (#596) |
| 56 | +- Support for taichi customized op with metal CPU backend (#579) |
| 57 | +- Improved variable retrieval system (#589) |
| 58 | + |
| 59 | +#### Deep Learning (version2.dnn) |
| 60 | +- Improved error handling in `dnn/linear` module (#704) |
| 61 | +- Enhanced activation functions and layers |
| 62 | + |
| 63 | +#### Dynamics (version2.dyn) |
| 64 | +- Refactored STDP weight update logic requiring `brainevent>=0.0.4` (#771) |
| 65 | +- Fixed STDP and training workflows for JAX compatibility (#772) |
| 66 | +- Enhanced dual exponential synapse model with `normalize` parameter |
| 67 | +- Improved alpha synapse implementation |
| 68 | +- Added `clear_input` in the `step_run` function (#601) |
| 69 | + |
| 70 | +#### Integrators (version2.integrators) |
| 71 | +- Support for `Integrator.to_math_expr()` (#674) |
| 72 | +- Fixed dtype checking during exponential Euler method |
| 73 | +- Added `disable_jit` support in `brainpy.math.scan` (#606) |
| 74 | +- Fixed `brainpy.math.scan` implementation (#604) |
| 75 | + |
| 76 | +#### Optimizers (version2.optim) |
| 77 | +- Fixed AdamW optimizer initialization where "amsgrad" was used before being defined (#660) |
| 78 | + |
| 79 | +#### Tools & Utilities (version2.tools) |
| 80 | +- Added `brainpy.tools.compose` and `brainpy.tools.pipe` functions (#624) |
| 81 | + |
| 82 | +### Bug Fixes |
| 83 | + |
| 84 | +#### JAX Compatibility |
| 85 | +- Updated JAX import paths for compatibility with version 0.5.0+ (#722) |
| 86 | +- Fixed compatibility issues with latest JAX versions (#691, #708, #716) |
| 87 | +- Replaced `jax.experimental.host_callback` with `jax.pure_callback` (#670) |
| 88 | +- Fixed `test_ndarray.py` for latest JAX version (#708) |
| 89 | + |
| 90 | +#### Math & Operations |
| 91 | +- Fixed `CustomOpByNumba` with `multiple_results=True` (#671) |
| 92 | +- Updated `CustomOpByNumba` to support JAX version >= 0.4.24 (#669) |
| 93 | +- Fixed `brainpy.math.softplus` and `brainpy.dnn.SoftPlus` (#581) |
| 94 | +- Fixed bugs in `truncated_normal` and added `TruncatedNormal` initialization (#583, #584, #585, #574, #575) |
| 95 | +- Fixed autograd functionality (#687) |
| 96 | +- Fixed order of return values in `__load_state__` (#749) |
| 97 | + |
| 98 | +#### Delay & Timing |
| 99 | +- Fixed delay bugs including DelayVar in concat mode (#632, #650) |
| 100 | +- Fixed wrong randomness in OU process input (#715) |
| 101 | + |
| 102 | +#### UI & Progress |
| 103 | +- Fixed progress bar display and update issues (#683) |
| 104 | +- Fixed incorrect verbose of `clear_name_cache()` (#681) |
| 105 | + |
| 106 | +#### Python Compatibility |
| 107 | +- Replaced `collections.Iterable` with `collections.abc.Iterable` for Python 3.10+ (#677) |
| 108 | +- Fixed surrogate gradient function for numpy 2.0 compatibility (#679) |
| 109 | + |
| 110 | +#### Interoperability |
| 111 | +- Fixed Flax RNN interoperation (#665) |
| 112 | +- Fixed issue with external library integration (#661, #662) |
| 113 | + |
| 114 | +#### Exception Handling |
| 115 | +- Fixed exception handling for missing braintaichi module in dependency check (#746) |
| 116 | + |
| 117 | +### Testing & CI |
| 118 | + |
| 119 | +#### Python Support |
| 120 | +- Added CI support for Python 3.12 (#705) |
| 121 | +- Added CI support for Python 3.13 |
| 122 | +- Updated supported Python versions: 3.10, 3.11, 3.12, 3.13 |
| 123 | + |
| 124 | +#### CI Improvements |
| 125 | +- Updated GitHub Actions: |
| 126 | + - `actions/setup-python` from 5 to 6 (#783) |
| 127 | + - `actions/checkout` from 4 to 5 (#773) |
| 128 | + - `actions/first-interaction` from 1 to 3 (#782) |
| 129 | + - `actions/labeler` from 5 to 6 (#781) |
| 130 | + - `actions/download-artifact` from 4 to 5 (#780) |
| 131 | + - `actions/stale` from 9 to 10 (#779) |
| 132 | + - `docker/build-push-action` from 5 to 6 (#678) |
| 133 | +- Added greetings workflow and labeler configuration |
| 134 | +- Enhanced issue templates and CI configurations |
| 135 | + |
| 136 | +### Documentation |
| 137 | + |
| 138 | +#### Major Documentation Overhaul |
| 139 | +- Introduced new BrainPy 3.0 documentation and tutorials (#787) |
| 140 | +- Added comprehensive documentation and examples for BrainPy 3.x (#785) |
| 141 | +- Updated documentation links for BrainPy 3.0 and 2.0 (#786) |
| 142 | +- Implemented dynamic configuration loading for Read the Docs (#784) |
| 143 | +- Added Colab and Kaggle links for documentation notebooks (#614, #619) |
| 144 | +- Added Chinese version of `operator_custom_with_cupy.ipynb` (#659) |
| 145 | +- Fixed various documentation build issues and path references |
| 146 | + |
| 147 | +#### Citation & Acknowledgments |
| 148 | +- Added BrainPy citation information (#770) |
| 149 | +- Updated ACKNOWLEDGMENTS.md |
| 150 | + |
| 151 | +#### Installation |
| 152 | +- Refined installation instructions (#767) |
| 153 | +- Updated docstring and parameter formatting (#766) |
| 154 | +- Updated README with ecosystem information |
| 155 | + |
| 156 | +### Performance & Memory Management |
| 157 | +- Enabled `clear_buffer_memory()` to support clearing `array`, `compilation`, and `names` (#639) |
| 158 | +- Cleaned taichi AOT caches and enabled `numpy_func_return` setting (#643) |
| 159 | +- Made taichi caches more transparent (#596) |
| 160 | +- Enabled BrainPy objects as pytree for direct use with `jax.jit` (#625) |
| 161 | + |
| 162 | +### Object-Oriented Transformations |
| 163 | +- Standardized and generalized object-oriented transformations (#628) |
| 164 | + |
| 165 | +### Development & Contributing |
| 166 | +- Updated CONTRIBUTING.md with new guidelines |
| 167 | +- Added CODEOWNERS file |
| 168 | +- Updated SECURITY.md |
| 169 | +- License updated to Apache License 2.0 |
| 170 | + |
| 171 | +### Removed |
| 172 | +- Removed Docker workflow |
| 173 | +- Removed hard dependencies on `taichi` and `numba` (#635) |
| 174 | +- Removed op register functionality (#700) |
| 175 | +- Removed deprecated deprecation files and old module structure |
| 176 | +- Removed unnecessary dependencies (#703) |
| 177 | + |
| 178 | +### Migration Guide |
| 179 | + |
| 180 | +For users upgrading from BrainPy 2.6.x: |
| 181 | + |
| 182 | +1. **Keep using BrainPy 2.x API**: Replace imports with `brainpy.version2` |
| 183 | + ```python |
| 184 | + # Old code (BrainPy 2.x) |
| 185 | + import brainpy as bp |
| 186 | + |
| 187 | + # New code (BrainPy 3.0 with backward compatibility) |
| 188 | + import brainpy.version2 as bp |
| 189 | + ``` |
| 190 | + |
| 191 | +2. **Adopt new BrainPy 3.0 API**: Explore the simplified API in the main `brainpy` namespace for new projects |
| 192 | + |
| 193 | +3. **Update dependencies**: Ensure `brainstate>=0.2.0`, `brainevent>=0.0.4`, and `braintools>=0.0.9` are installed |
| 194 | + |
| 195 | +4. **Review breaking changes**: Check if your code uses any of the reorganized internal modules |
| 196 | + |
| 197 | +### Notes |
| 198 | +- This release maintains backward compatibility through `brainpy.version2` |
| 199 | +- The new API in the main `brainpy` namespace represents the future direction of the library |
| 200 | +- Documentation for both versions is available on Read the Docs |
| 201 | + |
6 | 202 |
|
7 | 203 |
|
0 commit comments