Skip to content

Commit 013007f

Browse files
authored
[bug] Fix order of return values in __load_state__ (#749)
* Fix order of return values in state_dict key comparison * Update ci
1 parent b11b041 commit 013007f

4 files changed

Lines changed: 8 additions & 9 deletions

File tree

.github/workflows/CI-models.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
strategy:
2323
fail-fast: false
2424
matrix:
25-
python-version: [ "3.9", "3.10", "3.11", "3.12"]
25+
python-version: [ "3.10", "3.11", "3.12"]
2626

2727
steps:
2828
- uses: actions/checkout@v4
@@ -70,7 +70,7 @@ jobs:
7070
strategy:
7171
fail-fast: false
7272
matrix:
73-
python-version: [ "3.9", "3.10", "3.11", "3.12"]
73+
python-version: [ "3.10", "3.11", "3.12"]
7474

7575
steps:
7676
- uses: actions/checkout@v4
@@ -119,7 +119,7 @@ jobs:
119119
strategy:
120120
fail-fast: false
121121
matrix:
122-
python-version: ["3.9", "3.10", "3.11", "3.12"]
122+
python-version: ["3.10", "3.11", "3.12"]
123123

124124
steps:
125125
- uses: actions/checkout@v4

.github/workflows/CI.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
strategy:
2929
fail-fast: false
3030
matrix:
31-
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
31+
python-version: [ "3.10", "3.11", "3.12" ]
3232

3333
steps:
3434
- name: Cancel Previous Runs
@@ -59,7 +59,7 @@ jobs:
5959
strategy:
6060
fail-fast: false
6161
matrix:
62-
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
62+
python-version: [ "3.10", "3.11", "3.12" ]
6363

6464
steps:
6565
- name: Cancel Previous Runs
@@ -92,7 +92,7 @@ jobs:
9292
strategy:
9393
fail-fast: false
9494
matrix:
95-
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
95+
python-version: [ "3.10", "3.11", "3.12" ]
9696

9797
steps:
9898
- name: Cancel Previous Runs

brainpy/_src/math/object_transform/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ def __load_state__(self, state_dict: Dict, **kwargs) -> Optional[Tuple[Sequence[
517517
variables[key].value = jax.numpy.asarray(state_dict[key])
518518
unexpected_keys = list(keys1 - keys2)
519519
missing_keys = list(keys2 - keys1)
520-
return unexpected_keys, missing_keys
520+
return missing_keys, unexpected_keys
521521

522522
def state_dict(self, **kwargs) -> dict:
523523
"""Returns a dictionary containing a whole state of the module.

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
author='BrainPy Team',
5757
author_email='chao.brain@qq.com',
5858
packages=packages,
59-
python_requires='>=3.9',
59+
python_requires='>=3.10',
6060
install_requires=['numpy>=1.15', 'jax>=0.4.13,<0.6.0', 'tqdm'],
6161
url='https://github.com/brainpy/BrainPy',
6262
project_urls={
@@ -84,7 +84,6 @@
8484
'Operating System :: OS Independent',
8585
'Programming Language :: Python',
8686
'Programming Language :: Python :: 3',
87-
'Programming Language :: Python :: 3.9',
8887
'Programming Language :: Python :: 3.10',
8988
'Programming Language :: Python :: 3.11',
9089
'Programming Language :: Python :: 3.12',

0 commit comments

Comments
 (0)