Skip to content
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

Update checkpointing documentation to mark resume_from_checkpoint as deprecated (#20361) #20477

Merged

Conversation

WangYue0000
Copy link
Contributor

@WangYue0000 WangYue0000 commented Dec 9, 2024

This PR updates the checkpointing documentation to mark resume_from_checkpoint as deprecated
and provides examples of the recommended ckpt_path method in the Trainer.fit() function.

Changes made:

  • Added a warning box in the "Resume training state" section to discourage the use of resume_from_checkpoint.
  • Updated examples to reflect the correct usage of ckpt_path.
  • Ensured consistency across the documentation by replacing all occurrences of the deprecated parameter.

Fixes #20361.


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

@github-actions github-actions bot added docs Documentation related pl Generic label for PyTorch Lightning package labels Dec 9, 2024
@WangYue0000
Copy link
Contributor Author

@Borda @lantiga Hi!Could you please take a look at this PR when you get a chance? It updates the checkpointing documentation to address #20361. Thanks, hope my solution helps!

Copy link
Collaborator

@lantiga lantiga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution! I added a couple of comments

docs/source-pytorch/common/checkpointing_basic.rst Outdated Show resolved Hide resolved
docs/source-pytorch/common/checkpointing_basic.rst Outdated Show resolved Hide resolved
docs/source-pytorch/common/checkpointing_basic.rst Outdated Show resolved Hide resolved
@WangYue0000
Copy link
Contributor Author

@lantiga Thank you for the detailed feedback! I've addressed all your suggestions, including:

  • Updated terminology from "parameter" to "argument."
  • Added version details for the deprecation.
  • Moved the warning box to appear after the correct usage.
  • Improved the phrasing as per your recommendation.

Please let me know if there are any additional changes needed!

Copy link
Collaborator

@lantiga lantiga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thank you @WangYue0000 !

@lantiga lantiga merged commit 30545d6 into Lightning-AI:master Dec 10, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation related pl Generic label for PyTorch Lightning package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resume training from checkpoints
2 participants