Skip to content

feat(gdpval): AA v2 prompt, deps, and mandatory Apptainer sandbox - #1714

Merged
vadam5 merged 15 commits into
mainfrom
agronskiy/feat/gdpval-aa-v2-update/prompt-and-deps
Jun 29, 2026
Merged

vadam5 merged 15 commits into
mainfrom
agronskiy/feat/gdpval-aa-v2-update/prompt-and-deps

Conversation

@agronskiy

Copy link
Copy Markdown
Contributor

GDPval tasks need a heavy toolchain (TeX Live, ImageMagick, the full data/ML/document/audio stack, CPU torch) and longer rollouts than the defaults allowed. This brings the environment in line with the AA v2 prompt and dependency set, and closes a correctness hole around where the agent actually executes.

Apptainer sandbox now mandatory. The GDPval dependency set lives only in the Apptainer .sif built from containers/gdpval.def — it is deliberately not installed in the evaluation container, since doing so would bloat the eval image by many GB. The old behavior silently fell back to the local backend (the eval container), which lacks those deps, so the agent ran in a crippled environment and produced invalid results without any signal. Now we fail fast instead:

  • GDPValTask.get_exec_provider raises when gdpval_container_path is unset or the .sif is missing, rather than returning None.
  • app.py refuses to instantiate the local exec provider for GDPval tasks, with an error pointing at containers/gdpval.def.

Other changes

  • Sandbox image: Python 3.13 base, TeX Live (curated set, not texlive-full), ImageMagick, and the full prompt-advertised package set.
  • Turn limit 100 → 250 (GDPval tasks are long-horizon).
  • abandon_task_finish early-exit tool so the model can bail cleanly when it cannot produce output (requires stirrup >= 0.1.11).
  • Prompt updates for GDPval-AA v2.

@agronskiy
agronskiy force-pushed the agronskiy/feat/gdpval-aa-v2-update/prompt-and-deps branch from 5453483 to d39abc3 Compare June 24, 2026 13:34
agronskiy and others added 10 commits June 26, 2026 22:09
GDPval-AA v2 expands the sandbox with a full TeX Live LaTeX toolchain.
Add texlive (latex base/recommended/extra, fonts, xetex, luatex, lang)
+ latexmk to the Apptainer def with command -v guards, and advertise it
in both task prompts for consistency.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: Alex Gronskiy <[email protected]>
GDPval-AA v2 lists ImageMagick among sandbox system tools. Add the
imagemagick apt package with a command -v convert guard and advertise
it in both task prompts.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: Alex Gronskiy <[email protected]>
GDPval-AA v2 runs on Python 3.13. Bump the Apptainer base image from
python:3.12-bookworm to python:3.13-bookworm and align the user_prompt.j2
environment description (gdpval_user_prompt.txt already stated 3.13).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: Alex Gronskiy <[email protected]>
GDPval-AA v2 lets a model exit early when it cannot complete the task.
Upstream stirrup ships no dedicated abandon tool but supports multiple
finish tools since v0.1.9 (PR #49), so implement abandon as a second
finish tool in gym code rather than patching stirrup:

- ABANDON_FINISH_TOOL (`abandon_task_finish`, reason-only, no paths) in
  finish_tool_coercing.py
- pass finish_tool=[COERCING_FINISH_TOOL, ABANDON_FINISH_TOOL] for gdpval
- advertise the tool in the task + system prompts
- raise stirrup floor to >=0.1.9 (multiple finish tools)

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: Alex Gronskiy <[email protected]>
Bump the stirrup floor to the latest release and switch the deprecated
FINISH_TOOL_NAME import to DEFAULT_FINISH_TOOL_NAME (FINISH_TOOL_NAME is
deprecated upstream since the constants refactor).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: Alex Gronskiy <[email protected]>
GDPval-AA v2 expands the turn budget to 250 turns for longer-horizon
trajectories. Bump agent_max_turns in both the standalone and canonical
benchmark configs, the app.py defaults, and the system prompt step count.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: Alex Gronskiy <[email protected]>
Replace the curated texlive-* package set with texlive-full to match
GDPval-AA v2's "full TeX Live LaTeX toolchain" and avoid missing-style
failures on document tasks. Note: this makes the .sif substantially
larger and slows the build.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: Alex Gronskiy <[email protected]>
Reconcile the sandbox with everything gdpval_user_prompt.txt advertises so
the agent's environment description matches reality:

- apt: default-jre-headless (tabula), gdal-bin/proj-bin (geospatial CLIs),
  libgl1/libglib2.0-0 (opencv), libsndfile1 (soundfile/librosa), espeak-ng
  (pyttsx3), libzbar0 (pyzbar), wkhtmltopdf (imgkit/pdfkit), unar (rarfile),
  libgraphviz-dev (pygraphviz); + java/gdalinfo command guards
- pip: full data/ML/doc/audio/geo/chem stack from the prompt; CPU-only
  torch via the pytorch cpu index to avoid multi-GB CUDA wheels
- best-effort group for extras the prompt marks not-available-on-aarch64
  (pygraphviz, svglib, cairosvg, cadquery, aspose-words, dlib, mtcnn, ...)
- KERAS_BACKEND=torch so keras 3 has a backend
- drop the unsupported "21" from the OpenJDK prompt line (bookworm ships 17)

Build is now heavy and slow; unpinned versions may need iteration on the
target arch.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: Alex Gronskiy <[email protected]>
texlive-full bloats the image by several GB and slows the build for
little benefit. Revert to a curated set (latex base/recommended/extra,
fonts, xetex, luatex, lang-european, latexmk) that still covers
pdflatex/xelatex/lualatex/latexmk for the common document tasks.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: Alex Gronskiy <[email protected]>
GDPval's heavy dependency set (TeX Live, the full data/ML/document/audio
stack, CPU torch, ...) lives only in the Apptainer .sif built from
containers/gdpval.def and is deliberately NOT installed in the evaluation
container (it would bloat the eval image by many GB). Running GDPval on
the local backend therefore silently puts the agent in a crippled env and
yields invalid results.

Replace the silent local-sandbox fallback with hard errors:
- GDPValTask.get_exec_provider raises when gdpval_container_path is unset
  or the .sif is missing, instead of returning None.
- app.py refuses to instantiate the local provider when is_gdpval.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: Alex Gronskiy <[email protected]>
@agronskiy
agronskiy force-pushed the agronskiy/feat/gdpval-aa-v2-update/prompt-and-deps branch from d39abc3 to 09e560f Compare June 26, 2026 20:09
agronskiy and others added 4 commits June 26, 2026 22:11
Signed-off-by: Alex Gronskiy <[email protected]>
Align gdpval.def with the GDPval AA agent's advertised runtime (the
~/Downloads apt/python reference snapshots, which match the AA system
prompt 1:1):

- Python: add polars, duckdb, pyarrow, xarray, onnxruntime, playwright,
  markitdown, mammoth, magika, casadi, nlopt, ezdxf, pypdf/pypdfium2,
  scour, SpeechRecognition, youtube-transcript-api, contextily,
  xlsxwriter, boto3, azure doc-intelligence. Prune def-only packages the
  reference omits (keras, jax, dlib, mtcnn, fuzzywuzzy, pdfkit/imgkit,
  markdown2, xml-python, nbclassic, PyPDF2, pyprover/pylog/pyth3,
  pygraphviz). Make the main block fail loud (no best-effort) and add a
  Python import smoke check over the advertised stack.
- TeX Live: add the curated parts the AA image carries but the def
  lacked — texlive-pictures (TikZ), -science, -plain-generic, -pstricks,
  and biber; switch lang-european -> lang-greek to match the reference.
  Still not the full texlive distribution.
- System: add chromium (AA advertises it; playwright), jq, unzip,
  fonts-liberation; drop wkhtmltopdf (replaced by weasyprint/chromium).
- Build checks: kpsewhich tikz/siunitx/pst-plot + command -v for
  biber/jq/unzip/chromium/lualatex so a broken build aborts.

Signed-off-by: Alex Gronskiy <[email protected]>
…-aa-v2-update/prompt-and-deps

Signed-off-by: Alex Gronskiy <[email protected]>
# GDPval-AA v2 early-exit: expose a second finish tool the model can call
# instead of ``finish`` when it cannot complete the task (no files).
# Requires stirrup >= 0.1.9 (multiple finish tools, PR #49).
from responses_api_agents.stirrup_agent.finish_tool_coercing import (

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we want these two features even if the dataset is not the GDPval dataset, right?

@vadam5
vadam5 merged commit c192c7c into main Jun 29, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants