Files
xc_validation_strategy_vllm…/README.md
2026-07-26 01:35:23 +08:00

44 lines
1.5 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_validation_strategy_vllm_stop
用于停止以下账号中状态严格为 `waiting` 的 ModelHub XC 验证任务:
- `fanyi`100 条
- `jiajing`88 条
- `i-zhouyuanxi@4paradigm.com`94 条
任务清单于 2026-07-26 通过 `/api/adapt/task/page` 分页查询生成,共 282 条。`success``failed` 等其他状态不会写入清单,也不会被停止。
服务启动后按账号及每批 50 条调用:
```text
PUT /api/async/task/stop-create-contest-task
{"taskIds": [任务 ID, ...]}
```
停止请求完成后,进程继续运行,以便平台通过健康检查和状态接口读取执行结果。
## 可选配置
| 变量 | 默认值 | 说明 |
| --- | --- | --- |
| `BASE_URL` | `https://modelhub.org.cn` | ModelHub 服务地址。 |
| `BATCH_SIZE` | `50` | 每个停止请求包含的任务数。 |
| `MAX_RETRIES` | `3` | 单批任务的最大请求次数。 |
| `REQUEST_TIMEOUT` | `30` | 单次请求超时(秒)。 |
| `PORT` | `8080` | HTTP 服务端口。 |
## 平台运行接口
- `GET /health`:存活探针,成功返回 `{"status":"ok"}`
- `GET /status`:返回总体及每个账号的成功/失败数量、失败任务 ID 和错误信息。
## 运行与构建
仓库根目录的 `Dockerfile` 使用平台 Python 基础镜像,暴露 `8080` 端口并以 `python main.py` 启动。构建成功后,策略会依次处理三个账号的内置任务清单。
```bash
python main.py
curl http://127.0.0.1:8080/health
curl http://127.0.0.1:8080/status
```