Minimize Vertex AI Training Job Startup Time

You need to train an XGBoost model on a small dataset. Your training code requires custom dependencies. You want to minimize the startup time of your training job. How should you set up your Vertex AI custom training job?

  1. Store the data in a Cloud Storage bucket, and create a custom container with your training application. In your training application, read the data from Cloud Storage and train the model. Source Reference Answer
  2. Use the XGBoost prebuilt custom container. Create a Python source distribution that includes the data and installs the dependencies at runtime. In your training application, load the data into a pandas DataFrame and train the model.
  3. Create a custom container that includes the data. In your training application, load the data into a pandas DataFrame and train the model.
  4. Store the data in a Cloud Storage bucket, and use the XGBoost prebuilt custom container to run your training application. Create a Python source distribution that installs the dependencies at runtime. In your training application, read the data from Cloud Storage and train the model.

Community Votes

A
61%
C
22%
B
17%

61% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.

Community Insight

Pre-installing dependencies in a custom container avoids runtime installation delays

To minimize startup time for a Vertex AI custom training job with custom dependencies, use a custom container that pre-installs dependencies and stores data in Cloud Storage to keep the image size small.

Choosing Option C is a common mistake because bundling data inside the container increases image size and pull time

Community Discussion (9 comments)

guilhermebutzke 👍 5 Selected: A
My Answer: A Focus on “training code requires custom dependencies” and “ minimize the startup time of your training job”, the best choice is A because use custom container and read the data from GCS is he faster way
Foxy2021 👍 1
I select D: While A could work, D is the optimal solution because it balances efficiency, ease of setup, and performance. It minimizes startup time by leveraging Google’s prebuilt XGBoost container and offers flexibility by installing custom dependencies at runtime. This approach avoids the overhead of building and maintaining a custom container from scratch, which is unnecessary for a small dataset with only specific custom dependency needs.
wences 👍 1 Selected: A
The fastest way is to have most of the things already installed, so that is why option A fits the best
omribt 👍 3 Selected: C
The focus is on startup time, and the dataset is small, so the container should still be of reasonable size. Downloading data from Cloud Storage introduces a delay.
bobjr 👍 1 Selected: C
The dataset is small, xgboost is implemented in python... (correcting my error A answer)
bobjr 👍 1 Selected: A
The dataset is small, xgboost is implemented in python...
omermahgoub 👍 4 Selected: A
Given the focus on minimizing startup time, and based on the information about XGBoost prebuilt container dependencies available here https://cloud.google.com/vertex-ai/docs/training/pre-built-containers#xgboost A: Separate Data and Custom Container is the best approach for minimizing startup time, especially for small datasets. Separating data in Cloud Storage keeps the container image lean, leading to faster download and startup compared to bundling data within the container. B. The prebuilt Container could have unnecessary components, potentially increasing the image size and impacting startup time.
CHARLIE2108 👍 1
Why not C?
Yan_X 👍 3 Selected: B
B XGBoost prebuilt customer container already includes XGBoost library and all of its dependencies. Python source distribution to avoid overhead of reading the data from Cloud storage the 2nd time. Load data to a Pandas DataFrame is convenient to work with Python. Pandas is for data analysis and manipulation.

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Why the Answer Is Correct

Option A is correct because it addresses both constraints effectively. Using a custom container allows you to pre-install the specific custom dependencies required by your code, eliminating the time needed to download and install them during the job initialization. Storing the data in a Cloud Storage bucket ensures the container image remains lean and small; smaller images are pulled significantly faster by the Vertex AI service, directly reducing startup latency. For a small dataset, the time required to read data from GCS into memory is negligible compared to the time saved by not pulling a bloated container image.

Why the Other Options Are Wrong

Option C is incorrect because bundling data into the container image increases the image size. Large images take longer to pull, increasing startup time, and require rebuilding the image whenever the data changes. Options B and D are incorrect because they rely on installing dependencies at runtime via a Python source distribution. This installation process happens every time the job starts, adding significant overhead and delay compared to using a container where dependencies are already baked in.

Community Comment Notes

The community strongly supports Option A, with 61 votes. Comment [2] highlights that separating data keeps the container image lean, which is the key to minimizing startup time. Some users (Comment [3]) initially leaned towards Option C to avoid GCS read latency, but the consensus is that the overhead of pulling a larger image containing data outweighs the network latency of reading a small file from GCS. Comment [1] correctly identifies that the combination of custom dependencies (requiring a custom container) and the need for speed points directly to Option A.

Official Reference

Exam Strategy

When asked to minimize startup time, prioritize pre-building dependencies into the container image rather than installing them at runtime, and always keep data separate from the container to ensure fast image pulls.

Related Analysis

Practice All PMLE Questions

Access 65 questions with complete answers and detailed explanations.

View Full PMLE Practice Test →

← Back to PMLE Study Guide