-
Notifications
You must be signed in to change notification settings - Fork 68
Implement resumable downloads #408
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
Conversation
Signed-off-by: Eric Curtin <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pull request #408 has too many files changed.
The GitHub API will only let us fetch up to 300 changed files, and this pull request has 521.
|
@copilot fix the builds: failing checks |
Summary of ChangesHello @ericcurtin, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a significant enhancement by implementing resumable downloads for models. This feature ensures that if a download is interrupted, it can be seamlessly continued from the point of failure rather than restarting from scratch. The changes involve modifying the model pulling logic to detect incomplete layers, calculate appropriate resume offsets, and update the local storage to handle appending data to partial files, thereby improving the robustness and user experience of model fetching. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
@ericcurtin I've opened a new pull request, #409, to work on those changes. Once the pull request is ready, I'll request review from you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces resumable downloads, a valuable feature for improving the reliability of model pulling. The implementation works by checking for partially downloaded layers and using Range headers to resume. This is enabled by vendoring a forked version of go-containerregistry and modifying the local store to handle appending to incomplete files.
My review has identified a critical race condition in PullModel that could lead to data corruption, as well as high-severity issues concerning the handling of corrupted partial downloads and insecure file permissions. I've also included a medium-severity comment about potential disk space leaks from stale partial files and another about some unused code. Addressing these points will make the feature more robust and secure.
fd80bdd to
1a95c67
Compare
f306b03 to
33d0436
Compare
|
Hopefully this is a short-lived forked as we upstream the changes from: pkg/go-containerregistry/pkg/v1/remote/ |
94a100b to
8466142
Compare
|
Upstream version here: |
So if a download gets interrupted, we do not have to start again from scratch Signed-off-by: Eric Curtin <[email protected]>
8466142 to
97c3d66
Compare
So if a download gets interrupted, we do not have to start again from scratch