Pull requests / #3239
#3239 [Other] tests: test_setup_golden pins the core count the golden output depends on
open · @Buddychek · 0 Kommentare · Auf GitHub
Setup & installModels & quantsWindows
Beschreibung
### Problem and result `setup.py` derives the CPU vision encoder's threads from `os.cpu_count() // 2`, so `tools/test_setup_golden.py`'s golden output moved with the machine it ran on: the golden baseline PC has 12 cores (6 threads), and on any other core count the golden comparison failed. After: the test mocks `os.cpu_count` to the baseline PC's 12 cores, so the golden output is stable on every machine. Test-only change, no setup.py change. ### Related discussion Closed in the 0.2.0-beta tracker reset; rebased on main and re-verified per the reset note. ### Approach Mock `os.cpu_count` to 12 in the golden test's fixture, matching the baseline the golden file was recorded on. ### Validation Passed, rebased on 0.2.0-beta main (`e88ee39d`): `python tools/test_setup_golden.py` → 4/4 OK, exit 0. Windows 11, Python 3.15, no GPU needed. Not run: CI. ### Limits Test-only; the mock pins the value the golden file was recorded with, it does not change how setup derives threads on a real machine.
Mehr auf der Site
Links zu Install, Modellen, Releases.