feat(genai/model_tuning) Migrate samples to genai/model_tuning using vertexai.language_models. - #14494
Draft
XrossFox wants to merge 3 commits into
Draft
Conversation
Refactored tests to wrok with new changes.
Contributor
Author
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces code examples and tests for evaluating and tuning Gemini models using the Vertex AI and Google GenAI SDKs. The feedback recommends updating the Nox configuration to include Python 3.13 in tests, increasing the backoff retry duration to handle rate limits during model evaluation, and wrapping the tuning test's cleanup logic in a try...finally block to prevent resource leaks on assertion failures.
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.


Refactored tests to wrok with new changes.
Description
This PR migrates model tuning examples to use the most up-to-date features from the
google-genaiandgoogle-cloud-aiplatformlibraries.
Changes:
pretrained_codegen_example.pydemonstrating supervised fine-tuning usinggoogle-genai.evaluate_model_example.pydemonstrating model evaluation usingvertexai.evaluation.pretrained_examples_test.pyandevaluate_model_example_test.py) with cleanup logic.noxfile_config.py,requirements.txt, andrequirements-test.txtfor the newgenai/model_tuningdirectory.
Fixes b/540948584
Checklist
Testing
Compliance & Style
Post-Approval Actions