Download tasks/candidate-0847-software-languages/tests/task_test.sh from FineEnvs/MiMo-V2.6-RL-harbor-terminal: direct link, hf CLI and curl.
- Browser
- Download file 957 Bytes
-
https://huggingface.co/datasets/FineEnvs/MiMo-V2.6-RL-harbor-terminal/resolve/main/tasks/candidate-0847-software-languages/tests/task_test.sh
- Command line
-
hf download hf://datasets/FineEnvs/MiMo-V2.6-RL-harbor-terminal/tasks/candidate-0847-software-languages/tests/task_test.sh
-
curl -L -o task_test.sh https://huggingface.co/datasets/FineEnvs/MiMo-V2.6-RL-harbor-terminal/resolve/main/tasks/candidate-0847-software-languages/tests/task_test.sh
957 Bytes
| set -uo pipefail | |
| # tbench-anti-hack-guard:v1 | |
| export PYTHONNOUSERSITE=1 | |
| export PYTHONDONTWRITEBYTECODE=1 | |
| # Fail open when the verifier image has no python3 (node-only tests images are | |
| # excluded from the RL set but still verifiable natively): a missing | |
| # interpreter must not swallow the grader's own reward write. | |
| if command -v python3 >/dev/null 2>&1 && [ -f /tests/anti_hack_guard.py ]; then | |
| if ! python3 /tests/anti_hack_guard.py; then | |
| # Guard already wrote reward=0; the reward file is the grading contract. | |
| exit 0 | |
| fi | |
| fi | |
| mkdir -p /logs/verifier | |
| rm -f /logs/verifier/ctrf.json /logs/verifier/reward.txt | |
| python3 -m pytest --ctrf /logs/verifier/ctrf.json -q /tests/test_outputs.py | |
| status=$? | |
| if [ ! -s /logs/verifier/ctrf.json ]; then | |
| echo "pytest did not produce CTRF output" >&2 | |
| exit 2 | |
| fi | |
| if [ "$status" -eq 0 ]; then | |
| printf '1\n' > /logs/verifier/reward.txt | |
| else | |
| printf '0\n' > /logs/verifier/reward.txt | |
| fi | |
| exit 0 | |