verifiers
verifiers copied to clipboard
Fix sentence-repeater env
Description
When running vf-eval sentence-repeater -n 1 -r 1, I get the error
... File ".../verifiers/environments/sentence_repeater/sentence_repeater.py", line 88, in env_response "content": state["info"]["questions"][state["turn"]], ~~~~~^^^^^^^^ File ".../verifiers/verifiers/types.py", line 115, in getitem return super().getitem(key) ^^^^^^^^^^^^^^^^^^^^^^^^ KeyError: 'turn'
Replacing state["turn"] with len(state["trajectory"])
@willccbb @mikasenghaas
Type of Change
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
- [ ] Test improvement
Testing
- [x] All existing tests pass when running
uv run pytestlocally. - [ ] New tests have been added to cover the changes
Checklist
- [x] My code follows the style guidelines of this project as outlined in AGENTS.md
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] Any dependent changes have been merged and published
Additional Notes
Tested env with vf-eval sentence-repeater -n 1 -r 1