-
Notifications
You must be signed in to change notification settings - Fork 21
feat(fetch): add Dragonfly integration for accelerated blob downloads #392
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: chlins <chlins.zhang@gmail.com>
Summary of ChangesHello @chlins, 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 significantly upgrades the artifact fetching capabilities by integrating Dragonfly, a P2P-based file distribution system. It enables users to leverage a specified Dragonfly gRPC endpoint for highly efficient and accelerated downloads of model artifacts, supporting selective layer fetching based on patterns and providing detailed progress feedback. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. 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
|
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 a valuable feature by integrating Dragonfly for accelerated blob downloads. The implementation is well-structured, separating the Dragonfly-specific logic and providing a clear path for its use via a new command-line flag. The use of concurrent processing and progress reporting is also well-handled.
I've identified a few areas for improvement. The most critical is the use of an insecure gRPC connection to Dragonfly, which should be addressed to ensure security in production environments. Additionally, there are opportunities to improve code maintainability by refactoring duplicated logic for layer filtering and annotation handling. I've also noted the use of a deprecated gRPC function and a minor inconsistency in an error message.
Overall, this is a strong contribution. Addressing the feedback will enhance the robustness, security, and maintainability of the new functionality.
gaius-qi
left a comment
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.
LGTM
aftersnow
left a comment
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.
lgtm
imeoer
left a comment
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.
lgtm
This pull request introduces support for fetching model artifacts using Dragonfly via a gRPC endpoint, along with related configuration and implementation changes. The main goal is to allow users to specify a Dragonfly endpoint for efficient blob downloading and hardlinking, with pattern-based selection of layers. The changes also add progress reporting and extend the fetch configuration options.
Dragonfly integration for fetch operations:
dragonfly-endpointflag to the fetch command, enabling users to specify a Dragonfly gRPC endpoint for pulling and hardlinking blobs. (cmd/fetch.go)pkg/backend/fetch.go)pkg/backend/fetch_by_d7y.go)Configuration enhancements:
Fetchstruct to includeDragonflyEndpoint,ProgressWriter,DisableProgress, andHooksfields, and set sensible defaults inNewFetch(). (pkg/config/fetch.go) [1] [2]pkg/config/fetch.goto support new features such as progress writing.