Skip to content

refactor(utils): default reward target_field to 'rewards' and drop 'reward_config' alias (#2474) - #2489

Merged
TATP-233 merged 1 commit into
mainfrom
fix/issue-2474-reward-target-alias
Oct 21, 2026
Merged

TATP-233 merged 1 commit into
mainfrom
fix/issue-2474-reward-target-alias

Conversation

@TATP-233

Copy link
Copy Markdown
Collaborator

Summary

  • Hard-removes the residual reward_config alias in resolve_reward_dict (src/unilab/utils/reward.py): the default target_field is now "rewards", and passing "reward_config" (or any other value) raises ValueError.
  • Removes the dead _build_reward_stub helper in scripts/visualize_task_env.py that probed for the removed reward_config field.
  • tests/config/test_reward_injection.py: updated for the new default/error message and adds a rejection test asserting target_field="reward_config" raises.

Files changed

  • src/unilab/utils/reward.py
  • tests/config/test_reward_injection.py
  • scripts/visualize_task_env.py

Driving issue / audit reference

Validation

Run inside a clean worktree based on origin/main (9b7acd0):

  • uv run pytest -q tests/config/test_reward_injection.py → 4 passed
  • uv run pytest -q tests/base → 464 passed, 13 skipped, 1 xfailed
  • uv run ruff check src/unilab/utils/reward.py tests/config/test_reward_injection.py scripts/visualize_task_env.py → All checks passed!

@TATP-233
TATP-233 merged commit 3e528bd into main Oct 21, 2026
10 of 11 checks passed
@TATP-233
TATP-233 deleted the fix/issue-2474-reward-target-alias branch October 21, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant