feat(evalbench): add native Agent Runtime generator support and deployment guide - #535
feat(evalbench): add native Agent Runtime generator support and deployment guide#535arieljassan wants to merge 5 commits into
Conversation
|
/gcbrun |
IsmailMehdi
left a comment
There was a problem hiding this comment.
Nice addition — the generator is clean and factoring the stream parsing into standalone helpers makes it genuinely testable. I ran the new tests locally (make proto + CI PYTHONPATH) and all 8 pass.
Flagging three things I think block a merge. Details inline.
_extract_sqldoesn't handle```sqlfenced blocks — which is the exact format the accompanying notebook instructs the agent to emit.- The committed run config points at a dataset file and a scorer script that don't exist in the repo.
- The config templates hardcode a personal sandbox project and a live Agent Engine resource ID.
I have a few non-blocking notes too (env var names diverging from util.gcp, the blanket except Exception defeating rate_limit retries, google-cloud-aiplatform not being a declared dependency, and the same ["dialect"] KeyError still present at interactsqlexecwork.py:113) — happy to write those up separately if useful.
|
Thanks for your thorough review and the non-blocking comments. I've addressed all of them in the latest commit:
|
- Fix SQL extractor logic to correctly parse queries inside markdown fences - Add robust unit tests covering different fenced and raw outputs - Use !ENV interpolation for project/resource names in configs - Align environment variable helpers and fix rate limiting propagation - Declare google-cloud-aiplatform dependency and fix KeyError in interactsqlexecwork.py
51c332b to
78a03fb
Compare
|
/gcbrun |
IsmailMehdi
left a comment
There was a problem hiding this comment.
Two blockers in the deployment notebook — both make the documented end-to-end flow fail as written. Details inline.
…s, and environment setup - Replace private agentplatform imports with public vertexai native SDK APIs - Install pyaml_env globally in Colab and use it to resolve !ENV YAML tags during config parsing - Export EVAL_GCP_PROJECT_ID and EVAL_GCP_PROJECT_REGION to environment for subprocesses - Use built-in set_match and exact_match scorers instead of the missing sqlite_exact_match.py script - Enable csv reporting in the temporary run config so results are written to disk - Update agent instructions to output SQLite SQL instead of BigQuery SQL
Summary
This PR adds native support for evaluating SQL-generating agents deployed to Agent Runtime (Gemini Enterprise Agent Platform) inside the
evalbenchpipeline. It allows developers to deploy their ADK agents and run full evaluations (correctness and execution scoring) directly against the remote live endpoints.Key changes
AgentRuntimeGenerator(evalbench/generators/models/agent_runtime.py) which manages client authentication and queries remote Reasoning Engine endpoints using the AI Platform SDK."agent_runtime"model key in the generator factory (evalbench/generators/models/__init__.py).evalbench/work/sqlexecwork.pyto use safe dict retrieval (self.experiment_config.get("dialect")instead ofself.experiment_config["dialect"]). This preventsKeyErrorrunner crashes on configs using list-based dialects (such as BIRD SQLite configs).docs/examples/agent_runtime_deployment.ipynb— a step-by-step Colab-friendly notebook explaining how to define, deploy, test, and evaluate a minimal ADK agent against the BIRD dataset.datasets/model_configs/agent_runtime.yamlanddatasets/bird/test_agent_runtime_run_config.yamlto run pipeline evaluations.evalbench/test/agent_runtime_test.pycovering client authorization setup, remote request payloads, parameters parsing, and response envelope extraction (raw SQL strings vs. JSON envelopes).