Single-source the version, and stop the local test run lying - #34
Merged
Merged
Conversation
Three fixes to the build and test surface, all found by actually running the commands the README tells a developer to run. **The version is read from one place.** pyproject.toml declared a literal alongside the one in __init__.py. Nothing failed loudly when they disagreed — a wheel would just misreport itself. It is now `dynamic = ["version"]` with `[tool.hatch.version]` pointing at __init__.py. Proved dynamic rather than coincidental: setting __version__ to 9.9.9 builds mlx_cv-9.9.9-py3-none-any.whl. **`pytest` from the repository root no longer detonates.** There were no testpaths, so collection walked into references/, where mlx-vlm's smoke test calls sys.exit(1) at import time and takes the run down with an INTERNALERROR. CI never saw this because references/ is untracked, so the breakage was invisible to the one place that runs the suite automatically and unavoidable on every developer machine that has the checkouts. **Two heavy gates reported environment gaps as parity failures.** Both checked that the external assets were present but not that they could be read: the SAM 3.1 contract needs PyTorch, the DA3 video case needs OpenCV. With the weights on disk and neither package installed, they failed rather than skipped — red that says "parity broke" when nothing had been compared at all. They skip with the reason now. DA3's required mode still fails, so a gate that is supposed to run cannot vanish quietly. Before: INTERNALERROR, then 2 failed / 454 passed. After: 454 passed, 17 skipped, 0 failed.
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.
Three fixes to the build and test surface, all found by actually running the commands the README tells a developer to run.
The version is read from one place
pyproject.tomldeclared a literal alongside the one in__init__.py. Nothing failed loudly when they disagreed — a wheel would just misreport itself. It is nowdynamic = ["version"]with[tool.hatch.version]pointing at__init__.py.Proved genuinely dynamic rather than coincidental: setting
__version__to9.9.9buildsmlx_cv-9.9.9-py3-none-any.whl. Restored immediately;git diffon__init__.pyis empty.pytestfrom the repository root no longer detonatesThere were no
testpaths, so collection walked intoreferences/, where mlx-vlm's smoke test callssys.exit(1)at import time and takes the whole run down with anINTERNALERROR.CI never saw this because
references/is untracked — so the breakage was invisible to the one place that runs the suite automatically, and unavoidable on every developer machine that has the upstream checkouts.Two heavy gates reported environment gaps as parity failures
Both checked that the external assets were present but not that they could be read:
With the weights on disk and neither package installed, they failed rather than skipped — red that says "parity broke" when nothing had been compared at all. That is the worst kind of red, because it trains people to ignore it.
They skip with the reason now. DA3's
requiredmode still fails, so a gate that is supposed to run cannot vanish quietly. This follows the pattern the DA3 suite already used elsewhere (_or_skiphelpers,pytest.importorskip("cv2")) — the failing paths had simply missed it.Result
pytestINTERNALERRORtestpathsonlyBoth gates verified to emit a reason: