Current collected state Current
Observed since 21 Oct, 10:01 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
ai-benchmarks
HS-QA
本仓库包含了测试常见推理服务吞吐的代码以及相关的测试结果。
请使用以下命令安装 Poetry:
pip install poetry
pip install ai_benchmarks
run-benchmark -h
run-app
构建包或以其他方式获取:
cd ai-benchmarks && poetry build
安装包:
pip install ai_benchmarks-x.x.x.tar.gz
接口运行方式:
run-app
直接运行方式,-h查看帮助,默认执行配置文件默认测试端点:
run-benchmark -h
安装依赖:
cd ai-benchmarks
poetry安装
poetry lock && poetry install
requirements安装
pip install -i https://mirrors.aliyun.com/pypi/simple/ -r .\requirements.txt
benchmark.py 是主要的压测脚本,采用 asyncio、AsyncOpenAI 和 ProcessPoolExecutor等 实现多端压测框架。
直接运行压测:
poetry run python -m inference.benchmark
启动接口压测:
poetry run python -m inference.main
测试报告和结果:
inference/report 文件夹。inference/results 文件夹,可使用 draw.ipynb 进行绘图。[section] # 支持多section
endpoint: # *必须提供一个有效的 endpoint
api_key: # 认证KEY
concurrent_requests: # 同时并发的请求数
batch: # 执行批次
duration_enabled: # 启用持续请求的时间限制(开启后不执行 concurrent_requests)[True/False]
duration_time: # 请求持续时间,默认为 1 秒
duratio_interval: # 持续/请求间隔,默认0.2秒
duration_batch: # 请求持续时间内每次并发数量,默认为 10
ip: # 用户查询机器资源占用
username: # 用户名
password: # 密码
timeout: # 超时时间,默认 60 秒
max_retries: # 最大重试次数,默认 1
max_connections: # 最大连接数
max_keepalive_connections: # 最大保持活动连接数
model: # 自动获取,可手动添加
owned_by: # 自动获取,可手动添加
stream: # 流式回复默认关闭[True/False]
prompts: # 问题, 为空自动匹配默认问题, 格式 [{"id": 1, "prompt": "Output from 1 to 100"}, {"id": 2, "prompt": "List the top 10 most important people in history."},]
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
requestsEnvironment{
"extras": "",
"marker": null,
"requires_python": "<4.0,>=3.9",
"evaluation": "NOT_EVALUATED"
} | requests<3.0.0,>=2.0.0 | runtime |
openaiEnvironment{
"extras": "",
"marker": null,
"requires_python": "<4.0,>=3.9",
"evaluation": "NOT_EVALUATED"
} | openai<2.0,>=1.0 | runtime |
prettytableEnvironment{
"extras": "",
"marker": null,
"requires_python": "<4.0,>=3.9",
"evaluation": "NOT_EVALUATED"
} | prettytable<4.0,>=3.0 | runtime |
fastapiEnvironment{
"extras": "",
"marker": null,
"requires_python": "<4.0,>=3.9",
"evaluation": "NOT_EVALUATED"
} | fastapi>=0.0.0 | runtime |
starletteEnvironment{
"extras": "",
"marker": null,
"requires_python": "<4.0,>=3.9",
"evaluation": "NOT_EVALUATED"
} | starlette>=0.0.0 | runtime |
orjsonEnvironment{
"extras": "",
"marker": null,
"requires_python": "<4.0,>=3.9",
"evaluation": "NOT_EVALUATED"
} | orjson<4.0,>=3.0 | runtime |
paramikoEnvironment{
"extras": "",
"marker": null,
"requires_python": "<4.0,>=3.9",
"evaluation": "NOT_EVALUATED"
} | paramiko<4.0,>=3.0 | runtime |
aiofilesEnvironment{
"extras": "",
"marker": null,
"requires_python": "<4.0,>=3.9",
"evaluation": "NOT_EVALUATED"
} | aiofiles<25.0,>=24.0 | runtime |
uvicornEnvironment{
"extras": "",
"marker": null,
"requires_python": "<4.0,>=3.9",
"evaluation": "NOT_EVALUATED"
} | uvicorn>=0.0.0 | runtime |
transformersEnvironment{
"extras": "",
"marker": null,
"requires_python": "<4.0,>=3.9",
"evaluation": "NOT_EVALUATED"
} | transformers<5.0,>=4.0 | runtime |
torchEnvironment{
"extras": "",
"marker": null,
"requires_python": "<4.0,>=3.9",
"evaluation": "NOT_EVALUATED"
} | torch<3.0,>=2.0 | runtime |
tensorflowEnvironment{
"extras": "",
"marker": null,
"requires_python": "<4.0,>=3.9",
"evaluation": "NOT_EVALUATED"
} | tensorflow<3.0,>=2.0 | runtime |
bdist_wheel · 4,220.65 KB · Python py3
sdist · 4,130.19 KB · Python source
Observed since 21 Oct, 10:01 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:871c7658e7cd84f69129846219e9ea46eaaecc6b4351d15f8047d069d4f3c39b