Skip to content

feat(install): torch-free default install (tracking/export opt-in extras)#119

Merged
TCVinNYC merged 1 commit into
mainfrom
feat/torch-free-default-install
Jun 25, 2026
Merged

feat(install): torch-free default install (tracking/export opt-in extras)#119
TCVinNYC merged 1 commit into
mainfrom
feat/torch-free-default-install

Conversation

@TCVinNYC

Copy link
Copy Markdown
Member

What

Moves the two torch-heavy packages out of the default install:

  • `ultralytics` → `requirements/export.txt` (the .pt→ONNX export fallback)
  • `boxmot` → `requirements/tracking.txt` (BoT-SORT/DeepOCSORT/ByteTrack + OSNet ReID)

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 --dev still installs boxmot + ultralytics and the full test suite runs unchanged. Verified via `--dry-run`:

  • lean default → `Profiles: base` (no boxmot/ultralytics)
  • `--ci --dev` → installs dev.txt (→ tracking + export)
  • `--full` → base + tracking + export

Gates

ruff + format + mypy clean; 1312 tests pass; selftest OK; 35 install tests (new coverage for the extras + lean default).

🤖 Generated with Claude Code

… 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 TCVinNYC merged commit 39d140f into main Jun 25, 2026
3 checks passed
@TCVinNYC TCVinNYC deleted the feat/torch-free-default-install branch June 25, 2026 22:17
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>
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.

1 participant