Skip to content

Recover from aborted or failed model downloads #358

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

Merged
merged 1 commit into from
Apr 21, 2024

Conversation

GregoryComer
Copy link
Member

Download model artifacts into a temporary directory (under .model-artifacts/download). Once download and conversion are complete, copy to the final location under .model-artifacts. This fixes an issue where the user could get "stuck" by having a partially downloaded model.

Test Plan:

# Recover from aborted download
rm -rf .model-artifacts/meta-llama/Meta-Llama-3-8B
python torchchat.py download llama3
(Abort via Ctrl-C partway through)
python torchchat.py generate llama3

# Test normal download path
rm -rf .model-artifacts/stories15M
python torchchat.py generate stories15M

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Apr 21, 2024
@GregoryComer GregoryComer marked this pull request as ready for review April 21, 2024 21:57
Copy link
Contributor

@mikekgfb mikekgfb 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!

@mikekgfb mikekgfb merged commit a3d1efc into pytorch:main Apr 21, 2024
@mikekgfb mikekgfb deleted the download-recovery branch April 21, 2024 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants