ML.TRAINING_INFO function allows you to see information about the training
iterations of a model.
ML.TRAINING_INFO can be run while the
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
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,
lossis the cross-entropy log loss.
eval_loss: The loss metric calculated on the holdout data. For k-means models,
ML.TRAINING_INFOdoes not return an
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
cluster_sizewith standardized features. Only returned for k-means models.
project_idis your project ID.
datasetis the BigQuery dataset that contains the model.
modelis the name of the model.
The following example retrieves training information from
mydataset. The dataset is in your default project.
SELECT * FROM ML.TRAINING_INFO(MODEL `mydataset.mymodel`)
ML.TRAINING_INFO function is subject to the following limitations:
- Imported TensorFlow models are not supported.