feat: add standalone GRPO trainer with WAADirect (no openadapt-ml dependency)#191
Merged
Conversation
…endency) Self-contained GRPO training package that eliminates the openadapt-ml dependency for RL training. Uses direct HTTP calls to WAA Flask server (WAADirect) instead of the WAALiveAdapter + RLEnvironment stack, removing version coupling and adapter indirection. Package structure (695 LOC total): - config.py: TrainingConfig dataclass - waa_direct.py: WAADirect HTTP client (screenshot/click/type/key) - prompt.py: SYSTEM_PROMPT + build_agent_messages + parse_vlm_output_to_action - reward.py: compute_group_advantages + evaluate_milestones_screenshot - model_loader.py: load_model_and_processor (HF + PEFT) - trainer.py: GRPOTrainer with rollout collection + training loop Key design decisions: - ZERO openadapt-ml imports (self-contained, will migrate later) - max_new_tokens=2048 default (100 was catastrophically low) - Multi-format parser (Thought/Action, bare DSL, JSON) - Fresh screenshot for evaluation (not cached) - Per-step backward to avoid OOM on long trajectories - VLM judge via OpenAI API for milestone evaluation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
openadapt_evals/training/standalone/) with zero openadapt-ml importsPackage structure
config.pyTrainingConfigdataclasswaa_direct.pyprompt.pyreward.pymodel_loader.pytrainer.py__init__.pyKey design decisions
requests.post(server_url + "/execute_windows", ...), no adapter abstractionCLICK(...)), and JSON{"action_type":"click"}Usage
python -m openadapt_evals.training.standalone.trainer \ --task-dir example_tasks \ --server-url http://localhost:5001 \ --model Qwen/Qwen3.5-9B \ --num-steps 10 \ --output checkpoints/Test plan
--helpworks🤖 Generated with Claude Code