← Back to Pull requests

Patch GRPOTrainer reward_funcs default in art.unsloth.service too #137

Merged
RobotSail merged 2 files (230 lines) on Aug 18, 2026 03:15 UTC
View on GitHub
RobotSail RobotSail commented on Jul 27, 2026 15:48 UTC
Author

Summary

Extends the trl 1.8+ reward_funcs workaround to cover art 0.5.17. art 0.5.18 instantiates GRPOTrainer in art.unsloth.train, but art 0.5.17 instantiates it in art.unsloth.service (line 971). The existing monkeypatch only replaced the train module's class reference, so a functional art 0.5.17 combined with trl 1.8+ still crashed with ValueError: No reward source provided. Now the patched class is installed into both modules (guarded by hasattr/ImportError so either layout works).

Context

The AIPCC index's openpipe_art-0.5.17 wheel is currently empty (25KB, zero .py files — build defect, being reported to AIPCC separately). Upstream 0.5.17 has both art.local.backend.LocalBackend and TrainableModel.train(), i.e. the original No module named 'art.local' failure was the broken wheel, not an API difference. Once AIPCC rebuilds 0.5.17, this change makes training-hub work correctly with both art versions and trl 1.8.

Verification (H100, AIPCC GA stack: vLLM 0.21.0+rhaiv.10, trl 1.8.0, unsloth 2026.6.9)

Exact branch commit tested, 3-iteration GRPO (Qwen2.5-1.5B, Toucan tool-call):

| art version | Result |
|---|---|
| upstream 0.5.17 (model.train path, enforce_eager=True) | 3/3 iterations, rewards [0.297, 0.203, 0.375], 96 rollouts, clean exit |
| AIPCC 0.5.18 (backend.train path) | 3/3 iterations, rewards [0.344, 0.203, 0.406], 96 rollouts, clean exit |

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

Summary by CodeRabbit

Bug Fixes
Improved compatibility across ART versions by applying the default reward behavior consistently in supported training environments.
* Added graceful handling when optional training components are unavailable.

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

Diff: 230 lines (+172 / -58) across 2 files Reviewer: None requested Review duration: 30927m
All Vouch review confidence checks passed
Residual risk 0.29 = Change Risk (0.49) × (1 − Review Confidence (0.40)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.49 · 230 lines diff across 2 files
0.49
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%
40%
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.326
No Reviewer Assigned no_reviewer_assigned
0.120
Real PR Conversation Timeline
1 comments
"Review active on #137"
general weight: 0.35
Reviewers
None requested
Assignees
RobotSail RobotSail
Labels
risk: low confidence: 40.5% 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: 49% (MEDIUM) · Higher = larger blast radius
49%
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: 40.5% · Lower = rushed or shallow review
40.5%
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: 29.2% · Safe to merge
29.2%