Skip to content

Evaluation_service / Model_armor notebook fixes - #129

Merged
maabel0712 merged 9 commits into
GoogleCloudPlatform:mainfrom
acsharma1:d6-as-model_armor_lab-patch1
Nov 6, 2026
Merged

maabel0712 merged 9 commits into
GoogleCloudPlatform:mainfrom
acsharma1:d6-as-model_armor_lab-patch1

Conversation

@acsharma1

@acsharma1 acsharma1 commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Changes:

  • Switched to the preview evaluation SDK: EvalTask, MetricPromptTemplateExamples and AutoraterConfig now come from vertexai.preview.evaluation.
  • Set the autorater to gemini-2.5-flash in the lab region: the notebook now calls vertexai.init(project=PROJECT_ID, location=LOCATION). The default autorater, gemini-3.5-flash, isn't available in the lab regions and returned 404s. Org policy blocks switching regions.
  • Fixed the reversed prompt check in "Run a Chat": Swapped the if/else branches so flagged prompts get "Invalid Request" and safe ones go to generate_answer(). The check now uses modelarmor_v1.FilterMatchState.MATCH_FOUND instead of 2.

@google-cla

google-cla Bot commented Nov 6, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@acsharma1 acsharma1 changed the title Model Armor Lab Python fixes Evaluate / Model Armor - Python fixes Nov 6, 2026
@acsharma1 acsharma1 changed the title Evaluate / Model Armor - Python fixes Evaluate / Model Armor.ipynb fixes Nov 6, 2026
@acsharma1 acsharma1 changed the title Evaluate / Model Armor.ipynb fixes Evaluation_service / Model_armor notebook fixes Nov 6, 2026
@maabel0712
maabel0712 merged commit 9c8e4fa into GoogleCloudPlatform:main Nov 6, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants