Repository navigation
ci(tensilelite): enforce only relative tensilelite imports (AIHPBLAS-3989) - #13932
Conversation
b9538e2 to
23238a5
Compare
✅ All Checks Passed — Ready for Review
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🎉 All checks passed! This PR is ready for review. |
23238a5 to
ae50529
Compare
ae50529 to
0dd56b9
Compare
0dd56b9 to
a2c95e0
Compare
a2c95e0 to
2cd157f
Compare
2cd157f to
d71943f
Compare
3694d29 to
94f88fc
Compare
94f88fc to
584d893
Compare
584d893 to
123eef0
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #13932 +/- ##
===========================================
- Coverage 77.72% 77.71% -0.01%
===========================================
Files 2963 2904 -59
Lines 513494 491013 -22481
Branches 79567 74424 -5143
===========================================
- Hits 399071 381547 -17524
+ Misses 86278 84470 -1808
+ Partials 28145 24996 -3149
*This pull request uses carry forward flags. Click here to find out more. 🚀 New features to boost your workflow:
|
123eef0 to
e9b1e5a
Compare
5160310 to
fa330f7
Compare
fa330f7 to
de9628c
Compare
de9628c to
98968a8
Compare
98968a8 to
7819544
Compare
7819544 to
67f3a20
Compare
67f3a20 to
9eb0234
Compare
The Tensile compatibility package is gone, so a new import of the old name fails at import time. Drop the Tensile package root, the bridge exemption and the Tensile banned name from the absolute-import hook, keeping the rule that tensilelite modules use package-relative imports.
9eb0234 to
ec65098
Compare
PR Pundit review(Testing PR Pundit Code Review agent. Not all comments may be relevant. This is a one-time automated pass: please address what is useful, no need to request a re-review. Please reply to each point, whether it applies or not: we harvest these replies, and both kinds are enormously helpful for tuning the agent. Reach out to @peymanr for suggestions.)
1. 🟠 Should fix: Pre-commit hook silently passes legacy
|
The legacy Tensile imports will fail on their own now that #12162 has merged (this PR was stacked ontop of it). |
JIRA ID : AIHPBLAS-3989
Motivation
#12162 removes the
Tensilecompatibility package, so a new import of the old name now fails at import time. The absolute-import pre-commit hook added in #13278 still carries theTensilepackage root, a bridge exemption forTensile/__init__.py, andTensileas a banned name. All of that is dead after #12162. The rule that remains useful is thattensilelitemodules use package-relative imports.Technical Details
check_no_absolute_imports.pynow checks onlyprojects/hipblaslt/tensilelite/tensilelite. TheTensilepackage root, theTEMPORARY_EXEMPTIONSbridge exception and theTensilebanned name are removed, and the docstring and failure message are updated.tensilelite-no-absolute-importspre-commit entry matches only thetensilelitepackage and itsTests/exclusion, and its stale "move in flight" comment is removed.tensileliteas the banned example. The bridge-exemption and missing-package-root tests are removed. An added test records thatTensileimports are no longer reported by this hook.tensilelite: only lines added by a change are checked, andTests/is excluded.Test Plan
Run the checker's unit tests, which exercise staged and PR-range changes, the package root, test-directory exclusion, existing imports and unparseable files. Run the repository's pre-commit checks in PR CI. GPU testing is unnecessary because this change only examines Python source.
Test Result
--noconftest; at this point in the stack the package conftest still fails on staleTensileimports inherited fromdevelop).Submission Checklist
Risk level
Low (1/5): only the pre-commit hook and its tests change. It does not change packaged code or GPU behavior.