Run Vertex Batch annotation

Vertex Batch sends prompt requests from the driver to a hosted Gemini batch job. Spark workers never receive provider credentials. The result is a dense, immutable annotation overlay: every source record has a success, skipped, or failed row, published separately from the IQ collection.

Model eligibility depends on both model and location. A direct Gemini model can still be rejected for batch. Never use Gemini 2.5. Re-list current models, then qualify a candidate with this one-record path before a Dataproc run.

Create probe/config.yaml after generating a one-record probe-input.sds:

Static Transcript — not runnable

Audit pending; do not treat this block as a runnable example.

dataset_uri: ./probe-input.sds
annotation_set: eligibility_probe
publication_id: eligibility_probe_v1
template_id: scene_report.declared.v1
annotator: rfgen.annotation.reference.scene_report:SceneReportAnnotator
run_id: eligibility_probe
model: gemini-3.5-flash-lite
records_per_shard: 1
inference:
  schema_version: 1
  backend: vertex_batch
  provider: gemini
  endpoints: []
  concurrency: 1
  vertex:
    schema_version: 1
    project: YOUR_PROJECT
    location: global
    staging_uri: gs://YOUR_BUCKET/rfgen-annotation
    run_id: eligibility_probe
    poll_interval_s: 5
    timeout_s: 900

Run from an identity with Vertex Batch create/get/cancel and create-only GCS access:

Static Transcript — not runnable

Audit pending; do not treat this block as a runnable example.

rfgen annotate submit --config-dir ./probe --config-name config

Acceptance means Vertex creates the job and the command publishes exactly one successful row. MODEL_NOT_SUPPORTED_FOR_BATCH rejects the model/location pair. A second run needs fresh run, publication, set, and staging names because all objects are create-only. Provider failure, timeout, missing response keys, or invalid output exits nonzero and publishes no partial set.

For the full submission, replace the dataset, identity, model, and publication names with qualified production values and run the same command on the driver. It uploads keyed JSONL, polls, joins by record ID, validates output, and publishes atomically. Credentials use Application Default Credentials and are never serialized. The synchronous CLI does not resume an interrupted process; cancel an orphan using the emitted Vertex job name, then create a fresh run. The CLI’s row count and status totals are the observable success result.