Skip to content

[Feature] consolidate cache, worker_process, and paddle logs into unified files#7432

Open
xyxinyang wants to merge 1 commit intoPaddlePaddle:developfrom
xyxinyang:dev-log-v2
Open

[Feature] consolidate cache, worker_process, and paddle logs into unified files#7432
xyxinyang wants to merge 1 commit intoPaddlePaddle:developfrom
xyxinyang:dev-log-v2

Conversation

@xyxinyang
Copy link
Copy Markdown
Collaborator

Motivation

💡 If this PR is a Cherry Pick, the PR title needs to follow the format by adding the [Cherry-Pick] label at the very beginning and appending the original PR ID at the end. For example, [Cherry-Pick][CI] Add check trigger and logic(#5191)

💡 如若此PR是Cherry Pick,PR标题需遵循格式,在最开始加上[Cherry-Pick]标签,以及最后面加上原PR ID,例如[Cherry-Pick][CI] Add check trigger and logic(#5191)

1

Modifications

1

Usage or Command

1

Accuracy Tests

1

Checklist

  • 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.

@paddle-bot
Copy link
Copy Markdown

paddle-bot bot commented Apr 16, 2026

Thanks for your contribution!

PaddlePaddle-bot

This comment was marked as outdated.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 16, 2026

Codecov Report

❌ Patch coverage is 85.96491% with 8 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (develop@6e16438). Learn more about missing BASE report.

Files with missing lines Patch % Lines
fastdeploy/utils.py 88.00% 1 Missing and 2 partials ⚠️
fastdeploy/cache_manager/cache_transfer_manager.py 0.00% 2 Missing ⚠️
fastdeploy/engine/common_engine.py 75.00% 1 Missing and 1 partial ⚠️
fastdeploy/cache_manager/prefix_cache_manager.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #7432   +/-   ##
==========================================
  Coverage           ?   74.27%           
==========================================
  Files              ?      398           
  Lines              ?    55008           
  Branches           ?     8622           
==========================================
  Hits               ?    40858           
  Misses             ?    11406           
  Partials           ?     2744           
Flag Coverage Δ
GPU 74.27% <85.96%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

PaddlePaddle-bot

This comment was marked as outdated.

PaddlePaddle-bot

This comment was marked as outdated.

PaddlePaddle-bot

This comment was marked as outdated.

Copy link
Copy Markdown

@PaddlePaddle-bot PaddlePaddle-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AI Code Review | 2026-04-17 11:51 CST

📋 Review 摘要

PR 概述:将 cache、worker_process 和 paddle 分布式日志整合到统一文件中,减少日志碎片化,并在主日志目录创建 workerlog 软链接方便查阅。
变更范围cache_manager/engine/worker/model_executor/graph_optimization/logger/utils.py
影响面 TagEngine KVCache

📝 PR 规范检查

PR 描述的 Motivation、Modifications、Usage or Command、Accuracy Tests 各节均仅填写了 "1",缺乏对变更动机和具体修改内容的说明。建议补充描述,方便后续追溯。

描述模板(可直接复制):

## Motivation

Consolidate scattered log files (gpu_worker.log, model_runner_base.log, cudagraph_piecewise_backend.log, cache_storage.log, etc.) into unified files (worker_process.log, cache_manager.log) for easier debugging. Also move paddle distributed launch logs into a paddle/ subdirectory with symlinks in the main log dir.

## Modifications

1. Renamed log files: gpu_worker.log/model_runner_base.log/cudagraph_piecewise_backend.log → worker_process.log; cache_transfer.log/cache_storage.log → cache_manager.log
2. Moved paddle distributed launch logs to log/paddle/ subdirectory, with symlinks created in the main log directory
3. Changed register_manager_logger to use "main" channel instead of a separate file
4. Downgraded verbose info logs in engine_cache_queue.py to debug level
5. Added ensure_workerlog_alias utility and corresponding unit tests

问题

级别 文件 概述
🟡 建议 prefix_cache_manager.py:348 错误提示日志文件名与实际文件名不匹配
🟡 建议 utils.py:191 except OSError: pass 过于宽泛,建议至少记录警告日志

总体评价

日志整合的方向合理,将分散的日志统一到 worker_process.logcache_manager.log 能显著改善调试体验。代码改动较为直接,测试覆盖充分。建议补充 PR 描述并修复错误提示中的文件名不一致问题。

Comment thread fastdeploy/cache_manager/prefix_cache_manager.py
Comment thread fastdeploy/utils.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants