[BugFix] Seperate prometheus multiproc dir for single-server multi-dp services#8059
[BugFix] Seperate prometheus multiproc dir for single-server multi-dp services#8059liyonghua0910 wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #8059 +/- ##
=========================================
Coverage ? 6.96%
=========================================
Files ? 475
Lines ? 66884
Branches ? 10317
=========================================
Hits ? 4660
Misses ? 62133
Partials ? 91
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
d1ec8f0 to
15b4d28
Compare
CI报告基于以下代码生成(30分钟更新一次): 1 Required任务 : 7/10 通过
2 失败详情🔴 Pre Commit — PR问题(置信度: 高)分析器: 通用分析(fallback) 失败用例:
关键日志:
PR 在两个 engine 文件中新增 修复建议:
关联变更: 🔴 Approval — 需要 Approval(置信度: 高)该 Job 需要人工 Approval,完成审批后 CI 才会继续执行。
修复建议:
关联变更: 无,属于审批流程状态。 |
15b4d28 to
13e5962
Compare
13e5962 to
9a08ce4
Compare
PaddlePaddle-bot
left a comment
There was a problem hiding this comment.
🤖 Paddle-CI-Agent | pr_review |
2026-06-18 17:35:56
📋 Review 摘要
PR 概述:为单 API server 多 DP 服务按 DP rank 切分 Prometheus multiprocess 目录。
变更范围:Engine/EngineService DP 子服务启动、multi_api_server 子进程环境、Prometheus multiprocess setup。
影响面 Tag:[Engine] [APIServer]
问题
本轮未发现新的非历史阻塞性问题;历史 finding 状态见下表,PR 规范问题在下面章节报。
历史 Findings 修复情况
| Finding | 问题 | 状态 |
|---|---|---|
| F1 | 父进程环境切到 dp0 后,公开 /metrics 仍只采集当前目录。 |
|
| F2 | EngineService/AsyncLLM 启动路径也切回 dp0,但 metrics HTTP 入口未聚合多个 DP 子目录。 |
|
| F3 | 每次 /metrics scrape 把完整 metrics 文本写入 INFO 日志。 |
✅ 已修复 |
📝 PR 规范检查
PR 标题 tag 符合规范,但描述各章节仍是模板占位内容,建议替换为下面可复制版本。
标题建议(可直接复制):
[BugFix] Separate prometheus multiproc dir for single-server multi-dp services
PR 描述建议(点击展开,可直接复制)
## Motivation
修复单 API server 多 DP 部署中 Prometheus multiprocess 目录共享导致 Counter/Histogram 指标容易混淆的问题。
## Modifications
- `fastdeploy/metrics/prometheus_multiprocess_setup.py`: 新增 `setup_dp_prometheus_dir`,按 DP id 创建独立的 Prometheus multiprocess 目录。
- `fastdeploy/engine/engine.py`、`fastdeploy/engine/common_engine.py`: 启动 DP 子服务前切换到对应 DP 的 `PROMETHEUS_MULTIPROC_DIR`,子服务启动后切回 DP0 目录。
## Usage or Command
N/A
## Accuracy Tests
N/A(仅调整 metrics multiprocess 目录,不影响模型精度)
## Checklist
- [x] Add at least a tag in the PR title.
- Tag list: [`[FDConfig]`,`[APIServer]`,`[Engine]`, `[Scheduler]`, `[PD Disaggregation]`, `[Executor]`, `[Graph Optimization]`, `[Speculative Decoding]`, `[RL]`, `[Models]`, `[Quantization]`, `[Loader]`, `[OP]`, `[KVCache]`, `[DataProcessor]`, `[BugFix]`, `[Docs]`, `[CI]`, `[Optimization]`, `[Feature]`, `[Benchmark]`, `[Others]`, `[XPU]`, `[HPU]`, `[GCU]`, `[DCU]`, `[Iluvatar]`, `[Metax]`]
- You can add new tags based on the PR content, but the semantics must be clear.
- [ ] Format your code, run `pre-commit` before commit.
- [ ] Add unit tests. Please write the reason in this PR if no unit tests.
- [ ] Provide accuracy results.
- [ ] If the current PR is submitting to the `release` branch, make sure the PR has been submitted to the `develop` branch, then cherry-pick it to the `release` branch with the `[Cherry-Pick]` PR tag.总体评价
当前目录切分只解决了写入路径隔离的一部分,采集端仍未聚合 dp0/dp1/... 多个子目录,因此 F1/F2 的核心问题还未闭环。建议先让 /metrics 显式遍历各 DP 目录合并采集,再合入。
Motivation
Modifications
Usage or Command
Accuracy Tests
Checklist
[FDConfig],[APIServer],[Engine],[Scheduler],[PD Disaggregation],[Executor],[Graph Optimization],[Speculative Decoding],[RL],[Models],[Quantization],[Loader],[OP],[KVCache],[DataProcessor],[BugFix],[Docs],[CI],[Optimization],[Feature],[Benchmark],[Others],[XPU],[HPU],[GCU],[DCU],[Iluvatar],[Metax]]pre-commitbefore commit.releasebranch, make sure the PR has been submitted to thedevelopbranch, then cherry-pick it to thereleasebranch with the[Cherry-Pick]PR tag.