Spaces:
Running
Running
Download server/run_local.sh from lanczos/graphtestbed: direct link, hf CLI and curl.
- Browser
- Download file 1.15 kB
-
https://huggingface.co/spaces/lanczos/graphtestbed/resolve/main/server/run_local.sh
- Command line
-
hf download hf://spaces/lanczos/graphtestbed/server/run_local.sh
-
curl -L -o run_local.sh https://huggingface.co/spaces/lanczos/graphtestbed/resolve/main/server/run_local.sh
1.15 kB
| # Start the scoring API on localhost for solo development / self-testing. | |
| # | |
| # Usage: | |
| # GT_DIR=~/graphtestbed-private/ground_truth ./server/run_local.sh | |
| # | |
| # Then in another shell: | |
| # export GRAPHTESTBED_API=http://localhost:8080 | |
| # gtb submit <task> --file preds.csv --agent <name> | |
| set -euo pipefail | |
| : "${GT_DIR:?Set GT_DIR to a directory containing <task>.csv ground-truth files}" | |
| # Sensible defaults for local dev — sqlite in a tmp file, manifest from the | |
| # repo this script lives in, quota relaxed so debugging doesn't burn it. | |
| export GT_DB="${GT_DB:-/tmp/gtb_leaderboard.db}" | |
| export GT_MANIFEST="${GT_MANIFEST:-$(cd "$(dirname "$0")/.." && pwd)/datasets/manifest.yaml}" | |
| export GT_QUOTA="${GT_QUOTA:-1000}" | |
| export PORT="${PORT:-8080}" | |
| echo "GraphTestbed API (local)" | |
| echo " GT_DIR: $GT_DIR" | |
| echo " GT_DB: $GT_DB" | |
| echo " GT_MANIFEST: $GT_MANIFEST" | |
| echo " GT_QUOTA: $GT_QUOTA / day / IP / task" | |
| echo " PORT: $PORT" | |
| echo | |
| echo "Healthz: curl http://localhost:$PORT/healthz" | |
| echo "Submit: GRAPHTESTBED_API=http://localhost:$PORT gtb submit <task> ..." | |
| echo | |
| cd "$(dirname "$0")" | |
| exec python api.py | |