Logging Experiment Artifacts and Loss Metrics in Vertex AI
Short answer
C Create a Vertex AI TensorBoard instance, associate it with an SDK-created experiment, then use assign_input_artifacts for the preprocessed time series and log_time_series_metrics for loss.
Question
track artifacts from each run. How should you set up your experiments?
Key Takeaways
The test separates artifact lineage (assign_input_artifacts) from time-series metric logging (log_time_series_metrics), and requires knowing that Vertex needs an associated TensorBoard instance before time-series metrics can be recorded.
This PMLE question tests how to log run artifacts and training curves in Vertex AI Experiments. The correct setup is option C: create and associate a Vertex AI TensorBoard instance, track the preprocessed time series with assign_input_artifacts, and log loss with log_time_series_metrics.
Common mistake: Option B is the most tempting wrong answer: it correctly creates the experiment and ML Metadata, but it wrongly uses log_time_series_metrics to 'track the preprocessed data' — data lineage must be recorded as an input artifact, and the option omits the required TensorBoard instance.
Expert Analysis
What the run must record The scenario is classic Vertex AI experimentation: you are iterating on preprocessing steps and model architectures inside a Vertex AI Workbench notebook, and each try (a run) must capture two distinct things — (1) the preprocessed time-series dataset that run consumed, and (2) the scalar loss trajectory produced during training. These map to two different Vertex APIs, so the correct option has to name the right method for each.
Setting up the experiment
aiplatform.init plus aiplatform.Experiment.create (or the SDK experiment APIs) groups runs and wires up Vertex ML Metadata, which stores the lineage of artifacts and executions. That half is shared by options A and B, but neither goes further — they never create the TensorBoard backing store that Vertex needs for time-series data.
Why preprocessed data is an artifact, not a metric
The preprocessed dataset is an input artifact of the training execution. You register it with assign_input_artifacts, which links the artifact to the execution and builds lineage. log_time_series_metrics cannot represent a dataset; it streams numeric series to a TensorBoard instance. So options A and B misassign the preprocessed data to a metrics function, and option D drops artifact tracking entirely.
Why loss needs TensorBoard
Scalar metrics such as loss are logged per step with log_metrics, but Vertex requires an associated TensorBoard instance before time-series metrics are recorded — a point echoed in the community notes that log_time_series_metrics "requires setting Tensorboard". Option C correctly (a) creates a Vertex AI TensorBoard instance and associates it with the experiment, (b) logs loss with log_time_series_metrics for the step-wise curve, and (c) tracks the preprocessed data with assign_input_artifacts. Option A also contains the misspelled log_merrics, which is not a real API.
Verdict Option C is the only combination that correctly pairs artifact lineage for the preprocessed time series with TensorBoard-backed time-series logging for the loss curve.
Official Reference
- https://cloud.google.com/vertex-ai/docs/experiments/log-data
- https://cloud.google.com/python/docs/reference/aiplatform/latest/google.cloud.aiplatform.Execution
These links open the official vendor documentation in a new tab.
Exam Strategy
When an option names Vertex AI APIs, verify each function's actual purpose before judging the whole sequence: lineage/artifact methods (assign_input_artifacts) handle data, while metrics functions handle numbers. Also remember that Vertex AI requires an associated TensorBoard instance for time-series metric logging — if an option omits it while calling log_time_series_metrics, treat that as a red flag. Finally, scan for misspelled API names such as 'log_merrics'; a typo in a method name is a quick elimination signal in these questions.
Frequently Asked Questions
Why does the preprocessed time-series data need assign_input_artifacts instead of a metrics function?
Do I need a TensorBoard instance to log loss with log_time_series_metrics?
What is the difference between log_metrics and log_time_series_metrics in Vertex AI Experiments?
Community Votes
50% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 12 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 12
-
gscharly 👍 9 Answered Clog_time_series_metrics requires setting Tensorboard: https://cloud.google.com/vertex-ai/docs/experiments/log-data assign_input_artifacts can be used to track input data: https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/official/experiments/get_started_with_vertex_experiments.ipynb
-
fitri001 👍 5 Answered BVertex AI Experiment and ML Metadata: This is the foundation for tracking experiments and artifacts within Vertex AI.expand_more Creating an experiment allows you to group related runs and log data associated with those runs. ML Metadata helps manage the lineage of data and models used in your experiments.expand_more Logging Data: log_time_series_metrics: This function is specifically designed for tracking time-series data, making it suitable for logging the preprocessed multivariate time series data in your experiment. log_metrics: This function is appropriate for logging loss values during model training. It can handle numerical values like loss efficiently. By combining these techniques, you can effectively track both the preprocessed data (time series) and the training performance metrics (loss values) within your Vertex AI Experiment.
-
omermahgoub 👍 3 Answered BWhy B? 1. Experiment Creation: Vertex AI SDK establishes a context for grouping your training runs and facilitates experiment management. 2. By setting up Vertex ML Metadata (only can be done when creating an experiment with the Vertex AI SDK), you enable tracking of artifacts and metrics associated with each experiment run. 3. log_time_series_metrics function is well-suited for tracking the preprocessed multivariate time series data associated with each experiment run. This allows you to analyze how preprocessing impacts model performance.
-
fitri001 👍 3Option A: It lacks the functionality to log preprocessed data (no log_time_series_metrics). Option C and D: While TensorBoard can be used for visualization, it's not directly related to logging data within Vertex AI Experiments. pen_spark exclamation Additionally, assign_input_artifact isn't the correct method for logging time series data
-
tungdeptraiqua 👍 3 Answered BA and B are the same
Show 7 more comments
-
guilhermebutzke 👍 2 Answered CMy Answer: C assign_input_artifact method is a method to Vertex Ai Experiment to track the preprocessed data while log_time_series_metrics is a function of Vertex AI TensorBoard to log metrics along time. look: https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/official/experiments/build_model_experimentation_lineage_with_prebuild_code.ipynb https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/official/experiments/comparing_local_trained_models.ipynb
-
b1a8fae 👍 2 Answered CC. Tensorboard for experimentation and comparison of different model runs. assign_input_artifacts to track preprocessed data, since it links artifacts as inputs to the execution. https://cloud.google.com/python/docs/reference/aiplatform/latest/google.cloud.aiplatform.Execution#google_cloud_aiplatform_Execution_assign_input_artifacts Using log_time_series_metrics would make sense if what we were doing is logging a metric, which we aren't when we track the preprocessed data not yet ran by the model.
-
Yan_X 👍 2 Answered BB The assign_input_artifacts method is used to associate input artifacts with an experiment, that is not used for log time series and labels. A and B is just with a minor typo (metric vs merric), so select B.
-
taylz876 👍 1 Answered CWhat the question is really asking You're trying different ways to preprocess the data and different models. For every try (called a run), you want to save two things: 1. The data that run used (the preprocessed data). 2. How well the run learned (the loss values while it trained). Then you can compare the runs later and see which one worked best. Why C is right, one piece at a time Think of it like a science lab: • Experiment (Vertex AI Experiments, now Agent Platform Experiments): the lab notebook. One experiment holds all your runs, so they stay organized in one place. • TensorBoard instance: a whiteboard that draws graphs. The loss graph during training needs this to display. You create it and link it to the experiment, so they work together. • assign_input_artifact: attaches the dataset to the run, like stapling the data sheet to that day's lab notes. It records which preprocessed data each run used, which is what "track artifacts" means. • log_time_series_metrics: records a number as it changes during training, one value per step or epoch. Loss is exactly this: it goes down as the model learns, so you log it over time and TensorBoard draws it as a curve. This is the function that needs the TensorBoard instance. So C gives each job the right tool: the data goes in as an artifact, and the loss goes in as a time series. Why the others are wrong • A and B: They use log_time_series_metrics to track the preprocessed data. That function is for numbers that change over time, not for a dataset. They also never set up TensorBoard, which that function needs, so it wouldn't work. A has a typo too (log_merrics). • D: It sets up TensorBoard correctly, but it makes the same mistake as A and B: log_time_series_metrics for the data, and log_metrics for the loss. log_metrics stores one summary number per run, so it can't make a loss curve.
-
rajshiv 👍 1In A, there's a typo in log_merrics (should be log_metrics). Therefore A is incorrect.
-
dija123 👍 1 Answered BAgree with B, No need for tensorBoard.
-
Dirtie_Sinkie 👍 1 Answered CC sounds more correct
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All PMLE Questions
Access 65 questions with complete answers and detailed explanations.
View Full PMLE Practice Test →