You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
logger.warning(f"Trajectory {idx}: Initial prompt length {prompt_token_len} exceeds max_prompt_length {self.max_prompt_length}. Skipping this sample entirely (no trajectory will be returned). First 200 chars of prompt: {self.chat_parser.parse(messages[:1], add_generation_prompt=False)[:200]}...")
213
+
214
+
# Close the environment and return None to skip this trajectory entirely
raiseValueError("Only async rollout mode is supported")
572
+
573
+
# Check if all trajectories were skipped
574
+
ifnottrajectories:
575
+
raiseRuntimeError("All trajectories were skipped (likely all prompts exceed max_prompt_length). Please check your dataset and increase max_prompt_length or enable filtering.")
576
+
558
577
# Sort trajectories by their idx, to ensure they are in order.
559
578
trajectories.sort(key=lambdax: x["idx"])
560
579
580
+
# Determine which indices were skipped by checking missing idx values
581
+
# Expected indices are 0 to (batch_size * rollout.n - 1)
0 commit comments