Studio: remove OpenEnv and other unused packages (#6585)

* Studio: drop OpenEnv and unused ExecuTorch/open_spiel install deps

* Studio: drop 8 more unused install deps from extras

* Studio: restore tomli<3.11 for kernels; tidy dep-cleanup comments and tests

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Studio: refresh scan-packages baseline for scipy _external + unsloth-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.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Daniel Han <danielhanchen@gmail.com>
This commit is contained in:
oobabooga 2026-06-23 11:20:47 -03:00 committed by GitHub
commit 1cc785e5a0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 57 additions and 103 deletions

View file

@ -866,13 +866,11 @@ class TestInstallPythonStackFiltering:
result_path = ips._filter_requirements(extras, ips.NO_TORCH_SKIP_PACKAGES)
filtered = Path(result_path).read_text(encoding = "utf-8").lower()
lines = [
l.strip() for l in filtered.splitlines() if l.strip() and not l.strip().startswith("#")
]
for pkg in ["torch-stoi", "timm", "openai-whisper", "transformers-cfg"]:
lines = [
l.strip()
for l in filtered.splitlines()
if l.strip() and not l.strip().startswith("#")
]
for pkg in ips.NO_TORCH_SKIP_PACKAGES:
assert not any(
l.startswith(pkg) for l in lines
), f"{pkg} should be removed from extras.txt"

View file

@ -138,7 +138,6 @@ class TestFilterRequirements:
req = self._write_req(
tmp_path,
"""\
open_spiel
triton_kernels
torch-stoi
timm
@ -222,8 +221,8 @@ class TestRealRequirementsFiltering:
filtered = self._non_blank_non_comment(Path(result))
original = self._non_blank_non_comment(EXTRAS_TXT)
# These must be gone.
for pkg in ["torch-stoi", "timm", "openai-whisper", "transformers-cfg"]:
# Every NO_TORCH skip package present in extras.txt must be gone.
for pkg in ips.NO_TORCH_SKIP_PACKAGES:
assert not any(
l.lower().startswith(pkg) for l in filtered
), f"{pkg} should be removed from extras.txt"