[FIX] Let the tile-* CLIs run without pytest installed - #478
Merged
Merged
Conversation
tilelens.wrapper imported pytest at module level, but pytest is only in the test extra. After a plain `pip install tilelens`, tile-sanitizer, tile-profiler, tile-race and their triton-* aliases all failed with ModuleNotFoundError before running anything. pytest is now imported in the branch that forwards to pytest.main, the only place it is used. Add a test that imports tilelens.wrapper in a subprocess with pytest blocked.
Performance Benchmark
Iterations: 1 warmup + 20 measured |
Jokeren
approved these changes
Sep 27, 2026
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.
Summary
tilelens.wrapperimportedpytestat module level, butpytestis only in thetestextra. After a plainpip install tilelens,tile-sanitizer,tile-profiler,tile-raceand theirtriton-*aliases all failed withModuleNotFoundError: No module named 'pytest'before running anything. This was already the case fortriton-viz3.0, and it is visible now thattilelens3.1 is on PyPI.pytestonly in the branch that forwards topytest.main, the one place it is used.Test Plan
test_wrapper_imports_without_pytest, which importstilelens.wrapperin a subprocess withpytestblocked. The same check fails onmain.torchandnumpybut withoutpytest.tile-sanitizer,tile-profiler,tile-race,triton-sanitizer,triton-profiler, andtriton-race-detectorall ran a small kernel script.pytest,tile-sanitizer pytest -q test_k.pystill runs the test.After merge: tag the merge commit
v3.1.1and publish a GitHub release, which uploadstilelens3.1.1 through the existing trusted publisher.Related Issues
Follow-up to #477.
Breaking Changes
None.
Checklist
npm run build:frontendif the PR modified any TypeScript code.