Skip to content
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 gemini support for batch mode #369

Open
aashay-sarvam opened this issue Jan 16, 2025 · 2 comments
Open

Add gemini support for batch mode #369

aashay-sarvam opened this issue Jan 16, 2025 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@aashay-sarvam
Copy link

Support gemini with batch -
https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/batch-prediction-api#generative-ai-batch-text-

@RyanMarten
Copy link
Contributor

RyanMarten commented Jan 16, 2025

Related:

@aashay-sarvam Thanks for the suggestion :) We welcome contributions - if you are interested in implementing this in a PR, I can give some pointers in the code where to start (should be easy with the abstractions we have for the batch request processor).

Based on the examples above, it looks like Google has an existing python API for this that we can leverage from vertexai.batch_prediction import BatchPredictionJob

submit:

job = BatchPredictionJob.submit(source_model=MODEL_ID, input_dataset=INPUT_DATA,output_uri_prefix=BUCKET_URI`)

poll:

job.has_ended
job.has_succeeded

delete:

job.delete()

upload (and deletion) of batch file and download of batch results with from google.cloud import storage

@RyanMarten RyanMarten added the enhancement New feature or request label Jan 16, 2025
@adamoptimizer adamoptimizer self-assigned this Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants