refactor(alloydb): migrate batch processing notebook to genai SDK - #14537
Draft
XrossFox wants to merge 2 commits into
Draft
refactor(alloydb): migrate batch processing notebook to genai SDK#14537XrossFox wants to merge 2 commits into
XrossFox wants to merge 2 commits into
Conversation
Updates snippets in the `embeddings_batch_processing.ipynb` notebook to use the newer `google-genai` SDK.
Contributor
There was a problem hiding this comment.
Code Review
This pull request migrates the embedding batch processing notebook from the legacy vertexai SDK to the new google-genai SDK. The changes include updating dependencies, initializing a shared genai.Client, and refactoring the asynchronous embedding generation to use client.aio.models.embed_content. A potential runtime issue was identified where fallback logic references a non-existent embedding attribute on the response object, which could raise an AttributeError if embeddings is falsy.
Kef131
reviewed
Aug 25, 2026
| " ...\n", | ||
| " ]\n", | ||
| " where col1 and col2 are columns containing data to be embedded.\n", | ||
| " Raises:\n", |
Contributor
There was a problem hiding this comment.
Is this Raises still required due the line raise e 879
Contributor
Author
There was a problem hiding this comment.
Sure, i'll add it back.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Updates snippets in the
embeddings_batch_processing.ipynbnotebook to use the newergoogle-genaiSDK.Fixes b/540948497
Checklist
Testing
Compliance & Style
Post-Approval Actions
Tested locally: