Download scripts/run_tests.sh from EQUES/Response-Quality-Assessment: direct link, hf CLI and curl.
- Browser
- Download file 1.13 kB
-
https://huggingface.co/spaces/EQUES/Response-Quality-Assessment/resolve/main/scripts/run_tests.sh
- Command line
-
hf download hf://spaces/EQUES/Response-Quality-Assessment/scripts/run_tests.sh
-
curl -L -o run_tests.sh https://huggingface.co/spaces/EQUES/Response-Quality-Assessment/resolve/main/scripts/run_tests.sh
1.13 kB
| # Run pytest inside the Singularity container. | |
| # All arguments are forwarded to pytest as-is. | |
| # | |
| # Prerequisites: .env must define SIF_DIR (and optionally DATA_ROOT, HF_HOME). | |
| # See docs/context/04_environment_setup.md and .env.example. | |
| # | |
| # Usage: | |
| # bash scripts/run_tests.sh # run all tests | |
| # bash scripts/run_tests.sh tests/test_calibration.py -v | |
| set -euo pipefail | |
| REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)" | |
| source "${REPO_ROOT}/.env" | |
| if [[ -z "${SIF_DIR:-}" ]]; then | |
| echo "ERROR: SIF_DIR is not set. Fill in .env (see .env.example)." >&2 | |
| exit 1 | |
| fi | |
| # Build the bind list only for paths that are set. | |
| BINDS=() | |
| if [[ -n "${DATA_ROOT:-}" ]]; then | |
| BINDS+=(--bind "${DATA_ROOT}/data:${REPO_ROOT}/data") | |
| BINDS+=(--bind "${DATA_ROOT}/index_store:${REPO_ROOT}/index_store") | |
| fi | |
| if [[ -n "${HF_HOME:-}" ]]; then | |
| BINDS+=(--bind "${HF_HOME}:${HF_HOME}") | |
| fi | |
| singularity exec \ | |
| "${BINDS[@]}" \ | |
| --env HF_HOME="${HF_HOME:-}" \ | |
| --env DATA_ROOT="${REPO_ROOT}" \ | |
| --pwd "${REPO_ROOT}" \ | |
| "${SIF_DIR}/response_quality.sif" \ | |
| python -m pytest "$@" | |