Skip to content

feat: trainer resume_from_checkpoint support hub downloads (#43375)#45067

Open
aarushisingh04 wants to merge 2 commits intohuggingface:mainfrom
aarushisingh04:feature/resume-from-hub-checkpoint
Open

feat: trainer resume_from_checkpoint support hub downloads (#43375)#45067
aarushisingh04 wants to merge 2 commits intohuggingface:mainfrom
aarushisingh04:feature/resume-from-hub-checkpoint

Conversation

@aarushisingh04
Copy link
Copy Markdown
Contributor

@aarushisingh04 aarushisingh04 commented Mar 27, 2026

what does this PR do?

this pr enables trainer.train(resume_from_checkpoint=...) to accept hugging face hub repository ids.

instead of only local paths, users can now pass user/repo@revision and the trainer will automatically download the checkpoint using snapshot_download and resume training from it. this is particularly useful for preemptible cloud training where checkpoints are automatically pushed to the hub.

fixes #43375

code agent policy

  • I confirm that this is not a pure code agent PR.

before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline, Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the documentation guidelines, and here are tips on formatting docstrings.
  • Did you write any new necessary tests?

who can review?

@SunMarc

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: Support resume_from_checkpoint for checkpoints stored on Hugging Face Hub

1 participant