Vertex AI Experiments: track and compare training runs and metrics

domain: ml-ops · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Install/upgrade the SDK (pip install 'google-cloud-aiplatform') and initialize it with an experiment name: from google.cloud import aiplatform; aiplatform.init(project=PROJECT_ID, location=REGION, experiment="my-experiment") — this creates the Experiment if it doesn't exist yet, acting as the logical container that groups your runs and artifacts.
  2. Start a run before training: aiplatform.start_run(RUN_NAME) (add resume=True to reopen an existing run) — each run represents one execution/path (e.g. one hyperparameter combination) within the experiment.
  3. Log configuration up front with aiplatform.log_params({"learning_rate": 0.01, "dropout_rate": 0.2, ...}) so each run's hyperparameters are recorded as key-value pairs.
  4. Log results: use aiplatform.log_metrics({...}) for single summary/scalar values recorded once at the end of a run, or aiplatform.log_time_series_metrics(metrics={...}, step=...) to log metrics that evolve over training steps/epochs (backed by a Vertex AI TensorBoard instance for time-series storage/visualization).
  5. For supported ML frameworks (e.g. Keras, PyTorch Lightning, Scikit-learn, XGBoost, LightGBM, and others), you can skip manual logging and instead enable autologging so parameters and metrics are captured automatically during training.
  6. Compare runs either in the Google Cloud console's Experiments UI, or programmatically with aiplatform.get_experiment_df("my-experiment"), which returns a pandas DataFrame of all runs with their parameters, metrics, and state for side-by-side comparison/filtering.

Known gotchas

Related routes

Vertex AI: create and query an online prediction endpoint
cloud.google.com/vertex-ai/docs · 6 steps · unrated
MLflow tracking: log runs and metrics
mlflow.org/docs · 6 steps · unrated
Schedule Vertex AI Pipelines (KFP) runs
cloud.google.com · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans