Bug Bash 2026-08: Make supervised tuning colab executable - #78
Conversation
| "BIGQUERY_TABLE_ID = 'cropped_observations_all' # @param {type:\"string\"}\n", | ||
| "QUERY_LIMIT = 10 # @param {type:\"integer\"}\n", | ||
| "ASSET_TYPE = \"ASSET_CLASS_UTILITY_POLE\" # @param {type:\"string\"}\n", | ||
| "MODEL = \"gemini-2.5-flash\" # @param {type:\"string\"}\n" |
There was a problem hiding this comment.
gemini-2.5-flash will be deprecated in October.
Can this be upgraded?
There was a problem hiding this comment.
FYI: I was able to get it to load with gemini-3.5-flash, but not gemini-3.6-flash
| "\n", | ||
| "# BigQuery Configuration\n", | ||
| "BIGQUERY_DATASET_ID = '' # @param {type:\"string\"}\n", | ||
| "BIGQUERY_TABLE_ID = 'cropped_observations_all' # @param {type:\"string\"}\n", |
There was a problem hiding this comment.
Does this notebook require data from all available historical snapshots?
Or is it sufficient to use cropped_observations_latest?
| "import os\n", | ||
| "\n", | ||
| "# 1. Define the base path and the training file name\n", | ||
| "BASE_URL = \"https://raw.githubusercontent.com/googlemaps-samples/insights-samples/feat/street-view-samples/street_view_insights/cropped/notebooks/Supervised%20fine%20tuning/data/\"\n", |
There was a problem hiding this comment.
Please construct this URL using parameters with these default values:
"GITHUB_REPOSITORY_NAME = 'googlemaps-samples/insights-samples' # @param {type:\"string\"}\n",
"GITHUB_BRANCH_NAME = 'main' # @param {type:\"string\"}\n"
See here for a comparative example.
This will allow you to test from your branch (with variable overrides), but then ensure it still works after your code is merged.
| "outputs": [], | ||
| "source": [ | ||
| "# Install the necessary library\n", | ||
| "!pip install --upgrade --user --quiet google-genai google-cloud-aiplatform\n", |
There was a problem hiding this comment.
P2: This package installation step should move to a separate cell near the top of the file.
| "id": "1-2-3-4-5" | ||
| }, | ||
| "source": [ | ||
| "## Setup\n", |
There was a problem hiding this comment.
Should this cell move earlier in the notebook?
| "# Provide a bucket name\n", | ||
| "BUCKET_NAME = \"\" # @param {type:\"string\"}\n", | ||
| "BUCKET_URI = f\"gs://{BUCKET_NAME}\"\n", | ||
| "# LOCATION = \"us\"\n", |
There was a problem hiding this comment.
- Uncomment
LOCATIONon line 112. - Change
--location {REGION}->--location {LOCATION}on line 115.
| " AND gcs_uri IS NOT NULL\n", | ||
| " GROUP BY\n", | ||
| " asset_id\n", | ||
| " LIMIT 100\n", |
There was a problem hiding this comment.
LIMIT 100 -> LIMIT {QUERY_LIMIT}
| "BIGQUERY_TABLE_ID = 'cropped_observations_all' # @param {type:\"string\"}\n", | ||
| "QUERY_LIMIT = 10 # @param {type:\"integer\"}\n", | ||
| "ASSET_TYPE = \"ASSET_CLASS_UTILITY_POLE\" # @param {type:\"string\"}\n", | ||
| "MODEL = \"gemini-2.5-flash\" # @param {type:\"string\"}\n" |
There was a problem hiding this comment.
FYI: I was able to get it to load with gemini-3.5-flash, but not gemini-3.6-flash
| }, | ||
| "outputs": [], | ||
| "source": [ | ||
| "# Provide a bucket name\n", |
There was a problem hiding this comment.
I got the following error when running with a bucket on my playground project:
400 FAILED_PRECONDITION. {'error': {'code': 400, 'message': 'Service account `[service-631865656917@gcp-sa-vertex-tune.iam.gserviceaccount.com](mailto:service-631865656917@gcp-sa-vertex-tune.iam.gserviceaccount.com)` does not have `[storage.objects.get]` IAM permission(s) to the file "gs://bijanv-geosptial-demos/data/acquity_detector_negative_examples_v2_clean.jsonl". Please either copy the files to the Google Cloud Storage bucket owned by your project, or grant the required IAM permission(s) to the service account.', 'status': 'FAILED_PRECONDITION'}}
Please add a Markdown cell above this indicating that the bucket in use my provide the above service agent (exclude the project ID) with roles/storage.objectViewer access
Summary of changes:
/Users/...) withwgetto dynamically download the training dataset directly from the GitHub repository.https://URLs from the training dataset, preventing Vertex AI fine-tuning jobs from failing.SELECTquery to use configuration variables instead of the hardcodedsarthaks-labproject andutility_pole_evaluationstable.asset_typeinstead oftype, and aggregating the singulargcs_uricolumn).vertexaiSDK to the newgoogle-genaiSDK.