Skip to content

Fix evaluate.sh passing arguments evaluate.py does not accept - #81

Open
jonathan-politzki wants to merge 1 commit into
AkaliKong:mainfrom
jonathan-politzki:fix/evaluate-sh-invalid-args
Open

Fix evaluate.sh passing arguments evaluate.py does not accept#81
jonathan-politzki wants to merge 1 commit into
AkaliKong:mainfrom
jonathan-politzki:fix/evaluate-sh-invalid-args

Conversation

@jonathan-politzki

Copy link
Copy Markdown

Summary

evaluate.sh (the one-click offline evaluation script) passes two flags that evaluate.py's main() does not define:

--temperature 1.0
--guidance_scale 1.0

Because evaluate.py uses fire, unknown arguments are fatal. Running bash evaluate.sh on a clean checkout aborts immediately with:

ERROR: Could not consume arg: --temperature
Usage: evaluate.py --base_model ... --num_beams 50 --max_new_tokens 256 --temperature 1.0 -

No evaluation runs and no metrics are produced.

Fix

Drop the two unsupported flags. Both were no-ops for this code path — generation uses constrained beam search (do_sample is not enabled), where temperature has no effect, and guidance_scale was never threaded into GenerationConfig.

Verification

Hit this while running a full SFT → evaluate → calc reproduction on a single A100. With the flags removed, evaluate.py runs to completion and calc.py reports HR/NDCG as expected.

This may be contributing to the reproduction difficulties reported in #35, #43 and #49, since it blocks the documented evaluation entry point.

🤖 Generated with Claude Code

evaluate.sh invokes evaluate.py with --temperature and --guidance_scale,
but evaluate.py's main() defines neither. fire aborts with
"ERROR: Could not consume arg: --temperature" before any evaluation runs,
so the one-click evaluation script fails out of the box.

Both flags were no-ops for the constrained beam-search path (do_sample is
not enabled), so simply dropping them restores the intended behavior.

Verified on a fresh checkout: with these flags removed, evaluate.py runs to
completion and calc.py reports HR/NDCG.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant