Repository navigation
refactor(utils): default reward target_field to 'rewards' and drop 'reward_config' alias (#2474) - #2489
Merged
Conversation
…eward_config' alias (#2474)
5 tasks done
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
reward_configalias inresolve_reward_dict(src/unilab/utils/reward.py): the defaulttarget_fieldis now"rewards", and passing"reward_config"(or any other value) raisesValueError._build_reward_stubhelper inscripts/visualize_task_env.pythat probed for the removedreward_configfield.tests/config/test_reward_injection.py: updated for the new default/error message and adds a rejection test assertingtarget_field="reward_config"raises.Files changed
src/unilab/utils/reward.pytests/config/test_reward_injection.pyscripts/visualize_task_env.pyDriving issue / audit reference
base/config_adapter.py) receives"rewards"from the registry, so the alias had no live consumer.Validation
Run inside a clean worktree based on
origin/main(9b7acd0):uv run pytest -q tests/config/test_reward_injection.py→ 4 passeduv run pytest -q tests/base→ 464 passed, 13 skipped, 1 xfaileduv run ruff check src/unilab/utils/reward.py tests/config/test_reward_injection.py scripts/visualize_task_env.py→ All checks passed!