Datasets:
Download tasks/a2aproject-a2a-python-440/pre_artifacts.sh from evaligo/swe-race: direct link, hf CLI and curl.
- Browser
- Download file 1.02 kB
-
https://huggingface.co/datasets/evaligo/swe-race/resolve/main/tasks/a2aproject-a2a-python-440/pre_artifacts.sh
- Command line
-
hf download hf://datasets/evaligo/swe-race/tasks/a2aproject-a2a-python-440/pre_artifacts.sh
-
curl -L -o pre_artifacts.sh https://huggingface.co/datasets/evaligo/swe-race/resolve/main/tasks/a2aproject-a2a-python-440/pre_artifacts.sh
1.02 kB
| # Capture the agent's work as the submission artifact. | |
| # | |
| # Diffing {base}..HEAD alone captures only COMMITTED work, and agents routinely | |
| # edit files without committing — that silently submits an empty patch and the | |
| # grader scores the pristine base repo (indistinguishable from a no-op agent). | |
| # So stage everything first and diff the INDEX against the base commit, which | |
| # picks up committed and uncommitted changes alike. Same approach the benchmark's own | |
| # sandbox uses in submit_diff(). | |
| set -uo pipefail | |
| cd /app || exit 0 | |
| mkdir -p /logs/artifacts | |
| git config --global --add safe.directory /app 2>/dev/null || true | |
| git add -A 2>/dev/null || true | |
| git diff --binary --cached 6d0ef593adaa22b2af0a5dd1a186646c180e3f8c > /logs/artifacts/model.patch 2>/dev/null || true | |
| if [ ! -s /logs/artifacts/model.patch ]; then | |
| git diff --binary 6d0ef593adaa22b2af0a5dd1a186646c180e3f8c HEAD > /logs/artifacts/model.patch 2>/dev/null || true | |
| fi | |
| echo "[pre_artifacts] captured $(wc -c < /logs/artifacts/model.patch) bytes" | |