Skip to content

Studio: remove OpenEnv and other unused packages - #6585

Merged
danielhanchen merged 5 commits into
unslothai:mainfrom
oobabooga:studio-drop-openenv-bloat-deps
Jun 23, 2026
Merged

danielhanchen merged 5 commits into
unslothai:mainfrom
oobabooga:studio-drop-openenv-bloat-deps

Conversation

@oobabooga

Copy link
Copy Markdown
Member

Studio's install pulls git+https://github.com/meta-pytorch/OpenEnv.git, the only VCS dependency in the stack. Its git fetch fails on a corrupted uv cache and falls back to pip on every install. It also drags in packages nothing in Studio uses, including a full pytest stack shipped into runtime venvs.

OpenEnv backs unsloth's GRPO-with-environments training, which unsloth core imports behind a find_spec / try-except guard. Studio only trains via SFTTrainer / HF Trainer and never hits that path. None of the removed packages are unsloth or unsloth-zoo dependencies; they lived only in Studio's requirements, so the library install and its RL workflows are untouched.

Removed

From extras.txt, extras-no-deps.txt, and studio.txt:

  • OpenEnv and its tomli / tomli-w companions.
  • The ExecuTorch test stack (pytest, pytest-xdist, pytest-json-report, pytest-rerunfailures, hypothesis, kgb, parameterized, expecttest). ExecuTorch is already commented out, so these are test frameworks installed into runtime venvs for a disabled feature. CI installs its own pytest.
  • open_spiel, plus langid, evaluate, transformers-cfg, pybind11, ruamel.yaml, hydra-core, and the duplicated addict / easydict lines.

Each was checked for zero imports across unsloth / unsloth-zoo / studio, no mandatory requirer in the live venv, and no import in the runtime-cloned TTS repos (Spark-TTS, OuteTTS).

Kept

Three that looked removable but aren't:

  • einx: Spark-TTS does from einx import get_at (cloned at runtime, so no static import shows).
  • jiwer: used by the vision OCR save-merge benchmark tests.
  • flatbuffers: transitive dep of onnxruntime via data-designer's pymupdf4llm.

Notes

  • Re-added tomli; python_version < "3.11" next to kernels: it installs --no-deps and uses tomli as its tomllib fallback below 3.11. No-op on the 3.12/3.13 defaults.
  • Dropped the now-dead open_spiel / transformers-cfg entries from WINDOWS_SKIP_PACKAGES / NO_TORCH_SKIP_PACKAGES.
  • scripts/scan_packages_baseline.json still suppresses four removed packages; harmless, cleared on the next --write-baseline.

Verification

test_no_torch_filtering.py and test_e2e_no_torch_sandbox.py: 94 passed, 4 skipped.

@oobabooga
oobabooga requested a review from danielhanchen as a code owner June 22, 2026 17:49
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.

@oobabooga

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.

@oobabooga

Copy link
Copy Markdown
Member Author

@codex review

@oobabooga

Copy link
Copy Markdown
Member Author

/gemini review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@danielhanchen

Copy link
Copy Markdown
Member

@codex review

@danielhanchen

Copy link
Copy Markdown
Member

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request cleans up and refactors Python dependencies by removing unused packages (such as OpenEnv, open_spiel, transformers-cfg, easydict, addict, and various test/development dependencies) from the requirements files. It also updates the Python installation script and corresponding tests to dynamically check against the configured skip packages instead of using hardcoded lists. There are no review comments to address, and I have no additional feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: fc4b4bee4b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

…zoo tests

scipy moved its vendored array_api_compat from scipy/_lib to
scipy/_external, so the four allowlisted array_api_compat __init__.py
entries stopped matching and resurfaced as unsuppressed CRITICAL
"Downloads and executes remote code" findings on all three pip
scan-packages shards (extras, hf-stack, studio). Add the _external
paths next to the existing _lib ones so both scipy layouts stay covered.

Allowlist two unsloth-zoo test-file false positives now present in the
hf-stack shard: tests/test_mlx_save_export_regressions.py (writes to
/tmp dropper) and tests/test_mlx_trainer_internals.py (obfuscation plus
exec/eval).

Drop nine stale entries for packages removed from the Studio
requirements and no longer in any shard closure (evaluate, pytest,
hypothesis, kgb, langid), confirmed absent via with-deps resolution of
all three shards.
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.

@danielhanchen
danielhanchen merged commit 1cc785e into unslothai:main Jun 23, 2026
43 of 45 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