fix: remove SciPy from core runtime#233
Merged
Merged
Conversation
abrichr
force-pushed
the
agent/remove-scipy-runtime
branch
from
July 23, 2026 23:00
cbb01af to
efeced3
Compare
abrichr
marked this pull request as ready for review
July 23, 2026 23:06
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 changed
ImageHashwith an internal Pillow/NumPy/OpenCV pHash, dHash, andhexadecimal Hamming-distance implementation
phash_png/phash_distancecontract and therecorder's settle behavior
imagehashandpywaveletsfrom the lock and keep SciPy out of thecore runtime dependency closure
CaptureSession.get_frame_atAPI abstracts externally provisioned FFmpegvideo
gate
Why
openadapt-flow -> ImageHash -> SciPypulled SciPy,libquadmath,libgfortran, andlibgccinto the native Desktop sidecar even though Flowonly needs pHash and dHash. The new implementation uses dependencies already in
the validated core and removes that compiled closure without weakening visual
verification.
Compatibility
The serialized hexadecimal format and Hamming-distance behavior are unchanged.
The OpenCV DCT is rescaled to SciPy fftpack's unnormalized DCT-II convention.
Differential validation matched ImageHash exactly on all 306 tracked PNGs both
raw and after REGION_STABLE edge preprocessing (612/612 exact), plus fixed
constant, geometric, 16x16, and seeded-random vectors.
SciPy remains available only through the opt-in
dev(scikit-image) andservice-mlxresearch extras; it is absent from the core export and cleanwheel install.
Validation
57 passedfocused recorder/vision/pixel-identity tests12 passedfixed hash and dependency-closure regressions3053 passed, 16 skippedacross the full non-E2E suiteabsent; hash smoke passed
check_release_consistency.py --validate-dist-dirRequires-Distcontains no ImageHash, PyWavelets, or SciPy1b057d8425ddc88d0700e25b76c42b4a592cec2f07ea6d8287386bc47064224bda93d55ce4770080c1aebcd604893fafe881729cb1377b0723b597c271f4bd97