Download tasks/imo-bench-algebra-034/tests/test.sh from HuggingFaceSwarms/IMO-AnswerBench: direct link, hf CLI and curl.
- Browser
- Download file 830 Bytes
-
https://huggingface.co/datasets/HuggingFaceSwarms/IMO-AnswerBench/resolve/main/tasks/imo-bench-algebra-034/tests/test.sh
- Command line
-
hf download hf://datasets/HuggingFaceSwarms/IMO-AnswerBench/tasks/imo-bench-algebra-034/tests/test.sh
-
curl -L -o test.sh https://huggingface.co/datasets/HuggingFaceSwarms/IMO-AnswerBench/resolve/main/tasks/imo-bench-algebra-034/tests/test.sh
830 Bytes
| # Reward 1 if /app/answer.txt holds an answer equal to the hidden reference (a set, tuple, interval or | |
| # expression; grader.py checks it exactly with sympy). | |
| # 0 is written before anything runs, so a crash, a timeout or a missing/linked/oversized answer scores 0. | |
| # Python runs isolated (-I -S); sympy/mpmath come from the pinned wheels in this directory (hash-checked, unpacked | |
| # offline into a new directory): nothing is installed and no network is used. ANSWER and VERIFIER_DIR override | |
| # the paths, to test the grader locally. | |
| case $0 in */*) here=${0%/*} ;; *) here=. ;; esac | |
| export ANSWER=${ANSWER:-/app/answer.txt} | |
| export VERIFIER_DIR=${VERIFIER_DIR:-/logs/verifier} | |
| export TESTS_DIR=$here | |
| [ -d "$VERIFIER_DIR" ] && echo 0 > "$VERIFIER_DIR/reward.txt" | |
| timeout 150 python3 -B -I -S "$here/grade_task.py" || true | |