The ML.TRAINING_INFO function allows you to see information about the training iterations of a model. ML.TRAINING_INFO can be run while the CREATE MODEL query is running, or after it is run. If you run a query that contains ML.TRAINING_INFO before the first training iteration is complete, the query returns a Not found error.

ML.TRAINING_INFO returns the following columns:

  • training_run: The value in this column is zero for a newly created model. If you retrain the model using warm_start, this value is incremented.
  • iteration: The iteration number of the training run. The value for the first iteration is zero. This value is incremented for each additional training run.
  • loss: The loss metric calculated after an iteration on the training data. Loss is log loss for a logistic regression and mean squared error for a linear regression. For multiclass logistic regressions, loss is the cross-entropy log loss.
  • eval_loss: The loss metric calculated on the holdout data. For k-means models, ML.TRAINING_INFO does not return an eval_loss column.
  • learning_rate: The learning rate in this iteration.
  • duration_ms: How long the iteration took, in milliseconds.
  • cluster_info: An ARRAY of STRUCTs, which contain the fields centroid_id, cluster_radius, and cluster_size. ML.TRAINING_INFO computes cluster_radius and cluster_size with standardized features. Only returned for k-means models.


ML.TRAINING_INFO(MODEL `project_id.dataset.model`)


  • project_id is your project ID.
  • dataset is the BigQuery dataset that contains the model.
  • model is the name of the model.


The following example retrieves training information from mymodel in mydataset. The dataset is in your default project.

  ML.TRAINING_INFO(MODEL `mydataset.mymodel`)

ML.TRAINING_INFO limitations

The ML.TRAINING_INFO function is subject to the following limitations:

หน้านี้มีประโยชน์ไหม โปรดแสดงความคิดเห็น