Stay organized with collections Save and categorize content based on your preferences.
The ML.TRIAL_INFO functionThis document describes the ML.TRIAL_INFO
function, which lets you display information about trials from a model that uses hyperparameter tuning.
ML.TRIAL_INFO(MODEL `PROJECT_ID.DATASET.MODEL_NAME`)Arguments
ML.TRIAL_INFO
takes the following arguments:
PROJECT_ID
: your project ID.DATASET
: the BigQuery dataset that contains the model.MODEL_NAME
: The name of the model.ML.TRIAL_INFO
returns one row per trial with the following columns:
trial_id
: an INT64
value that contains the ID assigned to each trial in the approximate order of trial execution. trial_id
values start from 1
.hyperparameters
: a STRUCT
value that contains the hyperparameters used in the trial.hparam_tuning_evaluation_metrics
: a STRUCT
value that contains the evaluation metrics appropriate to the hyperparameter tuning objective specified by the hparam_tuning_objectives
argument in the CREATE MODEL
statement. Metrics are calculated from the evaluation data. For more information about the datasets used in hyperparameter tuning, see Data split.training_loss
: a FLOAT64
value that contains the loss of the trial during the last iteration, calculated using the training data.eval_loss
: a FLOAT64
value that contains the loss of the trial during the last iteration, calculated using the evaluation data.status
: a STRING
value that contains the final status of the trial. Possible values include the following:
SUCCEEDED
: the trial succeeded.FAILED
: the trial failed.INFEASIBLE
: the trial was not run due to an invalid combination of hyperparameters.error_message
: a STRING
value that contains the error message that is returned if the trial didn't succeed. For more information, see Error handling.
is_optimal
: a BOOL
value that indicates whether the trial had the best objective value. If multiple trials are marked as optimal, then the trial with the smallest trial_id
value is used as the default trial during model serving.
The following query retrieves information of all trials for the model mydataset.mymodel
in your default project:
SELECT * FROM ML.TRIAL_INFO(MODEL `mydataset.mymodel`)What's next
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-07 UTC.
[[["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-07 UTC."],[[["The `ML.TRIAL_INFO` function displays information about trials from a model that uses hyperparameter tuning."],["The syntax for using `ML.TRIAL_INFO` is `ML.TRIAL_INFO(MODEL project_id.dataset.model)`, where you specify your project ID, dataset, and model name."],["The function returns one row per trial, providing details such as `trial_id`, `hyperparameters`, `hparam_tuning_evaluation_metrics`, `training_loss`, `eval_loss`, `status`, `error_message`, and `is_optimal`."],["Possible status values for a trial include `SUCCEEDED`, `FAILED`, and `INFEASIBLE`."]]],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4