feat(install): torch-free default install (tracking/export opt-in extras)#119
Merged
Conversation
… extras ultralytics + boxmot (both pull ~2-3GB of PyTorch) move out of base.txt into requirements/tracking.txt and requirements/export.txt. The default install is now torch-free — detection via the prebuilt-ONNX download, tracking via the built-in IoU fallback. Opt in with --with-tracking / --with-export / --full. CI-safe: dev.txt references both extras (-r tracking.txt / -r export.txt), so `tools/install.py --ci --dev` still installs boxmot + ultralytics for the test suite. Dry-run verified: lean default excludes them; --ci --dev includes them. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
TCVinNYC
added a commit
that referenced
this pull request
Jun 26, 2026
…red) (#121) ## Problem `test_install.py::test_full_install_adds_both_extras` fails on **ubuntu CI only** (green on macOS) and has been red on `main` since #119. Root cause: `_auto_accelerator()` shelled out to the live host `/proc/cpuinfo` to detect an Intel CPU, so `plan_install()` was not deterministic from its `SystemInfo` input. On Intel Linux runners it appended an `openvino` profile the macOS runners never produced. ## Fix Probe the CPU brand once in `detect_system()` → `SystemInfo.cpu_brand`; `_auto_accelerator()` reads `system.has_intel_cpu`. The planner is now a pure function of `SystemInfo`. Real-world selection is unchanged (same brand string → same result). Affected tests set `cpu_brand` instead of patching the probe; added a determinism regression test. All 1337 tests pass; ruff + mypy + format green. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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.
What
Moves the two torch-heavy packages out of the default install:
The default `python tools/install.py` is now torch-free (~2–3 GB lighter): detection runs on ONNX Runtime via the prebuilt-ONNX download, and tracking falls back to the built-in IoU tracker. Opt into the heavy stack with `--with-tracking`, `--with-export`, or `--full`.
CI-safety
`requirements/dev.txt` references both extras (`-r tracking.txt` / `-r export.txt`), so
tools/install.py --ci --devstill installs boxmot + ultralytics and the full test suite runs unchanged. Verified via `--dry-run`:Gates
ruff + format + mypy clean; 1312 tests pass; selftest OK; 35 install tests (new coverage for the extras + lean default).
🤖 Generated with Claude Code