Stay organized with collections
Save and categorize content based on your preferences.
TensorBoard time series metrics can be manually logged with a
Vertex AI Experiments run. These metrics are visualized in the
Vertex AI Experiments console, or in your Vertex AI TensorBoard
experiment web app.
experiment_name: Provide a name for your experiment.
run_name: Provide a run name.
metrics: Dictionary of where keys are metric names and values are metric
values.
step: Optional. Step index of this data point within the run.
wall_time: Optional. Wall clock timestamp when this data point
is generated by the end user. If not provided, wall_time is generated
based on the value from time.time().
project: . You can find these IDs in the Google Cloud console
welcome page.
location: Location of your experiment and TensorBoard instance.
If the experiment or TensorBoard don't already exist they will be created in this
location.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[],[],null,["# Manually log metrics with Vertex AI Experiments\n\nTensorBoard time series metrics can be manually logged with a\nVertex AI Experiments run. These metrics are visualized in the\nVertex AI Experiments console, or in your Vertex AI TensorBoard\nexperiment web app.\n\nFor more details on logging metrics and parameters, see\n[Manually log data to an experiment run](/vertex-ai/docs/experiments/log-data).\n\n### Python\n\n from typing import Dict, Optional\n\n from google.cloud import aiplatform\n from google.protobuf import timestamp_pb2\n\n\n def log_time_series_metrics_sample(\n experiment_name: str,\n run_name: str,\n metrics: Dict[str, float],\n step: Optional[int],\n wall_time: Optional[timestamp_pb2.Timestamp],\n project: str,\n location: str,\n ):\n aiplatform.init(experiment=experiment_name, project=project, location=location)\n\n aiplatform.start_run(run=run_name, resume=True)\n\n aiplatform.log_time_series_metrics(metrics=metrics, step=step, wall_time=wall_time)\n\n- `experiment_name`: Provide a name for your experiment.\n- `run_name`: Provide a run name.\n- `metrics`: Dictionary of where keys are metric names and values are metric values.\n- `step`: Optional. Step index of this data point within the run.\n- `wall_time`: Optional. Wall clock timestamp when this data point is generated by the end user. If not provided, `wall_time` is generated based on the value from `time.time()`.\n- `project`: . You can find these IDs in the Google Cloud console [welcome](https://console.cloud.google.com/welcome) page. \n- `location`: Location of your experiment and TensorBoard instance. If the experiment or TensorBoard don't already exist they will be created in this location."]]