Professional Machine Learning Engineer
When a hyperparameter tuning job finishes, Vertex AI provides a summary of all trials and the best hyperparameter configuration found. Each trial is one combination of hyperparameter values that the service tested. The results show the metric value for every trial, so you can see which hyperparameters had the biggest effect on model performance. You can retrieve these results from the Google Cloud console by navigating to the Pipelines page, selecting the Runs tab, and finding the tuning_result_output artifact inside the pipeline components. You can also load the results programmatically by using the API to read the tuning_result_output artifact URI from the pipeline job’s task details. The tuning results contain the optimal values and the metric values that explain why those values were chosen.
Hyperparameter tuning optimizes target metrics that you define, such as model accuracy, AUC ROC, or RMSE. The goal field tells Vertex AI whether to maximize or minimize each metric. When you have multiple objectives, you must analyze trade-offs. For example, a model optimized for accuracy might run slower, while a model optimized for low latency might be less accurate. Vertex AI supports objectives like AUC ROC, log loss, AUC PR, precision at recall, and recall at precision for classification, and RMSE, MAE, and RMSLE for regression. The search algorithm you choose affects how thoroughly the space is explored: the default Bayesian optimization uses Gaussian process bandits, grid search checks every combination in a discrete space, and random search covers the space without building a grid.
Vertex AI Pipelines lets you wrap hyperparameter tuning inside an automated ML workflow. The HyperparameterTuningJobRunOp component from the Google Cloud Pipeline Components SDK adds a tuning job to a Kubeflow Pipeline. The pipeline can handle data preparation, training, evaluation, and model registration as a single repeatable process. Your training code must accept hyperparameter values as command-line arguments and use the cloudml-hypertune Python package to report metrics back to Vertex AI. After the tuning job finishes, the pipeline can extract the best trial’s model artifacts and register them to the Model Registry.
Continuous optimization pipelines automate the whole lifecycle of model improvement. When you run hyperparameter tuning against similar models, Vertex AI can learn from previous jobs and make subsequent tuning more efficient. You configure a pipeline that triggers on a schedule, data changes, or performance metrics. The pipeline runs the tuning job, compares the new model against the current production model, and promotes the new model if it meets performance thresholds. You can also reuse results from a prior tuning run by specifying the stage_1_tuning_result_artifact_uri parameter, which skips the architecture search and reduces compute costs and training time.
Search model tuning optimizes information retrieval base models in Vertex AI Search by training them on domain-specific queries and relevance scores. You configure tuning inside an application data store using the Google Cloud console or by calling the trainCustomModel REST API method. The source data must be staged in Cloud Storage and includes a corpus JSONL file, a query JSONL file, a training labels TSV file, and an optional test labels TSV file. The request sets modelType to search-tuning and provides Cloud Storage URIs in the gcsTrainingInput object. Search tuning requires Enterprise edition features on the target application. If you supply a test labels file, it must have at least three unique query IDs paired with extractive segments and relevance scores; otherwise, the evaluation uses query-segment pairs from the training labels.
Regional location selection determines where model processing, training, and hyperparameter tuning operations run. Managed services such as BigQuery ML support built-in training, deep neural network training, hyperparameter tuning, and Vertex AI Model Registry integration across defined geographic regions. Choosing the right region aligns compute workloads with existing data repositories and satisfies residency constraints.
Hyperparameters are configuration variables that control the training process. They are different from model parameters, which are learned from data, and from input data itself. Examples include learning rate and number of layers. Hyperparameters are set before training and are tuned across multiple separate training runs, called trials. Automated hyperparameter tuning systematically explores values to find the best configuration.
Vertex AI hyperparameter tuning runs a series of trials, each one a full run of your training application with a specific set of hyperparameter values. The service tracks each trial’s performance through a target metric and uses that feedback to suggest better hyperparameter sets for later trials. Your training application must accept hyperparameter values as command-line arguments and use the cloudml-hypertune Python library to report the metric back to Vertex AI. This communication lets the service guide the search.
You define the search space in the StudySpec using ParameterSpec objects. Each specification gives the hyperparameter’s name, data type, and allowed range. Vertex AI supports four data types: DOUBLE and INTEGER for continuous numeric ranges (with minValue and maxValue), CATEGORICAL for a list of string choices, and DISCRETE for a list of numeric values in ascending order. For DOUBLE and INTEGER types, you apply a scaling type—either UNIT_LINEAR_SCALE, UNIT_LOG_SCALE, or UNIT_REVERSE_LOG_SCALE—to improve search efficiency. You can also define conditional hyperparameters using ConditionalParameterSpec. This creates a dependency where a hyperparameter is only included if a parent hyperparameter matches a condition. For example, a “number of hidden layers” parameter is only active when the parent “model type” is set to ‘DNN'.
Vertex AI offers three search algorithms. The default is Bayesian optimization, which builds a probabilistic model of the metric function and focuses on promising areas, making it sample-efficient. You can choose RANDOM_SEARCH, which samples uniformly across the space, or GRID_SEARCH. Grid search works only when all parameters are INTEGER, CATEGORICAL, or DISCRETE and exhaustively tries every combination. Use grid search when the number of trials is greater than the number of grid points to get full coverage.
You configure a hyperparameter tuning job by specifying the search space (StudySpec), the compute resources for each trial, and job-wide limits. You set the maximum number of trials (maxTrialCount) and how many run in parallel (parallelTrialCount). Parallel trials speed up the search but compete for resources. You also set a maxFailedTrialCount to stop the job if too many trials fail. Each trial runs as a custom training job on Vertex AI using a machine type and optional GPUs. The training application can be a custom container or a Python package in a pre-built container. Costs are based on the duration of all trials.
ParameterSpec objects with types DOUBLE, INTEGER, CATEGORICAL, and DISCRETE.ConditionalParameterSpec) activate only when a parent hyperparameter satisfies a condition.Bayesian optimization builds a model of the metric and focuses trials on promising regions, making it efficient for continuous or large spaces. Grid search tries every combination in a discrete space and is only applicable when all hyperparameters are integer, categorical, or discrete.
Use ConditionalParameterSpec inside a ParameterSpec to create a dependency. The child parameter is only included in a trial when the parent parameter’s value matches a condition you specify.
You need a corpus JSONL file, a query JSONL file, a training labels TSV file, and an optional test labels TSV file. All files must be stored in Cloud Storage and referenced by URI in the gcsTrainingInput object.
Prepare and test your skills
Prepare and test your skills