Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion swift/dev/recipe/grpo/assembly.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,10 +343,16 @@ def initialize_cluster(
# registration reads it off the proxy the adapter will actually drive.
elastic_models = {}
if adapter is not None:
from swift.dev.rewards.scorer import RewardModel

for scorer in (*orm_scorers, *prm_scorers):
# Rules arrive as _AwaitableToSync and judges are not frozen RM proxies. Only a
# RewardModel carries the ray handle the adapter can scale; the rest stay static.
if not isinstance(scorer, RewardModel):
continue
scorer_model = scorer.model
if (
getattr(scorer, "placement_key", None) is not None
scorer.placement_key is not None
and getattr(scorer_model, "_worker_factory", None) is not None
):
elastic_models[scorer.placement_key] = scorer_model
Expand Down
Loading