Class Model (3.14.1)

Model(model_ref:typing.Optional[typing.Union[google.cloud.bigquery.model.ModelReference,str]])

Properties

best_trial_id

The best trial_id across all training runs.

deprecated:This property is deprecated!Read-only.

created

dataset_id

description

encryption_configuration

etag

ETag for the model resource (:data:None until set from the server).

Read-only.

expires

The datetime when this model expires.

If not present, the model will persist indefinitely. Expired models will bedeleted and their storage reclaimed.

feature_columns

Input feature columns that were used to train this model.

Read-only.

friendly_name

Title of the table (defaults to :data:None).

label_columns

Label columns that were used to train this model.

The output of the model will have apredicted_ prefix to these columns.

Read-only.

labels

Labels for the table.

This method always returns a dict. To change a model's labels, modify the dict,then callClient.update_model. To delete a label, set its value to:data:None before updating.

location

The geographic location where the model resides.

This value is inherited from the dataset.

Read-only.

model_id

The model ID.

model_type

Type of the model resource.

Read-only.

modified

Datetime at which the model was last modified (:data:None until set from the server).

Read-only.

path

URL path for the model's APIs.

project

Project bound to the model.

reference

A model reference pointing to this model.

Read-only.

training_runs

Information for all training runs in increasing order of start time.

Dictionaries are in REST API format. See:https://cloud.google.com/bigquery/docs/reference/rest/v2/models#trainingrun

Read-only.

transform_columns

The input feature columns that were used to train this model.The output transform columns used to train this model.

See REST API:https://cloud.google.com/bigquery/docs/reference/rest/v2/models#transformcolumn

Read-only.

Methods

from_api_repr

from_api_repr(resource:typing.Dict[str,typing.Any])->google.cloud.bigquery.model.Model

Factory: construct a model resource given its API representation

to_api_repr

to_api_repr()->typing.Dict[str,typing.Any]

Construct the API resource representation of this model.

__init__

__init__(model_ref:typing.Optional[typing.Union[google.cloud.bigquery.model.ModelReference,str]])

Initialize self. See help(type(self)) for accurate signature.

Model

Model(model_ref:typing.Optional[typing.Union[google.cloud.bigquery.model.ModelReference,str]])

Model represents a machine learning model resource.

Seehttps://cloud.google.com/bigquery/docs/reference/rest/v2/models

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-16 UTC.