-
Notifications
You must be signed in to change notification settings - Fork 439
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
PyTorchFileRecord print debug option #1425
PyTorchFileRecord print debug option #1425
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1425 +/- ##
==========================================
- Coverage 85.67% 85.67% -0.01%
==========================================
Files 637 637
Lines 70286 70320 +34
==========================================
+ Hits 60219 60248 +29
- Misses 10067 10072 +5 ☔ View full report in Codecov by Sentry. |
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.
Very useful feature! Would have helped when porting the resnet weights 😄
Overall LGTM! Just one minor request and two comments/questions.
println!("Dtype: {dtype:?}"); | ||
println!("---"); | ||
} | ||
println!("End of debug information."); |
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.
I don't think we need to indicate the end of the debug info with a sentence. The separators should be enough, no? :)
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.
I removed it. It was mostly to signal there are no keys. I guess we can imply it here.
@@ -135,6 +140,12 @@ impl LoadArgs { | |||
self.top_level_key = Some(key.into()); | |||
self | |||
} | |||
|
|||
/// Sets printing debug information on. | |||
pub fn with_debug_on(mut self) -> Self { |
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.
with_debug_on
sounds weird. What do you think of with_debug_info
instead?
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.
`with_print_debug' maybe?
Pull Request Template
Checklist
run-checks all
script has been executed.Related Issues/PRs
Fixes #1416
Changes
.with_debug_print()
to PyTorchRecorder argsTesting
Added to the unit test and checked the output: