Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/collection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ permissions:
jobs:
collection:
name: Base installation / Python ${{ matrix.python }}
runs-on: ubuntu-latest
# Newer runner images no longer provide the Python 3.9 compatibility target.
runs-on: ubuntu-22.04
strategy:
matrix:
python: ['3.9', '3.12']
Expand Down
132 changes: 132 additions & 0 deletions .github/workflows/model-sources.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
name: Real network sources

on:
pull_request:
branches: [master, main]
paths: ['src/**', 'tests/**', 'configs/**', 'catalogs/**', 'pyproject.toml', '.github/workflows/model-sources.yml']
push:
branches: [master, main]
paths: ['src/**', 'tests/**', 'configs/**', 'catalogs/**', 'pyproject.toml', '.github/workflows/model-sources.yml']
workflow_dispatch:

permissions:
contents: read

jobs:
source-smoke:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install fixed CPU export environment
run: |
python -m pip install torch==2.9.1 torchvision==0.24.1 --index-url https://download.pytorch.org/whl/cpu
python -m pip install -e '.[networks,test]' -c configs/constraints-networks.txt
python -m pip check
- name: Check all source adapters and PyTorch/ONNX parity
env:
OMP_NUM_THREADS: '1'
OPENBLAS_NUM_THREADS: '1'
MKL_NUM_THREADS: '1'
run: |
python -m pytest tests/unit tests/operators -q --junitxml=.validation/network-tests.xml
infinitensor-test-expand --manifest configs/network-source-smoke.json --data-dir .validation/source-smoke --offline --minimum-real-models 3 --max-size-mb 160 --jobs 1
- uses: actions/upload-artifact@v4
if: always()
with:
name: real-network-source-evidence
include-hidden-files: true
path: |
.validation/network-tests.xml
.validation/source-smoke/expansion/inventory.json
.validation/source-smoke/expansion/results.json
.validation/source-smoke/expansion/batches/**/worker-*.log

diverse-smoke:
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install fixed CPU multi-task environment
run: |
python -m pip install torch==2.9.1 torchvision==0.24.1 torchaudio==2.9.1 --index-url https://download.pytorch.org/whl/cpu
python -m pip install -e '.[diverse,test]' -c configs/constraints-diverse.txt
python -m pip check
- name: Validate real multi-task networks and input contracts
env:
OMP_NUM_THREADS: '1'
OPENBLAS_NUM_THREADS: '1'
MKL_NUM_THREADS: '1'
run: |
python -m pytest tests/integration/test_diverse_sources.py -q --junitxml=.validation/diverse-tests.xml
infinitensor-test-expand --manifest configs/diverse-source-smoke.json --data-dir .validation/diverse-smoke --offline --minimum-real-models 6 --max-size-mb 768 --jobs 1
- uses: actions/upload-artifact@v4
if: always()
with:
name: diverse-network-source-evidence
include-hidden-files: true
path: |
.validation/diverse-tests.xml
.validation/diverse-smoke/expansion/inventory.json
.validation/diverse-smoke/expansion/results.json
.validation/diverse-smoke/expansion/batches/**/worker-*.log

paddle-smoke:
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install independent CPU Paddle environment
shell: bash
run: |
# onnxoptimizer 0.3.13 has no cp312 wheel and vendors CMake 3.1 policies.
python -m pip install cmake==3.31.10
# PEP 517 isolation hides the cmake Python module from its wrapper.
export PATH="$(python -c 'import cmake; print(cmake.CMAKE_BIN_DIR)'):$PATH"
cmake --version
if ! python -m pip install -e '.[paddle,test]' -c configs/constraints-paddle.txt 2>&1 | tee paddle-install.log; then
python - <<'PY'
from pathlib import Path
lines = Path('paddle-install.log').read_text().splitlines()
starts = [i for i, line in enumerate(lines) if any(term in line for term in ('CMake Error', 'ModuleNotFoundError', 'Traceback'))]
detail = [line for i in starts[:4] for line in lines[max(0, i-2):i+16]]
text = '\n'.join(detail + lines[-30:])
text = text.replace('%', '%25').replace('\r', '%0D').replace('\n', '%0A')
print('::error title=Paddle dependency installation failed::' + text)
PY
exit 1
fi
- name: Check independent Paddle dependencies
run: python -m pip check
- name: Prepare pinned Paddle sources
run: |
infinitensor-test-paddle-setup --directory .validation/paddle-repos
- name: Validate Paddle exports and four real tasks
env:
ITEST_PADDLE_REPOS_DIR: ${{ github.workspace }}/.validation/paddle-repos
OMP_NUM_THREADS: '1'
OPENBLAS_NUM_THREADS: '1'
MKL_NUM_THREADS: '1'
run: |
python -m pytest tests/integration/test_paddle_exports.py -q --junitxml=.validation/paddle-tests.xml
infinitensor-test-expand --manifest configs/paddle-source-smoke.json --data-dir .validation/paddle-smoke --offline --minimum-real-models 4 --max-size-mb 768 --jobs 2 --timeout 300
- uses: actions/upload-artifact@v4
if: always()
with:
name: paddle-network-source-evidence
include-hidden-files: true
path: |
paddle-install.log
.validation/paddle-tests.xml
.validation/paddle-smoke/expansion/inventory.json
.validation/paddle-smoke/expansion/results.json
.validation/paddle-smoke/expansion/batches/**/worker-*.log
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ htmlcov/
venv/
env/
.venv/
.venv-networks/

# IDE
.idea/
Expand All @@ -31,6 +32,10 @@ data/models/
data/cache/
data/results/
data/reports/
data/real-networks/
data/paddle-repos/
data/paddle-networks/
.venv-paddle/
*.log

# Model files (NEVER commit)
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# InfiniTensor-Test

The [general corpus](catalogs/real-networks.json) and [Paddle corpus](catalogs/paddle-networks.json)
contain **1,422 deduplicated network configurations across 21 tasks** (1,409 + 13),
including OCR, table structure, image matting, text, audio, video and optical flow,
validated with ONNX checks, ONNX Runtime and all-output PyTorch/ONNX comparison.
The 548 synthetic positives and 18 negatives are counted separately. See
[multi-task sources](docs/task-expansion.md) and [Paddle sources and replay commands](docs/paddle-models.md).

This change combines lazy sources, reproducible package collection and model
validity repairs: 548 synthetic positives must pass ONNX checks and CPU reference
execution; 18 declared negatives must be rejected for their specified reasons.
Expand Down
5 changes: 5 additions & 0 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# InfiniTensor-Test

[通用清单](catalogs/real-networks.json)与[飞桨清单](catalogs/paddle-networks.json)合计
**1422 个去重网络配置、21 种任务**(1409 + 13),新增 OCR、表格结构、图像抠图等任务,
全部通过 ONNX 检查、参考执行及原始框架/ONNX 全部输出比较。原有 548 个合成正例与 18 个负例另计。
安装与复验见[多任务网络说明](docs/task-expansion.md)和[飞桨模型接入说明](docs/paddle-models.md)。

本分支合并采集基础与模型有效性修复:来源按需加载、确定性完整包缓存,
以及 548 个合成正例的 ONNX 检查和 CPU 参考执行、18 个明确负例的按原因拒绝验证。
请先阅读[能力提升及复验命令](docs/pr-t01-collection.md)与[PR 审查说明](docs/pr-t01-review.md)。
Expand Down
Loading
Loading