feat(rl): adaptive RL layer — EnsembleAgent, online learning, 87 tests, closed loop#7
Merged
Merged
Conversation
CI installs with pip install -e '.[dev]' — numpy was only in [rl] extras so all test_rl/* tests failed with ModuleNotFoundError on every platform. Made-with: Cursor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
RewardEnginenow applies profile depth multipliers to section coverage and diversity scoring — reward varies with action choice on real DNAsaar extract . --rlcomputes reward + updates policy after every real extractiondocs/rl_technical_report.html(print-to-PDF ready)New files
saar/rl/agents/ensemble.py— Thompson Sampling two-level RL hierarchytests/test_rl/test_ensemble.py,test_policy_store.py,test_simulator.py,test_action_space.pydocs/rl_technical_report.md+rl_technical_report.html— submission reportexperiments/train_ucb.py,train_reinforce.py,eval_comparison.py— offline training + eval with learning curvesModified
saar/rl/reward.py— profile-weighted_section_coverageand_diversity_scoresaar/rl/environment.py— passesdepth_multipliersto reward enginesaar/rl/policy_store.py— ensemble save/load/statssaar/commands/extract.py— full online learning loop in_apply_rl_profilesaar/commands/rl_commands.py— builds ensemble aftersaar rl train --agent bothpyproject.toml— numpy in[dev]extras so CI picks it upTest plan
ruff check saar/ tests/— zero violationspytest tests/ -q— 593 passing locallysaar rl train --agent both— completes in ~0.2ssaar extract . --rl— runs end-to-end, selects profile, updates policy onlinepython experiments/eval_comparison.py— UCB 55% / REINFORCE 47% / Ensemble 58% vs random 10%Made with Cursor