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

fix peft ckpts not being pushed to hub #24578

Merged
merged 2 commits into from
Jun 29, 2023

Conversation

pacman100
Copy link
Contributor

What does this PR do?

  1. Currently, when ckpts are saved every save_steps and push_to_hub=True, PEFT ckpts aren't being pushed to hub.
    Reason:
    every save_steps , the ckpts are being written to local checkpoint-xx folders. Now, in the trainer's function _push_from_checkpoint , it will copy the model files from the latest ckpt folder checkpoint-xx to the output_dir which gets pushed to the Hub. Note that the modeling_files doesn't have ADAPTER_WEIGHTS_NAME or ADAPTER_SAFE_WEIGHTS_NAME or ADAPTER_CONFIG_NAME leading to them not being pushed.

This PR fixes it.

cc @younesbelkada

@pacman100 pacman100 requested a review from sgugger June 29, 2023 14:44
Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jun 29, 2023

The documentation is not available anymore as the PR was closed or merged.

@pacman100 pacman100 merged commit 9e28750 into main Jun 29, 2023
4 checks passed
@pacman100 pacman100 deleted the smangrul/trainer-peft-push-to-hub branch June 29, 2023 18:37
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.

3 participants