Skip to content

[Cherry-Pick] [RL] provide options for whether shutdown comm group after weights cleared (#5663)#5664

Merged
Jiang-Jia-Jun merged 4 commits intoPaddlePaddle:release/2.4from
liyonghua0910:release/2.4+opt_shutdown_comm_group
Dec 19, 2025
Merged

[Cherry-Pick] [RL] provide options for whether shutdown comm group after weights cleared (#5663)#5664
Jiang-Jia-Jun merged 4 commits intoPaddlePaddle:release/2.4from
liyonghua0910:release/2.4+opt_shutdown_comm_group

Conversation

@liyonghua0910
Copy link
Collaborator

@liyonghua0910 liyonghua0910 commented Dec 19, 2025

Motivation

提供一个参数开关 --shutdown-comm-group-if-worker-idle 用于控制权重清除后是否要同时关闭通信组,启用该参数时,清除权重后会关闭通信组。如果不手动启用/禁用,则对非 EP 模式启用。

💡 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)

Modifications

Usage or Command

  • 启用:--shutdown-comm-group-if-worker-idle
  • 禁用:--no-shutdown-comm-group-if-worker-idle

Accuracy Tests

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

paddle-bot bot commented Dec 19, 2025

Thanks for your contribution!

# This optimization is enabled by default, and can be disabled by using this flag.
"""

shutdown_comm_group_if_worker_idle: bool = None
Copy link
Collaborator

Choose a reason for hiding this comment

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

是不是不需要在这里添加配置,在worker_process设置一个成员变量就可以了

@codecov-commenter
Copy link

codecov-commenter commented Dec 19, 2025

Codecov Report

❌ Patch coverage is 53.33333% with 7 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (release/2.4@dd0014b). Learn more about missing BASE report.

Files with missing lines Patch % Lines
fastdeploy/worker/worker_process.py 20.00% 4 Missing ⚠️
fastdeploy/worker/gpu_model_runner.py 0.00% 2 Missing ⚠️
fastdeploy/rl/dynamic_weight_manager.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff               @@
##             release/2.4    #5664   +/-   ##
==============================================
  Coverage               ?   58.96%           
==============================================
  Files                  ?      327           
  Lines                  ?    40767           
  Branches               ?     6201           
==============================================
  Hits                   ?    24037           
  Misses                 ?    14857           
  Partials               ?     1873           
Flag Coverage Δ
GPU 58.96% <53.33%> (?)

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.

@Jiang-Jia-Jun Jiang-Jia-Jun merged commit ea16c82 into PaddlePaddle:release/2.4 Dec 19, 2025
19 of 24 checks passed
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.

4 participants