-
Notifications
You must be signed in to change notification settings - Fork 121
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
Add print_shape
and print_memory_map
option to debugprint
#1236
Conversation
Codecov ReportAttention: Patch coverage is
❌ Your patch status has failed because the patch coverage (50.00%) is below the target coverage (100.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #1236 +/- ##
==========================================
- Coverage 81.99% 81.98% -0.02%
==========================================
Files 188 188
Lines 48566 48567 +1
Branches 8677 8677
==========================================
- Hits 39823 39818 -5
- Misses 6580 6584 +4
- Partials 2163 2165 +2
|
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.
Awesome!
Another thing that I've been missing is to have a |
print_shape
option to debugprint
print_shape
option to debugprint
print_shape
and print_memory_map
option to debugprint
Thanks @Aarsh-Wankar |
…-devs#1236) * Added print_shape option to debugprint and simplify __str__ logic in TensorType * Add print_memory_map option to debugprint to enable destroy and view maps
Description
I added an extra argument
print_shape
todebugprint
and_debugprint
, which, when True, prints the shape of everyVariable
in the graph.Test demonstration:
Additionally, I also simplified the
__str__
function logic ofclass TensorType
to easily find the formatted shape.Related Issue
print_shape
argument todebug_print
#1191Checklist
Type of change
📚 Documentation preview 📚: https://pytensor--1236.org.readthedocs.build/en/1236/