deps(tracking): pin boxmot to 19.0.0 and split torch/numpy by platform - #154
Open
philsphicas wants to merge 1 commit into
Open
deps(tracking): pin boxmot to 19.0.0 and split torch/numpy by platform#154philsphicas wants to merge 1 commit into
philsphicas wants to merge 1 commit into
Conversation
Make the optional tracking extra install cleanly on every supported platform by pinning boxmot and resolving torch/numpy per platform. boxmot is pinned to 19.0.0 — the newest release that both keeps the tracker API engine/pipeline/track.py uses (`from boxmot.trackers import BotSort, ByteTrack, DeepOcSort` with the reid_model / with_reid constructor) and installs on every target platform. 22.x moved those classes into per-tracker submodules (boxmot.trackers.botsort, ...), breaking that import path; 20.x/21.x keep the API but require numpy>=2.2, which has no compatible torch wheel on x86_64 macOS (last Intel torch is 2.2.2, needs numpy<2). torch/numpy are split by platform: - x86_64 macOS: numpy==1.26.4, torch==2.2.2, torchvision==0.17.2 (the last Intel-mac torch wheel needs numpy<2). - every other platform: numpy==2.2.6, torch>=2.3.1,<3, torchvision>=0.18.1,<1. The >=2.3.1 floor matters because torch wheels declare no numpy upper bound, so without it pip can pair an older torch with numpy 2 — an ABI mismatch that crashes at runtime. The numpy split lives in base.txt (the torch-free core works with either version) and is mirrored in tracking.txt so the extra installs standalone via `pip install -r requirements/tracking.txt`. Co-authored-by: Copilot <[email protected]>
philsphicas
force-pushed
the
deps/torch-numpy-platform-split
branch
from
July 22, 2026 16:17
a25dd9a to
de79c4c
Compare
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 & why
Makes the optional
trackingextra install cleanly on every supported platformby (1) pinning
boxmotand (2) resolvingtorch/numpyper platform.The default install is torch-free (detection runs on ONNX Runtime; tracking
falls back to the built-in IoU tracker). The
trackingextra pulls in PyTorchtransitively via
boxmot, and that graph currently resolves differently — andsometimes not at all — across platforms.
How
boxmot pinned to
19.0.0— newest release that both keeps the tracker APIengine/pipeline/track.pyuses (from boxmot.trackers import BotSort, ByteTrack, DeepOcSortwith thereid_model/with_reidconstructor) andinstalls on every target platform:
boxmot.trackersinto per-tracker submodules(e.g.
boxmot.trackers.botsort), breaking that import path.numpy>=2.2, which has no compatible torchwheel on x86_64 macOS (last Intel torch is 2.2.2, needs
numpy<2).torch/numpy split by platform:
2.2.2(needsnumpy<2) →numpy==1.26.4,torch==2.2.2,torchvision==0.17.2.numpy==2.2.6,torch>=2.3.1,<3,torchvision>=0.18.1,<1. The>=2.3.1floor matters: torch wheels declare nonumpy upper bound, so without it pip can pair an older torch with numpy 2 — an
ABI mismatch that crashes at runtime.
The
numpysplit lives inbase.txt(the torch-free core works with eitherversion) and is mirrored in
tracking.txtso the extra installs standalone viapip install -r requirements/tracking.txt.Checklist
ruff check autoptz/ tests/ tools/passesruff format --check autoptz/ tests/ tools/passesmypy autoptz/engine/runtime/ autoptz/config/passes (CI gate: Linux / numpy 2.2.6)pytest tests/ --timeout=60greenpython -m autoptz --selftestpassesbase.txt/tracking.txtcomments)Testing
Requirements-only change (no
.pytouched). Verified end-to-end on x86_64macOS, Python 3.12 — the platform this split most affects — via
python tools/install.py --ci --dev --editable: the tracking stack resolves andinstalls cleanly (
torch 2.2.2/torchvision 0.17.2/numpy 1.26.4/boxmot 19.0.0), and ruff / ruff-format / selftest all pass. arm64-macOS /Linux / Windows are covered by CI.