We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8856909 commit 2ae18a6Copy full SHA for 2ae18a6
recipe/transfer_queue/ray_trainer.py
@@ -1118,7 +1118,9 @@ def _balance_batch(
1118
world_size = self.actor_rollout_wg.world_size
1119
if keep_minibatch:
1120
# Decouple the DP balancing and mini-batching.
1121
- minibatch_size = self.config.actor_rollout_ref.actor.get("ppo_mini_batch_size")
+ minibatch_size = self.config.actor_rollout_ref.actor.get("ppo_mini_batch_size", None)
1122
+ if minibatch_size is None:
1123
+ raise ValueError("'ppo_mini_batch_size' must be set in actor config when 'keep_minibatch' is True.")
1124
minibatch_num = len(global_seqlen_lst) // minibatch_size
1125
global_partition_lst = [[] for _ in range(world_size)]
1126
for i in range(minibatch_num):
0 commit comments