AlgoBench - 算法基准测试分析工具的 Python SDK 与 CLI
Project description
AlgoBench Python SDK
AlgoBench 是一个算法基准测试分析工具,提供完整的统计分析和决策评估流水线。
安装
pip install algobench-sdk
快速开始
Python 库
from algobench import analyze
result = analyze("data.csv", baseline="V1", compare="V2", metrics=["HPWL", "runtime"])
print(result.decision.label) # "建议上线"
print(result.decision.status) # "yes"
print(result.statistics["HPWL"].mean_imp) # 5.07
print(result.statistics["HPWL"].p_value) # 6.13e-13
命令行
# 完整分析
algobench analyze data.csv -b V1 -c V2 -m HPWL,runtime
# 单指标统计
algobench stats data.csv -b V1 -c V2 -m HPWL
# 数据质量检查
algobench quality data.csv
# 数据诊断
algobench diagnose data.csv
# CSV 格式验证
algobench validate data.csv
CSV 数据格式
Case,Baseline/HPWL,New/HPWL,Baseline/runtime,New/runtime
case1,1200,1100,50,45
case2,800,750,30,28
- 用例列:
Case、Benchmark、Test、Instance等 - 指标列格式:
算法名/指标名(使用/分隔符) - 元数据列:
#前缀(如#Size) - 参数列:
p_前缀(如p_mode)
分析标准
| 模式 | 说明 |
|---|---|
exploratory |
探索模式,识别更多潜在改进 |
standard |
标准模式,平衡灵敏度和可靠性 |
strict |
严格模式,用于发布或关键决策 |
result = analyze("data.csv", baseline="V1", compare="V2", criteria_id="strict")
决策状态
| 状态 | 含义 |
|---|---|
yes |
建议上线 |
watch |
观察期,需要更多数据 |
no |
不建议上线 |
insufficient |
数据不足 |
依赖
- Python >= 3.10
- numpy >= 1.24
- scipy >= 1.10
- pandas >= 2.0
许可证
AGPL-3.0-only
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file algobench_sdk-1.5.3.tar.gz.
File metadata
- Download URL: algobench_sdk-1.5.3.tar.gz
- Upload date:
- Size: 31.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
278092b16061c3b351ec45fc09e7a4a2c03db809b5d2e19c260a05a4e2904270
|
|
| MD5 |
5738b8e86646817805265cb0a04e02da
|
|
| BLAKE2b-256 |
073e5a1b8e7c73c28b68c6c0b582d33a7b957fc0b21de79567b2701e7eeec604
|
Provenance
The following attestation bundles were made for algobench_sdk-1.5.3.tar.gz:
Publisher:
publish-python.yml on DuanxiangLiu/AlgoBench
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
algobench_sdk-1.5.3.tar.gz -
Subject digest:
278092b16061c3b351ec45fc09e7a4a2c03db809b5d2e19c260a05a4e2904270 - Sigstore transparency entry: 1969934394
- Sigstore integration time:
-
Permalink:
DuanxiangLiu/AlgoBench@b268aa0706101fa66072cc89da2922b557f03b20 -
Branch / Tag:
refs/tags/v1.5.3 - Owner: https://github.com/DuanxiangLiu
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@b268aa0706101fa66072cc89da2922b557f03b20 -
Trigger Event:
push
-
Statement type:
File details
Details for the file algobench_sdk-1.5.3-py3-none-any.whl.
File metadata
- Download URL: algobench_sdk-1.5.3-py3-none-any.whl
- Upload date:
- Size: 42.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8c9438745d29188ad3b126a8cd4213a585cea2419310fd6046a5b725181ab70
|
|
| MD5 |
4b0f140b4a5b1c7d2376c99379ce36b2
|
|
| BLAKE2b-256 |
9c52167e08962338ee9ffae0b75ff98d4a5d3da5cba41a74ca66080ae4cef646
|
Provenance
The following attestation bundles were made for algobench_sdk-1.5.3-py3-none-any.whl:
Publisher:
publish-python.yml on DuanxiangLiu/AlgoBench
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
algobench_sdk-1.5.3-py3-none-any.whl -
Subject digest:
f8c9438745d29188ad3b126a8cd4213a585cea2419310fd6046a5b725181ab70 - Sigstore transparency entry: 1969934454
- Sigstore integration time:
-
Permalink:
DuanxiangLiu/AlgoBench@b268aa0706101fa66072cc89da2922b557f03b20 -
Branch / Tag:
refs/tags/v1.5.3 - Owner: https://github.com/DuanxiangLiu
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@b268aa0706101fa66072cc89da2922b557f03b20 -
Trigger Event:
push
-
Statement type: