← Back to Pull requests

Fix multi-iteration GRPO with art 0.5.18 #135

Merged
RobotSail merged 2 files (192 lines) on Jul 27, 2026 05:35 UTC
View on GitHub
RobotSail RobotSail commented on Jul 27, 2026 05:28 UTC
Author

Summary

Fixes multi-iteration GRPO training with art 0.5.18. Previously, training would exit after 1 iteration instead of completing all configured iterations.

Root Cause

Two issues:

1. Unconditional os._exit in finally block (from v0.9.5): When model.train() raised AttributeError (see #2), the finally block in _run_training called os._exit(0) unconditionally, killing the subprocess before the loop could continue. Reverted to conditional (if result is not None), since the parent-side join timeout from v0.9.6 handles the hang independently.

2. model.train() API removed in art 0.5.18: TrainableModel.train() was removed in art 0.5.18. The replacement is backend.train(model, trajectory_groups, learning_rate=...). Added a hasattr check to use the correct API for both art 0.5.17 and 0.5.18.

Verification

Tested on H100 with 3-iteration GRPO (AIPCC GA stack, art 0.5.18):

Iter 1/3: 100% - reward=0.281
Iter 2/3: 100% - reward=0.188  
Iter 3/3: 100% - reward=0.406
[198s] DONE
REWARDS: [0.28125, 0.1875, 0.40625]
EXIT_CODE=0

All 3 iterations completed, process exited cleanly.

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

Summary by CodeRabbit

Bug Fixes
Improved training subprocess shutdown behavior to avoid unnecessary forced exits.
* Added compatibility with multiple supported training API formats, improving training reliability across configurations.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Diff: 192 lines (+144 / -48) across 2 files Reviewer: None requested Review duration: 7m
All Vouch review confidence checks passed
Residual risk 0.38 = Change Risk (0.58) × (1 − Review Confidence (0.34)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.58 · 192 lines diff across 2 files
0.58
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
0.02
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 10%
34%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth shallow_review_depth
0.344
Diff Size diff_size
0.315
No Reviewer Assigned no_reviewer_assigned
0.120
Rapid Merge rapid_merge
0.100
Real PR Conversation Timeline
1 comments
"Review active on #135"
general weight: 0.35
Reviewers
None requested
Assignees
RobotSail RobotSail
Labels
risk: medium confidence: 34.2% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 57.9% (MEDIUM) · Higher = larger blast radius
57.9%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 34.2% · Lower = rushed or shallow review
34.2%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 38.1% · Moderate risk
38.1%