Download tasks/smallmath-0196/tests/test.sh from HuggingFaceSwarms/SmallMath: direct link, hf CLI and curl.
- Browser
- Download file 787 Bytes
-
https://huggingface.co/datasets/HuggingFaceSwarms/SmallMath/resolve/main/tasks/smallmath-0196/tests/test.sh
- Command line
-
hf download hf://datasets/HuggingFaceSwarms/SmallMath/tasks/smallmath-0196/tests/test.sh
-
curl -L -o test.sh https://huggingface.co/datasets/HuggingFaceSwarms/SmallMath/resolve/main/tasks/smallmath-0196/tests/test.sh
787 Bytes
| # Reward 1 if /app/answer.txt holds one exact number equal to the hidden reference (grader.py, exact sympy proof). | |
| # 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 | |