-
Notifications
You must be signed in to change notification settings - Fork 143
Converts negative constant axis to positive if present in Join(COp)
#1527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Join(COp)
Co-authored-by: Ricardo Vieira <[email protected]>
tests/tensor/test_basic.py
Outdated
assert isinstance( | ||
s.owner.outputs[0].owner.op, Join | ||
), "Expected output node to be a Join op" | ||
|
||
assert isinstance( | ||
s.owner.inputs[0], ptb.Constant | ||
), "Expected axis to be a Constant" | ||
assert ( | ||
s.owner.inputs[0].data == 1 | ||
), f"Expected axis to be normalized to 1, got {s.owner.inputs[0].data}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: Convert this to be a single assert, and get rid of the failure messages it's easier to just read the code. Same below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or just do assert equal_computations([join(-1, a, b)], [join(1, a, b)])
which is perhaps more readable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much cleaner. Added this and removed the verbose tests
Co-authored-by: Ricardo Vieira <[email protected]>
The remaining comment is a nitpick, up to you whether you address them. Thanks, and to be clear I'm just shitting on LLM's being crazy verbose, the code changes and initiative are great. I suggest you don't let them drive the tests, from experience they are ridiculous redundant / verbose, or don't actually test anything. |
Thanks Ricardo. I agree they are really verbose. Thanks for taking the time to teach me around, appreciate it. |
Co-authored-by: Ricardo Vieira <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1527 +/- ##
=======================================
Coverage 82.04% 82.04%
=======================================
Files 231 230 -1
Lines 52364 52352 -12
Branches 9217 9214 -3
=======================================
- Hits 42962 42953 -9
- Misses 7094 7095 +1
+ Partials 2308 2304 -4
🚀 New features to boost your workflow:
|
Description
Converts negative constant axis to positive if present in
Join(COp)
DISCLAIMER: Completely vibe coded in Claude Sonnet 3.7. May well be complete non-sense, and if so please close immediately.
Related Issue
Checklist
Type of change