Skip to content

Conversation

siemdejong
Copy link
Contributor

@siemdejong siemdejong commented May 1, 2025

What does this PR do?

Cross-device transactions via fsspec (used for example in ModelCheckpoint) resulted in permission errors (#20270). The permission errors were caused by attempts to change file modes on different filesystem. This was fixed in fsspec 2025.5.0. This PR proposes to increase the minimum version to fsspec>=2025.5.0.

Fixes #20270

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--20780.org.readthedocs.build/en/20780/

Cross-device transactions via fsspec (used for example in
ModelCheckpoint) resulted in permission errors. The
permission errors were caused by attempts to change file modes on
different filesystem. This was fixed in fsspec 2025.3.3.

Closes #20270
@github-actions github-actions bot added fabric lightning.fabric.Fabric pl Generic label for PyTorch Lightning package dependencies Pull requests that update a dependency file labels May 1, 2025
@siemdejong siemdejong changed the title build(requirements): require fsspec 2025.3.3 Allow cross-device local checkpoints with fsspec>=2025.3.3 May 2, 2025
@siemdejong
Copy link
Contributor Author

siemdejong commented May 2, 2025

This PR is on hold pending the PyPI release of fsspec with a fix introduced in fsspec/filesystem_spec#1829.

@siemdejong siemdejong changed the title Allow cross-device local checkpoints with fsspec>=2025.3.3 Allow cross-device local checkpoints with fsspec>=2025.5.0 May 3, 2025
@siemdejong
Copy link
Contributor Author

siemdejong commented May 3, 2025

TODO

  • more descriptive changelog
  • add correct fsspec version to requirements

@siemdejong siemdejong marked this pull request as ready for review May 20, 2025 19:25
Copy link

codecov bot commented May 23, 2025

Codecov Report

❌ Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 87%. Comparing base (e15cd67) to head (b46dbf1).
⚠️ Report is 149 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #20780   +/-   ##
=======================================
- Coverage      87%      87%   -0%     
=======================================
  Files         268      268           
  Lines       23368    23373    +5     
=======================================
+ Hits        20330    20334    +4     
- Misses       3038     3039    +1     

@siemdejong siemdejong requested a review from Borda May 26, 2025 14:21
@Borda Borda merged commit a83fcef into Lightning-AI:master May 27, 2025
115 of 116 checks passed
Borda pushed a commit that referenced this pull request Jun 19, 2025
Cross-device transactions via fsspec (used for example in
ModelCheckpoint) resulted in permission errors. The
permission errors were caused by attempts to change file modes on
different filesystem. This was fixed in fsspec 2025.3.3.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
(cherry picked from commit a83fcef)
sudiptob2 pushed a commit to sudiptob2/pytorch-lightning that referenced this pull request Jun 27, 2025
…ng-AI#20780)

Cross-device transactions via fsspec (used for example in
ModelCheckpoint) resulted in permission errors. The
permission errors were caused by attempts to change file modes on
different filesystem. This was fixed in fsspec 2025.3.3.


---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file fabric lightning.fabric.Fabric pl Generic label for PyTorch Lightning package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

_atomic_save with transaction cause "Invalid cross-device link" error
2 participants