Skip to content

Conversation

@SkafteNicki
Copy link
Collaborator

@SkafteNicki SkafteNicki commented Dec 1, 2025

What does this PR do?

Fixes #21365
Make sure that filenames are sanitized when profiler is trying to dump .prof files.
This will currently crash if there are characters such as "/" in the filename, which happens if the user has a ModelCheckpoint with a monitoring metric like "val/acc".

Before submitting
  • Was this discussed/agreed via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you list all the breaking changes introduced by this pull request?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)

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
  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

📚 Documentation preview 📚: https://pytorch-lightning--21395.org.readthedocs.build/en/21395/

@SkafteNicki SkafteNicki added the bug Something isn't working label Dec 1, 2025
@github-actions github-actions bot added the pl Generic label for PyTorch Lightning package label Dec 1, 2025
@codecov
Copy link

codecov bot commented Dec 1, 2025

Codecov Report

❌ Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 79%. Comparing base (79ffe50) to head (ab7d8fb).
⚠️ Report is 6 commits behind head on master.
✅ All tests successful. No failed tests found.

❗ There is a different number of reports uploaded between BASE (79ffe50) and HEAD (ab7d8fb). Click for more details.

HEAD has 3345 uploads less than BASE
Flag BASE (79ffe50) HEAD (ab7d8fb)
cpu 777 30
lightning_fabric 195 0
pytest 390 0
python3.12 233 9
python3.12.7 232 9
lightning 388 15
python3.11 156 6
python3.10 78 3
python 78 3
pytorch2.1 78 6
pytest-full 387 30
pytorch_lightning 194 15
pytorch2.6 39 3
pytorch2.4.1 38 3
pytorch2.3 39 3
pytorch2.2.2 39 3
pytorch2.5.1 38 3
pytorch2.9 39 3
pytorch2.7 39 3
pytorch2.8 38 3
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     

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working has conflicts pl Generic label for PyTorch Lightning package profiler

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't dump stats of AdvancedProfiler with ModelCheckpoint monitoring a variable with a slash (/) in it

3 participants