Datasets:
File size: 4,089 Bytes
af5b4af | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | # Science Desk
An [OpenEnv](https://github.com/meta-pytorch/OpenEnv) environment for the OpenEnv Arena, forked from
dnakhla's Terminal Desk v2 (Apache-2.0, see `NOTICE`). Each episode is a workspace under `/app` with a short
instruction. The agent runs commands (`exec`), writes files (`write_file`) and sends `evaluate`; a hidden
verifier checks the one output file the task names and returns 1 or 0.
The interface is Terminal Desk's copy of OpenEnv's upstream `tbench2_env` wrapper, which the arena operator
uses for its own tasks: same action and observation schema, the instruction repeated in every observation,
output not cut, the operator's per-task budgets. The image includes numpy, scipy and pandas.
## Tasks
10 natural-science families at three levels (30 task ids, `<family>-L<level>`). Higher levels add volume and
a caveat the agent has to find and apply. The eight new families are modelled on public SkillsBench v1.1
science tasks, with their own generated data.
| Family | Modelled on | Output file |
|---|---|---|
| `sci_kinetics` | (Terminal Desk) | `fit.json`: first-order rate constant, half-life; Arrhenius at L3 |
| `sci_stoich` | (Terminal Desk) | `batch_report.json`: limiting reagent, molar mass, isolated grams |
| `sci_units` | lab-unit-harmonization | `harmonized.csv`: canonical units; L2 messy spellings, L3 re-runs and a QC drop |
| `sci_protein` | protein-expression-analysis | `top_hits.csv`: top log2 fold changes; L2 missing values, L3 sample sheet and Welch t filter |
| `sci_flood` | flood-risk-analysis | `flood_results.csv`: flood days per gauge; L2 missing codes, L3 m/ft thresholds |
| `sci_trend` | lake-warming-attribution | `trend.json`: OLS and Sen slopes; L2 monthly data, L3 Mann-Kendall Z |
| `sci_quake` | earthquake-plate-calculation | `answer.json`: event furthest from a boundary; L2/L3 filters, L3 lon/lat order |
| `sci_period` | exoplanet-detection-period | `period.json`: Lomb-Scargle period; L2 quality flags, L3 two sectors |
| `sci_picking` | seismic-phase-picking | `picks.json` / `picks.csv`: P (and S) arrival samples; L3 three stations |
| `sci_vitals` | radar-vital-signs | `vitals.json` / `vitals.csv`: breathing and heart rate; L3 three recordings |
`sci_period`, `sci_picking` and `sci_vitals` inputs are 9k-33k tokens: printing them overruns the context
budget, so the agent has to process them with a script.
## Reward
Binary, on `evaluate`: 1.0 when the output file exists and every check passes (exact key set or header, every
row, stated tolerances), else 0.0. `close` ends the episode without a reward. After 32 calls the environment
evaluates on its own. No partial credit.
## Instances and isolation
Each task id builds one fixed instance (seeded from the id), so a GRPO group of rollouts compares answers to
the same problem; `<family>-L<level>-i<k>` names further fixed instances. The server runs as root outside
`/app`; `exec` and `write_file` run as `nobody` with CPU, memory, file-size and process limits, cannot read
the server tree, and every `nobody` process is killed after each action and before verification. Expected
outputs live only in server memory; the verifier refuses symlinks, FIFOs and oversized files.
## Build and test
```sh
python3 -m venv .venv && .venv/bin/pip install vendor/openenv-0.6.1.dev0-py3-none-any.whl pytest websockets httpx numpy scipy
PYTHONPATH=. .venv/bin/pytest -q tests # oracle = 1, corrupt = 0, schema, independent solvers
PYTHONPATH=. .venv/bin/python tools/check_family.py # per family: oracle 1, corrupt 0, empty 0
DOCKER_DEFAULT_PLATFORM=linux/amd64 docker build -t ghcr.io/syndicate604/science-desk:v5 .
bash tools/pool.sh up ghcr.io/syndicate604/science-desk:v5 8
.venv/bin/openenv validate --url http://localhost:18001
.venv/bin/python tools/replay.py http://localhost:18001 # every task over WebSocket
```
`tools/calibrate.py` plays Qwen3.8-27B through OpenRouter under the arena's token budgets, with a hard spend
cap (`--budget`). Screens have underestimated the arena model, so treat them as sanity checks only.
|