Add image embedding support to ml/rag#37628
Conversation
Summary of ChangesHello @claudevdm, 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 enhances Apache Beam's RAG capabilities by integrating robust support for image embeddings. It introduces the necessary infrastructure to process and embed image content using popular ML frameworks like HuggingFace and Vertex AI, alongside existing text embedding functionalities. The changes streamline the handling of multimodal data within the RAG pipeline, from data representation to ingestion into various vector databases, thereby broadening the scope of applications that can leverage Beam for advanced retrieval augmented generation. 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. Changelog
Activity
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
|
|
/gemini review |
There was a problem hiding this comment.
Code Review
The pull request successfully introduces support for image embeddings in the RAG pipeline, covering both HuggingFace and Vertex AI implementations. It correctly updates the core types and ingestion logic to handle multimodal content. The main areas for improvement are ensuring robust handling of GCS URIs when loading images and minor cleanup of error messages and docstrings.
|
R: @damccorm |
|
Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment |
damccorm
left a comment
There was a problem hiding this comment.
This generally LGTM, just had one question
damccorm
left a comment
There was a problem hiding this comment.
LGTM once checks complete
|
It's likely breaking XVR tests #30601 #30602 #31418 given Beam 2.72.0 branch is good and this is the only commit at first breakage https://github.com/apache/beam/actions/workflows/beam_PostCommit_XVR_Flink.yml?query= |
Responded on #30602 |
| 'numpy>=1.14.3,<2.5.0', # Update pyproject.toml as well. | ||
| 'objsize>=0.6.1,<0.8.0', | ||
| 'packaging>=22.0', | ||
| 'pillow', |
There was a problem hiding this comment.
I would suggest using an upper bound unless we don't expect breaking changes that can affect us in the future, see:
https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=290982440#DependencymanagementguidelinesforBeamPythonSDKmaintainers-Howtoaddanewdependency?
Please add a meaningful description for your change here
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, commentfixes #<ISSUE NUMBER>instead.CHANGES.mdwith noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.