-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
feat(dowloader): resume partial downloads #4537
Conversation
Signed-off-by: Saarthak Verma <[email protected]>
Signed-off-by: Saarthak Verma <[email protected]>
Signed-off-by: Saarthak Verma <[email protected]>
… transfers - Adds support for resuming partially downloaded files - Uses HTTP Range header to continue from last byte position - Maintains download progress across interruptions - Preserves partial downloads with .partial extension - Validates SHA256 checksum after completion Signed-off-by: Saarthak Verma <[email protected]>
resume_download
✅ Deploy Preview for localai ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Signed-off-by: Saarthak Verma <[email protected]>
Hi @mudler, can you have a look at this PR and the notes for reviewers section. |
Sure! will try to review today, thanks for the PR. |
I think we probably should - mainly because otherwise if a web server does not support it we leave a dangling
In this case it should use the same underlying download function, so partial files would be recovered as well by this changeset, or am I missing anything? the changeset looks good to me. My only open point is about detecting if a webserver doesn't support streaming files from a certain point, otherwise we should find another way to remove the |
Yes, there will be the issue with dangling
There is a scenario that might pose a problem, though I do not know how common it would be. But here lies the issue that the |
Cool, that actually looks a sane approach
Gotcha, however it would be similar to the case if there is another failure (e.g. the server returns a 500) and not strictly related to the changes introduced in this PR. I don't think should be part of this PR as well but rather be a follow-up to fix these behaviors - in the worse case there would be a file dangling (with the correct checksums), which would pass checks if the user would try to re-install the model (and deleting it), but that was the case before your changes. |
Hi, thanks for your feedback and sorry for the delayed response.
Understood! I'll work on implementing the server check. Thanks! |
Signed-off-by: Saarthak Verma <[email protected]>
Signed-off-by: Saarthak Verma <[email protected]>
Hi I've implemented the server check and a test for the same. Thanks! |
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.
Looking good here, thanks @Saavrm26 !
Thanks for the review, looking to contribute in other areas of the repository! |
Description
This PR adds support for resuming partial downloads.
Notes for Reviewers
A few questions:
Related to: #2156
Signed commits