Files
xc-mlu590-advisor-agent/README.md

58 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# xc-mlu590-advisor-agent
信创模盒的 **寒武纪MLU590** 专属部署前预检智能体。
## 能做什么
- 校验用户指定的目标卡是否与本智能体的官方卡型一致。
- 收集模型、框架、后端、驱动和 SDK 版本,明确缺失信息。
- 根据多卡、量化、长上下文、自定义算子和动态形状提示验证风险。
- 给出从设备可见性到模型最小输入的验证顺序。
## 事实边界
- 卡型名称来自信创模盒“模型 X 算力”页面。
- 不声明页面未提供的显存、算力、SDK 版本或算子支持结论。
- 不访问外部网络,不执行命令,不创建或修改适配任务。
- 最终兼容性必须以目标设备上的真实日志和测试结果为准。
## 平台约束
- 仓库根目录包含 `Dockerfile`,容器开放 `8080`
- `GET /health` 返回 HTTP 200。
- 读取 `STRATEGY_ID`,仅报告是否存在,不输出其值。
- 处理 `SIGTERM`,在平台 30 秒窗口内退出。
- 仅使用 Python 标准库。
## 接口
- `GET /health`:存活检查。
- `GET /`:卡型和智能体元信息。
- `POST /analyze`:部署前预检。
- `POST /task`:与 `/analyze` 相同的兼容入口。
示例:
```bash
curl -X POST http://localhost:8080/analyze \
-H 'Content-Type: application/json' \
-d '{
"model_name": "example/model",
"hardware": "寒武纪 MLU590",
"framework": "PyTorch",
"backend": "目标后端",
"sdk_version": "实际版本",
"driver_version": "实际版本",
"precision": "bf16",
"cards": 1
}'
```
## 本地验证
```bash
python3 -m unittest -v
python3 main.py
curl http://localhost:8080/health
```