Require effective GRPO updates - #31
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6d3e45fb10
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| metrics.get("mode") == "grpo" | ||
| and metrics.get("model") == input_model | ||
| and metrics.get("task_ids") == self.train_task_ids | ||
| and metrics.get("training_recipe") == grpo_training_recipe(self.config) |
There was a problem hiding this comment.
Avoid loading train-only deps during resume checks
When resuming or dry-running a run that already has a GRPO train_metrics.json, this new checkpoint-current predicate calls grpo_training_recipe(), whose version fields raise if optional training packages such as trl, peft, transformers, or torch are not installed. Because the base package keeps those dependencies optional, a resume that could otherwise reuse the saved GRPO checkpoint, or at least dry-run the restart, now aborts during the freshness check before reaching either path; consider treating an unavailable current recipe as non-current or only resolving package versions inside actual GRPO training.
Useful? React with 👍 / 👎.
Summary
Evidence
The previous 16-task live run produced 32 rollouts in two-generation groups. Every group had identical binary rewards,
train_loss=0, and all 248 GRPO LoRA-B tensors remained exactly zero. This change makes that state fail closed and increases production groups to eight candidates.Verification
pytest pipelines/benchflow-task-posttrain/tests -q(237 passed)ruff check pipelines/benchflow-task-posttrain/src pipelines/benchflow-task-posttrain/testsruff format --checkon all changed Python filespython -m compileall -q pipelines/benchflow-task-posttrain/srcgit diff --check