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

Do not copy local checkpoint #630

Merged
merged 2 commits into from
Jun 14, 2024
Merged

Do not copy local checkpoint #630

merged 2 commits into from
Jun 14, 2024

Conversation

dacorvo
Copy link
Collaborator

@dacorvo dacorvo commented Jun 13, 2024

What does this PR do?

This avoids a redundant copy when a model is exported from a local path. This is made possible by the fact that we don;t need to split the model weights anymore.

dacorvo added 2 commits June 13, 2024 11:19
If the model_id of an exported model corresponds to a local dir, we
don;t need to create the checkpoint directory.
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

"auto_cast_type": auto_cast_type,
}
if local:
with TemporaryDirectory() as model_path:
Copy link
Member

Choose a reason for hiding this comment

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

I recently discovered the tmpdir pytest that can be useful as well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Indeed, thanks ! I can't use it here because I only need it if local=true

@dacorvo dacorvo merged commit c21ed7a into main Jun 14, 2024
11 checks passed
@dacorvo dacorvo deleted the do_not_copy_local_checkpoint branch June 14, 2024 12:39
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