[RL] support update_weights_from_distributed with different group and multiple weights (#7292)

This commit is contained in:
Zilin Zhu
2025-07-03 10:29:11 +08:00
committed by GitHub
parent 09e699bba4
commit 0626f678de
6 changed files with 73 additions and 38 deletions

View File

@@ -2303,8 +2303,9 @@ class Scheduler(
"""Update the online model parameter."""
success, message = self.tp_worker.update_weights_from_distributed(recv_req)
if success:
flush_cache_success = self.flush_cache()
assert flush_cache_success, "Cache flush failed after updating weights"
if recv_req.flush_cache:
flush_cache_success = self.flush_cache()
assert flush_cache_success, "Cache flush failed after updating weights"
else:
logger.error(message)
return UpdateWeightsFromDistributedReqOutput(success, message)