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).
✅ 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 1195 uploads less than BASE
Flag BASE (79ffe50) HEAD (ab7d8fb)
cpu 299 30
lightning_fabric 75 0
pytest 150 0
python3.12 89 9
python3.12.7 90 9
lightning 150 15
python3.11 60 6
python3.10 30 3
python 30 3
pytorch2.1 30 6
pytest-full 149 30
pytorch_lightning 74 15
pytorch2.6 15 3
pytorch2.4.1 15 3
pytorch2.3 15 3
pytorch2.2.2 15 3
pytorch2.5.1 15 3
pytorch2.9 15 3
pytorch2.7 15 3
pytorch2.8 14 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 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

1 participant