-
Notifications
You must be signed in to change notification settings - Fork 57
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
Add support for resumable downloads; clean up ingest directory; add --concurrency
flag
#408
Commits on Jul 16, 2024
-
Implement our own PullModel function to control how storage is used
Add basic implementation for PullModel, which pulls a modelkit from a remote reference. This is basically equivalent to the Copy() utility function in the oras library, which uses Fetch() and Push(); however, this base allows us control over how files are saved and enables implementing better cleanup and resumable downloads.
Configuration menu - View commit details
-
Copy full SHA for c183bac - Browse repository at this point
Copy the full SHA c183bacView commit details -
Implement resumable downloads when pulling modelkits
If a remote response with Accept-Ranges: "bytes", treat downloads as resumable. In this case: * Temporary ingest file is saved with the digest name in ingest directory * If a file already exists, seek to the end of it and seek to that point in the download * If a download is cancelled or encounters an error, the ingest file is not removed To avoid excessive slowdown, instead of seeking to the end of the file, we read it into a digester to resume calculating the digest of the downloaded data at the same time.
Configuration menu - View commit details
-
Copy full SHA for 07a1f49 - Browse repository at this point
Copy the full SHA 07a1f49View commit details -
Clean up ingest directory on successful pull
If a pull is cancelled via signal (instead of an error), the ingest file will not be cleaned up. To avoid accrual of partially-downloaded ingest files (generated by the non-resumable download case), clear the ingest directory on every successful pull. This may remove a partially-completed resumable download, but this should only occur if the user downloads some _other_ modelkit before attempting to resume the download.
Configuration menu - View commit details
-
Copy full SHA for 489754c - Browse repository at this point
Copy the full SHA 489754cView commit details -
Reimplement progress bars for pull
Since we're no longer using a basic copy operation, we need to redo progress bars for pull from scratch.
Configuration menu - View commit details
-
Copy full SHA for 9ee2125 - Browse repository at this point
Copy the full SHA 9ee2125View commit details -
Configuration menu - View commit details
-
Copy full SHA for f24d855 - Browse repository at this point
Copy the full SHA f24d855View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5fb7687 - Browse repository at this point
Copy the full SHA 5fb7687View commit details -
Add --concurrency flag for push and pull
Add flag --concurrency to allow configuring maximum number of simultaneous uploads/downloads. Default value is 5.
Configuration menu - View commit details
-
Copy full SHA for 0ed0ff7 - Browse repository at this point
Copy the full SHA 0ed0ff7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2a3e41b - Browse repository at this point
Copy the full SHA 2a3e41bView commit details -
Configuration menu - View commit details
-
Copy full SHA for cc597dc - Browse repository at this point
Copy the full SHA cc597dcView commit details