Add ITS Hub rollout adapter for GRPO training #83
All Vouch review confidence checks passed
Residual risk 0.22 = Change Risk (0.55) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.55 · 566 lines diff across 7 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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
Diff Size
diff_size
0.379
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #83"
general
weight: 0.35
RobotSail
Summary
ITSRolloutadapter class that lets users plug ITS Hub inference-time scaling algorithms (BestOfN, SelfConsistency, BeamSearch, ParticleFiltering) intolora_grpo()as custom rollout functionsMotivation
Users can already pass custom
rollout_fntolora_grpo()with the ART backend, but must manually implement generation logic. ITS Hub provides sophisticated generation strategies that produce higher-quality training signal for GRPO. This adapter bridges the two with minimum changes — one new file, no modifications tolora_grpo.py.Design
ITSRolloutis a picklable callable class that:1. Points ITS Hub's
OpenAICompatibleLanguageModelat the training model's co-located vLLM server (usinginclude_raw_choices=Trueto preserve full API response data)2. Runs the user's chosen ITS Hub algorithm to generate and select a response
3. Converts the result to an
art.Trajectorywith the reward set by the user's reward functionThe user provides:
algorithm_factory— module-level function(lm) -> algorithm(picklable)reward_fn— module-level function(response_text, task) -> float(picklable)budget— candidates per rolloutDependencies
Requires ITS Hub with
include_raw_choicessupport (merged in its_hub#226).Files changed
src/training_hub/algorithms/its_rollout.py—_dict_to_choice()helper +ITSRolloutclasssrc/training_hub/__init__.py— exportITSRolloutexamples/scripts/its_rollout_example.py— example with SelfConsistency and BestOfNTest plan
ITSRolloutis importable:from training_hub import ITSRolloutpickle.dumps/loadsround-trips successfully (includingmp.get_context("spawn"))openpipe-art)Verified with real vLLM
Tested against a live vLLM 0.9.1 server serving Qwen/Qwen2.5-0.5B-Instruct on an NVIDIA H100.
_dict_to_choiceconversionChoice— correctfinish_reason,message.role,message.contenttool_callswhen present_raw_choicecorrectness_raw_choicepresent wheninclude_raw_choices=True— keys:index,message,logprobs,finish_reason,stop_reasonresult is not result["_raw_choice"]["message"]→Truejson.dumps()succeeds (270 bytes) — no infinite recursion_raw_choiceabsent wheninclude_raw_choices=False(default behavior unchanged)SelfConsistency end-to-end (budget=3)
ITSRollout._init_its_hub()createsOpenAICompatibleLanguageModel+SelfConsistencyfrom mock ART model_raw_choicepresent on all candidates (flows through ITS Hub algorithm)_dict_to_choiceconverts each candidate to OpenAI SDKChoicejson.dumps()succeeds on all responses (822 bytes)Picklability
pickle.dumps/loadsroundtrip preservesbudget,max_concurrency, all config_lm,_algorithm) correctlyNoneafter unpicklingmp.get_context("spawn")pickle protocolNot yet tested
ITSRollout.__call__withart.Trajectoryconstruction (openpipe-artnot installed in test venv)LLMJudgeasalgorithm_factorylora_grpo(rollout_fn=ITSRollout(...), backend="art")<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
Release Notes
New Features
Added an ITS Hub–backed rollout adapter for GRPO training with selectable rollout strategies and custom reward scoring.
Exposed
ITSRolloutin the publictraining_hubAPI.Added an example script to configure ITS rollout + LoRA-based GRPO training (including SelfConsistency and BestOfN options).
Bug Fixes
* Improved resilience by handling connection/timeout failures with a safe fallback trajectory during rollout.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->