Repository navigation
fix(trainer): validate skill-aware appendix notes through candidate evaluation and gate (#468) - #496
Open
RohithPariki wants to merge 1 commit into
Open
RohithPariki wants to merge 1 commit into
RohithPariki wants to merge 1 commit into
Conversation
…valuation and gate (microsoft#468)
This branch has not been deployed
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
Fixes #468.
Previously, when
use_skill_aware_reflection: true,_flush_skill_aware_appendixwroteEXECUTION_LAPSEnotes intocurrent_skillafter the selection evaluation and gate decision (and directly intocurrent_skillonskip_no_patchesandskip_no_rewritebranches). As a result, rejected or skipped steps still mutatedcurrent_skill,current_scoreno longer matchedcurrent_skill, and unvalidated notes accumulated in the final skill.Changes
skillopt/engine/trainer.py):_flush_skill_aware_appendixintocandidate_skillbeforecandidate_skill.mdis saved,cand_hashis computed, and selection evaluation/gating runs (controlled byskill_aware_gate_appendix: trueby default)._flush_skill_aware_appendixwrite intocurrent_skillwhenskill_aware_gate_appendixis enabled, so rejected candidates discard their appendix notes cleanly andcurrent_scorealways matchescurrent_skill.skillopt/engine/trainer.py):skip_no_patchesandskip_no_rewritepaths, whenuse_skill_aware_reflectionproduces new appendix notes that change the skill, anotes_only_candidateis constructed and routed through the normal selection evaluation and gate instead of mutatingcurrent_skillunchecked.ranked_patchandranked_itemsbeforeif not notes_only_step:so rejected notes-only steps do not hitUnboundLocalError.skillopt/engine/trainer.py):consolidate_appendix_notesfails or does not shrink the appendix aboveskill_aware_consolidate_threshold, recordsstep_rec["appendix_consolidation_skipped"] = Trueand logs a clear message.tests/test_skill_aware_gate_appendix.py):Verification
python -m unittest tests/test_skill_aware_gate_appendix.py— 4 passedpython tests/test_skill_aware_reflection.py— 7/7 passed