已合并
remove dapo_ray_trainer patch #848
yezhibei创建于 2025年12月16日
remove dapo_ray_trainer patch #848
已合并
共 2 个文件变更+1-28
| @@ -1,22 +0,0 @@ | |||
| 1 | -diff --git a/recipe/dapo/dapo_ray_trainer.py b/recipe/dapo/dapo_ray_trainer.py | ||
| 2 | -index 18995f67..db209482 100644 | ||
| 3 | ---- a/recipe/dapo/dapo_ray_trainer.py | ||
| 4 | -+++ b/recipe/dapo/dapo_ray_trainer.py | ||
| 5 | - class RayDAPOTrainer(RayPPOTrainer): | ||
| 6 | - non_tensor_batch_keys=["raw_prompt_ids"], | ||
| 7 | - ) | ||
| 8 | - gen_batch_output = gen_batch.repeat( | ||
| 9 | -- repeat_times=self.config.actor_rollout_ref.rollout.n, interleave=True | ||
| 10 | -+ repeat_times=self.config.actor_rollout_ref.rollout.n, interleave=False | ||
| 11 | - ) | ||
| 12 | - | ||
| 13 | - is_last_step = self.global_steps >= self.total_training_steps | ||
| 14 | - class RayDAPOTrainer(RayPPOTrainer): | ||
| 15 | - [str(uuid.uuid4()) for _ in range(len(new_batch.batch))], dtype=object | ||
| 16 | - ) | ||
| 17 | - # repeat to align with repeated responses in rollout | ||
| 18 | -- new_batch = new_batch.repeat(repeat_times=self.config.actor_rollout_ref.rollout.n, interleave=True) | ||
| 19 | -+ new_batch = new_batch.repeat(repeat_times=self.config.actor_rollout_ref.rollout.n, interleave=False) | ||
| 20 | - new_batch = new_batch.union(gen_batch_output) | ||
| 21 | - | ||
| 22 | - if self.config.algorithm.use_kl_in_reward: | ||
| @@ -41,9 +41,4 @@ patches: | |||
| 41 | name: __init__ | 41 | name: __init__ |
| 42 | - action: replaced # [added, replaced, deleted] | 42 | - action: replaced # [added, replaced, deleted] |
| 43 | kind: method # [class, method, attribute] | 43 | kind: method # [class, method, attribute] |
| 44 | - name: _init_dp_env | 44 | + name: _init_dp_env |
| 45 | - - name: dapo_ray_trainer | ||
| 46 | - diff: | ||
| 47 | - class_changes: # [action, kind, name] | ||
| 48 | - - action: updated # [added, replaced, deleted, updated] | ||
| 49 | - name: RayDAPOTrainer | ||