-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Sanitize profile filename #21395
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
base: master
Are you sure you want to change the base?
Sanitize profile filename #21395
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #21395 +/- ##
=========================================
- Coverage 87% 79% -8%
=========================================
Files 269 266 -3
Lines 23804 23757 -47
=========================================
- Hits 20626 18732 -1894
- Misses 3178 5025 +1847 |
| action_name: Optional[str] = None, | ||
| extension: str = ".txt", | ||
| split_token: str = "-", # noqa: S107 | ||
| sanitize: bool = True, |
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.
This looks like an internal flag, and it’s unclear how a user is meant to turn it off.
We should either sanitize unconditionally or treat this as a proper configuration option: pass it through the constructor and store it as an instance attribute so it can be used consistently later.
What does this PR do?
Fixes #21365
Make sure that filenames are sanitized when profiler is trying to dump
.proffiles.This will currently crash if there are characters such as "/" in the filename, which happens if the user has a
ModelCheckpointwith a monitoring metric like"val/acc".Before submitting
PR review
Anyone in the community is welcome to review the PR.
Before you start reviewing, make sure you have read the review guidelines. In short, see the following bullet-list:
Reviewer checklist
📚 Documentation preview 📚: https://pytorch-lightning--21395.org.readthedocs.build/en/21395/