Skip to content

Commit

Permalink
Merge pull request #155 from PAICookers/dev
Browse files Browse the repository at this point in the history
Release: v1.2.0
  • Loading branch information
KafCoppelia authored Dec 16, 2024
2 parents ff09f3f + b87de42 commit 8f3fff0
Show file tree
Hide file tree
Showing 71 changed files with 11,345 additions and 4,809 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Pytest & code coverage

on:
push:
branches:
- master
pull_request:
branches:
- master
- dev
paths:
- "paibox/**"
- "tests/**"
- ".github/workflows/codecov.yml"
- "pyproject.toml"
- "poetry.lock"

permissions:
contents: read

jobs:
pytest:
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
os: [ubuntu-latest, windows-latest]
exclude: # see https://github.com/python/cpython/issues/125842
- python-version: "3.13"
os: windows-latest
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install poetry
uses: abatilo/actions-poetry@v3

- name: Install test dependencies
run: |
poetry install --with test --sync
- name: Run pytest
run: |
poetry run pytest --cov-append --cov-report=xml --junitxml=junit.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
flags: unittests
token: ${{ secrets.CODECOV_TOKEN }}

- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
fail_ci_if_error: true
flags: unittests
token: ${{ secrets.CODECOV_TOKEN }}
3 changes: 1 addition & 2 deletions .github/workflows/poetry-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,5 @@ jobs:
- name: Publish python poetry package
uses: JRubics/[email protected]
with:
python_version: "3.11"
poetry_install_options: "--sync"
pypi_token: ${{ secrets.PYPI_API_TOKEN }}
ignore_dev_requirements: "yes"
45 changes: 0 additions & 45 deletions .github/workflows/pytest-ci.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -155,3 +155,5 @@ cython_debug/
.vscode
debug
*.drawio

.idea/
16 changes: 7 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,28 @@ repos:
rev: 5.13.2
hooks:
- id: isort
stages: [commit]
stages: [pre-commit]

- repo: https://github.com/psf/black
rev: 24.4.2
rev: 24.10.0
hooks:
- id: black
stages: [commit]
stages: [pre-commit]

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
types_or: [markdown, yaml, json]
stages: [commit]
stages: [pre-commit]

- repo: https://github.com/dannysepler/rm_unneeded_f_str
rev: v0.2.0
hooks:
- id: rm-unneeded-f-str

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -42,15 +42,13 @@ repos:
- id: check-symlinks
- id: check-merge-conflict
- id: mixed-line-ending
- id: name-tests-test
args: [--pytest-test-first]
- id: requirements-txt-fixer
- id: pretty-format-json
args: [--autofix]
args: [--autofix, --indent 2]
- id: no-commit-to-branch

- repo: https://github.com/python-poetry/poetry
rev: 1.8.3
rev: 1.8.0
hooks:
- id: poetry-check
- id: poetry-export
Expand Down
27 changes: 23 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

## v1.0.0a6

- 新增 `Always1Neuron` 神经元,该神经元将在工作期间持续输出1,不得单独存在,需存在前向突触与其连接
- 新增 `Always1Neuron` 神经元,该神经元将在工作期间持续输出1,不得单独存在,需存在前向突触与其连接

## v1.0.0a7

Expand Down Expand Up @@ -61,13 +61,32 @@

- 支持神经元的随机突触整合、随机阈值、随机泄露配置的设置,但不支持仿真
- 支持多芯片部署
- 重构路由算法,现在的算法不会出现路由死锁
- 重构路由算法,现在路由不会出现死锁
- 行为变更:

1. 子网络现在直接在主网络内部 `self.subnet=...` 例化即可
2. 编译选项现在直接通过 `paibox.Mapper.compile(...)` 传入,默认配置不变
3.`paibox.Mapper.export()` 中使用 `split_by_chip` 指定配置帧文件是否以芯片分割,默认不分割。原 `split_by_coord` 弃用。
3.`paibox.Mapper.export()` 中通过 `split_by_chip` 选项指定配置帧文件是否以芯片分割,默认不分割。原 `split_by_coord` 选项移除

## v1.1.1

- 修复对权重RAM错误的配置
- 修复对权重 RAM 错误的配置

## v1.2.0a1

- 提高 `paicorelib` 依赖版本至 `~1.3`
- 支持 ANN 网络的构建与部署

## v1.2.0a2

- 提高 `paicorelib` 依赖版本至 `>=1.3.1`
- 支持1D脉冲平均/最大池化算子
- 重构路由算法,支持嵌套路由

## v1.2.0

- 支持 ANN 模式下半折叠算子的构建与部署
- 支持分组卷积,包括 SNN、全展开形式与半折叠形式卷积
- 优化后端构建网络的流程
- 修复当在编译时开启 `core_estimate_only` 选项后导出时将报错的错误。现在在开启此选项后无法导出
- 修复了编译后网络的属性 `inherent_timestep` (即第一次输出有效计算结果的时刻)错误的计算方法。现在将通过标注数据流格式的方式计算得到该属性
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,15 @@
<a href="https://results.pre-commit.ci/latest/github/PAICookers/PAIBox/master">
<img alt="pre-commit.ci status" src="https://results.pre-commit.ci/badge/github/PAICookers/PAIBox/master.svg">
</a>
<a href="https://codecov.io/gh/PAICookers/PAIBox" >
<img src="https://codecov.io/gh/PAICookers/PAIBox/branch/master/graph/badge.svg?token=949SKVGRMC"/>
</a>
</p>

👉 用户使用指南:[Guide-of-PAIBox](docs/Guide-of-PAIBox.md)
👉 [用户使用指南](docs/Guide-of-PAIBox.md)

👉 [支持算子](docs/Support-Ops.md)

高效编写测试项目指南:[Guide-of-Test](docs/Guide-of-Test.md)
👉 [高效编写测试项目指南](docs/Guide-of-Test.md)

[Changelog](./CHANGELOG.md)
👉 [Changelog](./CHANGELOG.md)
Loading

0 comments on commit 8f3fff0

Please sign in to comment.