Download tasks/task_034/pre_artifacts.sh from OpenMOSS-Team/SWE-bench-Science: direct link, hf CLI and curl.
- Browser
- Download file 744 Bytes
-
https://huggingface.co/datasets/OpenMOSS-Team/SWE-bench-Science/resolve/main/tasks/task_034/pre_artifacts.sh
- Command line
-
hf download hf://datasets/OpenMOSS-Team/SWE-bench-Science/tasks/task_034/pre_artifacts.sh
-
curl -L -o pre_artifacts.sh https://huggingface.co/datasets/OpenMOSS-Team/SWE-bench-Science/resolve/main/tasks/task_034/pre_artifacts.sh
744 Bytes
| set -eu | |
| # Pier runs this hook in the task workdir after the agent exits and before a | |
| # separate verifier starts. Always create the artifact, including for a clean | |
| # or timed-out agent run, so the verifier receives an explicit empty patch. | |
| task_dir="${SCI_BENCH_TASK_DIR:-$PWD}" | |
| artifacts_dir="${ENV_ARTIFACTS_PATH:-/logs/artifacts}" | |
| patch="$artifacts_dir/model.patch" | |
| mkdir -p "$artifacts_dir" | |
| : > "$patch" | |
| cd "$task_dir" | |
| git config --global --add safe.directory "$task_dir" | |
| roots="$(git rev-list --max-parents=0 --reverse HEAD)" | |
| set -- $roots | |
| if [ "$#" -ne 1 ]; then | |
| echo "task repository must have exactly one baseline root commit" >&2 | |
| exit 1 | |
| fi | |
| baseline="$1" | |
| git add -A | |
| git diff --cached --binary "$baseline" > "$patch" | |