[ Web Proxy ]
URL:
Viewing: https://cloud.google.com/bigquery/docs/reference/standard-sql/bigqueryml-syntax-train [Back]  [Original]

The ML.TRAINING_INFO function  |  BigQuery  |  Google Cloud Documentation Skip to main content
Google Cloud Documentation [Google Cloud Documentation]
Send feedback Stay organized with collections Save and categorize content based on your preferences.

The ML.TRAINING_INFO function

This document describes the ML.TRAINING_INFO function, which lets you see information about the training iterations of a model.

You can run ML.TRAINING_INFO while the CREATE MODEL statement for the target model is running, or you can wait until after the CREATE MODEL statement completes. If you run ML.TRAINING_INFO before the first training iteration of the CREATE MODEL statement completes, the query returns a Not found error.

Syntax

ML.TRAINING_INFO(
  MODEL `PROJECT_ID.DATASET.MODEL_NAME`,
)

Arguments

ML.TRAINING_INFO takes the following arguments:

Output

ML.TRAINING_INFO returns the following columns:

Note: For linear and logistic regression models, the learning_rate value can increase over the course of training if the LEARN_RATE_STRATEGY argument isn't set to CONSTANT. This increase is due to the fact that when the LEARN_RATE_STRATEGY is set to LINE_SEARCH, four learning rates are generated from LS_INIT_LEARN_RATE. For example, if LS_INIT_LEARN_RATE is 0.1, then the first iteration of training compares the respective loss from a set of four different models trained from setting the learn rate to 0.2, 0.1, 0.05, and 0.025. If LEARN_RATE=0.2 generates the model with the smallest loss, then the next iteration generates four models with the learning rate set to 0.4, 0.2, 0.1, 0.05 from the previous best fit model, and this process continues until the model converges.

Permissions

You must have the bigquery.models.create and bigquery.models.getData Identity and Access Management (IAM) permissions in order to run ML.TRAINING_INFO.

Limitations

ML.TRAINING_INFO is subject to the following limitations:

Example

The following example retrieves training information from the model mydataset.linear_regression in your default project:

SELECT
  *
FROM
  ML.TRAINING_INFO(MODEL `mydataset.linear_regression`)

The result is similar to the following:

+--------------+-----------+----------+-----------+---------------+-------------+
| training_run | iteration | loss     | eval_loss | learning_rate | duration_ms |
+--------------+-----------+----------+-----------+---------------+-------------+
| 0            | 1         | 16637.8  | 269004.9  | 0.6           | 2720        |
| 0            | 0         | 145701.3 | 368150.2  | 0.3           | 6313        |
+--------------+-----------+----------+-----------+---------------+-------------+

What's next

Send feedback

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 2026-08-11 UTC.

Need to tell us more? [[["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 2026-08-11 UTC."],[],[]]

Web Proxy Viewer  |  New URL  |  Original Page