Repository navigation
fix(scicode): drop scipy from [tool.uv] exclude-dependencies - #1832
Merged
laszkiewiczp merged 6 commits intoJun 30, 2026
Merged
Conversation
mjmikulski
previously approved these changes
Jun 30, 2026
laszkiewiczp
enabled auto-merge (squash)
June 30, 2026 11:50
Contributor
Author
|
/ok to test ca11df2 |
agronskiy
added a commit
that referenced
this pull request
Jun 30, 2026
Remove pillow, matplotlib, scikit-learn, joblib, threadpoolctl, contourpy, cycler, kiwisolver, and cffi from [tool.uv].exclude-dependencies (scipy is dropped by the base PR #1832). Every responses_api_agents/* and resources_servers/* venv installs nemo-gym editably and inherits this [tool.uv] config, so under uv >=0.11.24 these packages were silently dropped (exit 0, no error) from server venvs that depend on them -- e.g. GDPVal stirrup_agent crashed at startup on `from PIL import Image`. Full root-cause analysis and affected-server list in the PR description. stirrup_agent: relax Pillow==12.2.0 -> >=10.4.0,<12 since moviepy caps pillow<12 (the repo-wide 12.2.0 floor can't apply there). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Signed-off-by: Alex Gronskiy <[email protected]>
Contributor
Author
|
/ok to test eb57a04 |
The scicode resources-server runs every sub-step with `import scipy`, but scipy was stripped from its venv by the global exclude-dependencies list (intended only for full-mlflow transitives). Removing scipy lets each server's requirements.txt install it. FEP-1134. Signed-off-by: laszkiewiczp <[email protected]> Signed-off-by: Alex Gronskiy <[email protected]>
…vs need (#1835) ## Summary `[tool.uv].exclude-dependencies` in the repo-root `pyproject.toml` - added to slim full `mlflow`'s heavy transitive deps out of the **main** env (#727) - also leaks into **every per-server venv** and silently strips packages those servers explicitly depend on. Approx 12 servers affected This PR removes the packages that servers genuinely need from `exclude-dependencies` and forces the `pillow==12.2.0` CVE floor via `override-dependencies`. ## Root cause Every `responses_api_agents/*` and `resources_servers/*` requirements file installs nemo-gym editably (`-e nemo-gym[dev] @ ../../`). When `gym env start` runs `uv pip install -r requirements.txt` from a server directory, uv walks up, discovers the repo-root `[tool.uv]`, and applies `exclude-dependencies` to **that server's whole resolution** — not just the main env. After uv version bump: the Dockerfile installs uv via `curl astral.sh/uv/install.sh` (always latest): | Image | uv | `exclude-dependencies` behavior | stirrup venv | |---|---|---|---| | `…b44e814f` (Apr) | 0.11.8 | excludes **transitive** only → direct `Pillow` pin honored | pillow 12.2.0 ✅ | | `…aad609d5` (Jun) | 0.11.24 | excludes **direct requirements too** | pillow **dropped** ❌ | Under uv ≥0.11.24 the install succeeds with exit 0 and just omits the excluded packages. ## Affected sub-venvs These build their venv from the repo checkout (deployment/CI image **and** any dev running `gym env start` from a clone with uv ≥0.11.x). Pure wheel installs are unaffected (`[tool.uv]` isn't in wheel metadata). ### Direct (server's own requirements lists an excluded package) | Sub-venv | Dropped (direct) | |---|---| | `responses_api_agents/stirrup_agent` | **pillow** | | `resources_servers/arena_judge` | scipy, joblib, threadpoolctl, scikit-learn | | `resources_servers/aviary` | pillow | | `resources_servers/ether0` | matplotlib, pillow, contourpy, cycler, kiwisolver, scikit-learn, scipy, joblib, threadpoolctl | | `resources_servers/grl_sokoban` | scipy, pillow | | `resources_servers/longmt_eval` | scipy, joblib | | `resources_servers/math_with_code` | scipy | | `resources_servers/newton_bench` | scipy | | `resources_servers/reasoning_gym` | matplotlib, pillow, cycler, kiwisolver | | `resources_servers/scicode` | scipy, matplotlib | | `resources_servers/vlm_eval_kit` | matplotlib, pillow, scikit-learn | | `resources_servers/wmt_translation` | scipy | ### Transitive (server requests a puller of an excluded dep) | Sub-venv | Puller → dropped dep | |---|---| | `responses_api_agents/stirrup_agent` | seaborn→matplotlib+scipy, weasyprint→pillow+cffi, reportlab→pillow | | `resources_servers/grl_sokoban` | imageio→pillow | | `resources_servers/longmt_eval` | torchvision→pillow | | `resources_servers/wmt_translation` | torchvision→pillow | | `resources_servers/vlm_eval_kit` | torchvision→pillow, scikit-image→scipy+pillow+imageio, imageio→pillow, nltk→joblib | | `resources_servers/cvdp` | nltk→joblib | | `resources_servers/ifbench` | nltk→joblib | (Only `stirrup_agent` is baked into the current GDPVal/nemotron image; the rest fail wherever their own benchmark configs run.) ## The fix `pyproject.toml`: 1. **Drop from `exclude-dependencies`** the packages servers depend on (directly or hard-transitively): `cffi, contourpy, cycler, joblib, kiwisolver, matplotlib, pillow, scikit-learn, scipy, threadpoolctl`. The remaining entries are genuine mlflow-UI/server deps (flask, alembic, sqlalchemy, graphene, …) no environment needs. 2. **Add `override-dependencies = ["pillow==12.2.0"]`** — keeps #1370's CVE floor while overriding moviepy's conservative `<12` cap (12.2.0 works at runtime, as the older uv-0.11.8 image proves). A short breadcrumb comment in the file points back to this PR so the exclude list isn't re-broken later. ### Validation (in `aad609d5` image, with this exact edit applied) `stirrup_agent`, `reasoning_gym`, `arena_judge` all resolve **exit 0** with `pillow==12.2.0`, `matplotlib`, `scipy`, `scikit-learn`, `joblib` present; full stirrup install → `import PIL, moviepy, stirrup, seaborn, matplotlib, weasyprint` all succeed. Signed-off-by: Alex Gronskiy <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> Signed-off-by: Alex Gronskiy <[email protected]>
## What
`gym dataset collate` already accepts `--resources-server` but not
`--model-type`. Model-dependent data workflows therefore had to pass the
model as an internal config path:
```bash
gym dataset collate \
--config responses_api_models/vllm_model/configs/vllm_model_for_training.yaml \
--resources-server format_verification/freeform_formatting \
--mode train_preparation --download
```
This adds the existing `MODEL_TYPE` selector to the `dataset collate`
flags so the model can be selected by name, matching `env start` / `eval
run`:
```bash
gym dataset collate \
--resources-server format_verification/freeform_formatting \
--model-type vllm_model \
--mode train_preparation --download
```
## Why
Several `collate` workflows (`train_preparation` that generates with a
model, `example_validation` with a judge) require a model server, which
today forces an internal `+config_paths=[...]` path. Run-by-name parity
here is part of the configuration-friction effort (#1205).
## Changes
- `nemo_gym/cli/main.py`: add `MODEL_TYPE` to the `dataset collate`
command flags (one line; the selector already exists and is shared with
`env start` / `eval run`).
- `tests/unit_tests/test_cli_main.py`: add
`test_collate_model_type_selector` asserting `--resources-server` +
`--model-type` coalesce into the resolved config paths.
## Testing
- `pytest tests/unit_tests/test_cli_main.py` — 120 passed.
- `gym dataset collate --help` now lists `--model-type NAME`.
Signed-off-by: Wojciech Prazuch <[email protected]>
Signed-off-by: Alex Gronskiy <[email protected]>
Closes #1761. Part of #1436. ## Summary **New page — `evaluation/benchmarks.mdx`** Dedicated Benchmarks reference page covering: what a benchmark is (evaluation-configured overlay on top of an environment's resources server); how benchmarks relate to environments with a real config example (`aime24`); CLI discovery (`gym list benchmarks`, `gym search`); benchmark selection criteria table; overview of all six benchmark categories (80+); and an Interpreting Results section with cards linking to Build Verifiers, Aggregate Metrics, Diagnose Results, and Reward Profiling. **`evaluation/index.mdx`** - Renamed page title from "Evaluation" to "Evaluate" to match the nav label - Replaced inline Benchmarks prose and checklist with a 3-card block pointing to the new page - Rewrote the Gym Evaluation Loop as 7 numbered steps with actual CLI commands - Added Agent Skills card (`/agent-server/agent-skills`) - Slimmed Models and Agent Harnesses sections to 1 sentence each - Fixed step 3/4 split: `--resume` now correctly attributed to `gym eval run`, not `gym eval aggregate` **`evaluation/environment-list.mdx`** - CLI discovery callout added at top - Category renamed "Math" → "Math & Science" - 14 missing resources servers added across all category sections: `arena_judge`, `math_proof_judgement`, `frontierscience_judge`, `equivalence_llm_judge`, `bunsenbench_chemistry_mcq`, `critpt`, `ether0`, `inverse_if`, `abstention`, `openenv`, `verifif`, `genrm_compare`, `tales`, `grl_tetris` - Benchmarks card added to footer **`evaluation/aggregate-metrics.mdx`** - Filled empty `description` frontmatter field - Added Benchmarks card to footer (return path from the benchmarks→aggregate-metrics link) **`fern/versions/main.yml`** - Renamed Evaluation section to "Evaluate" — consistent with the action-oriented nav pattern used by "Build Verifiers", "Configure Agents", etc. ## Addresses #1761 acceptance criteria - [x] `evaluation/benchmarks.mdx` created covering benchmark vs environment distinction, selection guidance, category overview, and result interpretation - [x] CLI discovery commands documented on both the Benchmarks and Browse Environments pages - [x] Interpreting Results section with cards for Build Verifiers, Aggregate Metrics, Diagnose Results, and Reward Profiling - [x] Navigation card in evaluation index and cross-page footer links complete the nav loop - [ ] `fern check` — pending CI (no Fern org provisioning locally) ## Test plan - [ ] Fern preview auto-generated on this PR — check the preview comment for rendered output - [ ] Review `benchmarks.mdx` structure and content accuracy - [ ] Confirm 14 added rows in `environment-list.mdx` match actual resources server directories - [ ] Confirm `index.mdx` evaluation loop reads correctly end to end - [ ] `fern check` passes in CI 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Seph Mard <[email protected]> Co-authored-by: Claude Sonnet 4.6 <[email protected]> Signed-off-by: Alex Gronskiy <[email protected]>
agronskiy
force-pushed
the
plaszkiewicz/fep-1134-scicode-scipy-fix-signed
branch
from
June 30, 2026 15:10
dcba22f to
c911196
Compare
…-scicode-scipy-fix-signed Signed-off-by: Alex Gronskiy <[email protected]>
Contributor
ko3n1g
approved these changes
Jun 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The scicode resources-server runs every sub-step with
import scipy, but scipy was stripped from its venv by the global exclude-dependencies list (intended only for full-mlflow transitives). Removing scipy lets each server's requirements.txt install it. Addresses FEP-1134.