Patch

Patch specific fields in the specified model

74 variables
71 variables

Patch specific fields in the specified model

Authorization

To use this building block you will have to grant access to at least one of the following scopes:

  • View and manage your data in Google BigQuery
  • View and manage your data across Google Cloud Platform services

Input

This building block consumes 74 input parameters

  = Parameter name
  = Format

projectId STRING Required

Project ID of the model to patch

datasetId STRING Required

Dataset ID of the model to patch

modelId STRING Required

Model ID of the model to patch

lastModifiedTime INTEGER

Output only. The time when this model was last modified, in millisecs since the epoch

labels OBJECT

[Optional] The labels associated with this model. You can use these to organize and group your models. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and each label in the list must have a different key

labels.customKey.value STRING Required

[Optional] The labels associated with this model. You can use these to organize and group your models. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and each label in the list must have a different key

labelColumns[] OBJECT

A field or a column

labelColumns[].name STRING

Optional. The name of this field. Can be absent for struct fields

labelColumns[].type OBJECT

The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT<x STRING, y ARRAY>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}}

labelColumns[].type.structType OBJECT

labelColumns[].type.arrayElementType OBJECT

The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT<x STRING, y ARRAY>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}}

labelColumns[].type.arrayElementType.typeKind ENUMERATION

Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY")

labelColumns[].type.typeKind ENUMERATION

Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY")

modelType ENUMERATION

Output only. Type of the model resource

featureColumns[] OBJECT

A field or a column

featureColumns[].name STRING

Optional. The name of this field. Can be absent for struct fields

featureColumns[].type OBJECT

The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT<x STRING, y ARRAY>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}}

featureColumns[].type.structType OBJECT

featureColumns[].type.arrayElementType OBJECT

The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT<x STRING, y ARRAY>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}}

featureColumns[].type.arrayElementType.typeKind ENUMERATION

Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY")

featureColumns[].type.typeKind ENUMERATION

Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY")

expirationTime INTEGER

[Optional] The time when this model expires, in milliseconds since the epoch. If not present, the model will persist indefinitely. Expired models will be deleted and their storage reclaimed. The defaultTableExpirationMs property of the encapsulating dataset can be used to set a default expirationTime on newly created models

trainingRuns[] OBJECT

Information about a single training query run for the model

trainingRuns[].trainingOptions OBJECT

trainingRuns[].trainingOptions.optimizationStrategy ENUMERATION

Optimization strategy for training linear regression models

trainingRuns[].trainingOptions.learnRate NUMBER

Learning rate in training. Used only for iterative training algorithms

trainingRuns[].trainingOptions.maxIterations INTEGER

The maximum number of iterations in training. Used only for iterative training algorithms

trainingRuns[].trainingOptions.dataSplitColumn STRING

The column to split data with. This column won't be used as a feature.

  1. When data_split_method is CUSTOM, the corresponding column should be boolean. The rows with true value tag are eval data, and the false are training data.
  2. When data_split_method is SEQ, the first DATA_SPLIT_EVAL_FRACTION rows (from smallest to largest) in the corresponding column are used as training data, and the rest are eval data. It respects the order in Orderable data types: https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#data-type-properties

trainingRuns[].trainingOptions.labelClassWeights OBJECT

Weights associated with each label class, for rebalancing the training data. Only applicable for classification models

trainingRuns[].trainingOptions.labelClassWeights.customKey.value NUMBER Required

Weights associated with each label class, for rebalancing the training data. Only applicable for classification models

trainingRuns[].trainingOptions.l2Regularization NUMBER

L2 regularization coefficient

trainingRuns[].trainingOptions.earlyStop BOOLEAN

Whether to stop early when the loss doesn't improve significantly any more (compared to min_relative_progress). Used only for iterative training algorithms

trainingRuns[].trainingOptions.dataSplitEvalFraction NUMBER

The fraction of evaluation data over the whole input data. The rest of data will be used as training data. The format should be double. Accurate to two decimal places. Default value is 0.2

trainingRuns[].trainingOptions.modelUri STRING

[Beta] Google Cloud Storage URI from which the model was imported. Only applicable for imported models

trainingRuns[].trainingOptions.minRelativeProgress NUMBER

When early_stop is true, stops training when accuracy improvement is less than 'min_relative_progress'. Used only for iterative training algorithms

trainingRuns[].trainingOptions.initialLearnRate NUMBER

Specifies the initial learning rate for the line search learn rate strategy

trainingRuns[].trainingOptions.inputLabelColumns[] STRING

trainingRuns[].trainingOptions.numClusters INTEGER

[Beta] Number of clusters for clustering models

trainingRuns[].trainingOptions.warmStart BOOLEAN

Whether to train a model from the last checkpoint

trainingRuns[].trainingOptions.learnRateStrategy ENUMERATION

The strategy to determine learn rate for the current iteration

trainingRuns[].trainingOptions.lossType ENUMERATION

Type of loss function used during training run

trainingRuns[].trainingOptions.dataSplitMethod ENUMERATION

The data split type for training and evaluation, e.g. RANDOM

trainingRuns[].trainingOptions.l1Regularization NUMBER

L1 regularization coefficient

trainingRuns[].trainingOptions.distanceType ENUMERATION

[Beta] Distance type for clustering models

trainingRuns[].startTime ANY

The start time of this training run

trainingRuns[].results[] OBJECT

Information about a single iteration of the training run

trainingRuns[].results[].trainingLoss NUMBER

Loss computed on the training data at the end of iteration

trainingRuns[].results[].evalLoss NUMBER

Loss computed on the eval data at the end of iteration

trainingRuns[].results[].index INTEGER

Index of the iteration, 0 based

trainingRuns[].results[].learnRate NUMBER

Learn rate used for this iteration

trainingRuns[].results[].durationMs INTEGER

Time taken to run the iteration in milliseconds

trainingRuns[].evaluationMetrics OBJECT

Evaluation metrics of a model. These are either computed on all training data or just the eval data based on whether eval data was used during training. These are not present for imported models

trainingRuns[].evaluationMetrics.binaryClassificationMetrics OBJECT

Evaluation metrics for binary classification/classifier models

trainingRuns[].evaluationMetrics.binaryClassificationMetrics.positiveLabel STRING

Label representing the positive class

trainingRuns[].evaluationMetrics.binaryClassificationMetrics.negativeLabel STRING

Label representing the negative class

trainingRuns[].evaluationMetrics.regressionMetrics OBJECT

Evaluation metrics for regression models

trainingRuns[].evaluationMetrics.regressionMetrics.medianAbsoluteError NUMBER

Median absolute error

trainingRuns[].evaluationMetrics.regressionMetrics.meanSquaredLogError NUMBER

Mean squared log error

trainingRuns[].evaluationMetrics.regressionMetrics.meanAbsoluteError NUMBER

Mean absolute error

trainingRuns[].evaluationMetrics.regressionMetrics.meanSquaredError NUMBER

Mean squared error

trainingRuns[].evaluationMetrics.regressionMetrics.rSquared NUMBER

R^2 score

trainingRuns[].evaluationMetrics.multiClassClassificationMetrics OBJECT

Evaluation metrics for multi-class classification/classifier models

trainingRuns[].evaluationMetrics.clusteringMetrics OBJECT

Evaluation metrics for clustering models

trainingRuns[].evaluationMetrics.clusteringMetrics.meanSquaredDistance NUMBER

Mean of squared distances between each sample to its cluster centroid

trainingRuns[].evaluationMetrics.clusteringMetrics.daviesBouldinIndex NUMBER

Davies-Bouldin index

modelReference OBJECT

Id path of a model

modelReference.projectId STRING

[Required] The ID of the project containing this model

modelReference.datasetId STRING

[Required] The ID of the dataset containing this model

modelReference.modelId STRING

[Required] The ID of the model. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters

description STRING

[Optional] A user-friendly description of this model

etag STRING

Output only. A hash of this resource

creationTime INTEGER

Output only. The time when this model was created, in millisecs since the epoch

location STRING

Output only. The geographic location where the model resides. This value is inherited from the dataset

friendlyName STRING

[Optional] A descriptive name for this model

Output

This building block provides 71 output parameters

  = Parameter name
  = Format

lastModifiedTime INTEGER

Output only. The time when this model was last modified, in millisecs since the epoch

labels OBJECT

[Optional] The labels associated with this model. You can use these to organize and group your models. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and each label in the list must have a different key

labels.customKey.value STRING

[Optional] The labels associated with this model. You can use these to organize and group your models. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and each label in the list must have a different key

labelColumns[] OBJECT

A field or a column

labelColumns[].name STRING

Optional. The name of this field. Can be absent for struct fields

labelColumns[].type OBJECT

The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT<x STRING, y ARRAY>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}}

labelColumns[].type.structType OBJECT

labelColumns[].type.arrayElementType OBJECT

The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT<x STRING, y ARRAY>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}}

labelColumns[].type.arrayElementType.typeKind ENUMERATION

Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY")

labelColumns[].type.typeKind ENUMERATION

Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY")

modelType ENUMERATION

Output only. Type of the model resource

featureColumns[] OBJECT

A field or a column

featureColumns[].name STRING

Optional. The name of this field. Can be absent for struct fields

featureColumns[].type OBJECT

The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT<x STRING, y ARRAY>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}}

featureColumns[].type.structType OBJECT

featureColumns[].type.arrayElementType OBJECT

The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT<x STRING, y ARRAY>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}}

featureColumns[].type.arrayElementType.typeKind ENUMERATION

Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY")

featureColumns[].type.typeKind ENUMERATION

Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY")

expirationTime INTEGER

[Optional] The time when this model expires, in milliseconds since the epoch. If not present, the model will persist indefinitely. Expired models will be deleted and their storage reclaimed. The defaultTableExpirationMs property of the encapsulating dataset can be used to set a default expirationTime on newly created models

trainingRuns[] OBJECT

Information about a single training query run for the model

trainingRuns[].trainingOptions OBJECT

trainingRuns[].trainingOptions.optimizationStrategy ENUMERATION

Optimization strategy for training linear regression models

trainingRuns[].trainingOptions.learnRate NUMBER

Learning rate in training. Used only for iterative training algorithms

trainingRuns[].trainingOptions.maxIterations INTEGER

The maximum number of iterations in training. Used only for iterative training algorithms

trainingRuns[].trainingOptions.dataSplitColumn STRING

The column to split data with. This column won't be used as a feature.

  1. When data_split_method is CUSTOM, the corresponding column should be boolean. The rows with true value tag are eval data, and the false are training data.
  2. When data_split_method is SEQ, the first DATA_SPLIT_EVAL_FRACTION rows (from smallest to largest) in the corresponding column are used as training data, and the rest are eval data. It respects the order in Orderable data types: https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#data-type-properties

trainingRuns[].trainingOptions.labelClassWeights OBJECT

Weights associated with each label class, for rebalancing the training data. Only applicable for classification models

trainingRuns[].trainingOptions.labelClassWeights.customKey.value NUMBER

Weights associated with each label class, for rebalancing the training data. Only applicable for classification models

trainingRuns[].trainingOptions.l2Regularization NUMBER

L2 regularization coefficient

trainingRuns[].trainingOptions.earlyStop BOOLEAN

Whether to stop early when the loss doesn't improve significantly any more (compared to min_relative_progress). Used only for iterative training algorithms

trainingRuns[].trainingOptions.dataSplitEvalFraction NUMBER

The fraction of evaluation data over the whole input data. The rest of data will be used as training data. The format should be double. Accurate to two decimal places. Default value is 0.2

trainingRuns[].trainingOptions.modelUri STRING

[Beta] Google Cloud Storage URI from which the model was imported. Only applicable for imported models

trainingRuns[].trainingOptions.minRelativeProgress NUMBER

When early_stop is true, stops training when accuracy improvement is less than 'min_relative_progress'. Used only for iterative training algorithms

trainingRuns[].trainingOptions.initialLearnRate NUMBER

Specifies the initial learning rate for the line search learn rate strategy

trainingRuns[].trainingOptions.inputLabelColumns[] STRING

trainingRuns[].trainingOptions.numClusters INTEGER

[Beta] Number of clusters for clustering models

trainingRuns[].trainingOptions.warmStart BOOLEAN

Whether to train a model from the last checkpoint

trainingRuns[].trainingOptions.learnRateStrategy ENUMERATION

The strategy to determine learn rate for the current iteration

trainingRuns[].trainingOptions.lossType ENUMERATION

Type of loss function used during training run

trainingRuns[].trainingOptions.dataSplitMethod ENUMERATION

The data split type for training and evaluation, e.g. RANDOM

trainingRuns[].trainingOptions.l1Regularization NUMBER

L1 regularization coefficient

trainingRuns[].trainingOptions.distanceType ENUMERATION

[Beta] Distance type for clustering models

trainingRuns[].startTime ANY

The start time of this training run

trainingRuns[].results[] OBJECT

Information about a single iteration of the training run

trainingRuns[].results[].trainingLoss NUMBER

Loss computed on the training data at the end of iteration

trainingRuns[].results[].evalLoss NUMBER

Loss computed on the eval data at the end of iteration

trainingRuns[].results[].index INTEGER

Index of the iteration, 0 based

trainingRuns[].results[].learnRate NUMBER

Learn rate used for this iteration

trainingRuns[].results[].durationMs INTEGER

Time taken to run the iteration in milliseconds

trainingRuns[].evaluationMetrics OBJECT

Evaluation metrics of a model. These are either computed on all training data or just the eval data based on whether eval data was used during training. These are not present for imported models

trainingRuns[].evaluationMetrics.binaryClassificationMetrics OBJECT

Evaluation metrics for binary classification/classifier models

trainingRuns[].evaluationMetrics.binaryClassificationMetrics.positiveLabel STRING

Label representing the positive class

trainingRuns[].evaluationMetrics.binaryClassificationMetrics.negativeLabel STRING

Label representing the negative class

trainingRuns[].evaluationMetrics.regressionMetrics OBJECT

Evaluation metrics for regression models

trainingRuns[].evaluationMetrics.regressionMetrics.medianAbsoluteError NUMBER

Median absolute error

trainingRuns[].evaluationMetrics.regressionMetrics.meanSquaredLogError NUMBER

Mean squared log error

trainingRuns[].evaluationMetrics.regressionMetrics.meanAbsoluteError NUMBER

Mean absolute error

trainingRuns[].evaluationMetrics.regressionMetrics.meanSquaredError NUMBER

Mean squared error

trainingRuns[].evaluationMetrics.regressionMetrics.rSquared NUMBER

R^2 score

trainingRuns[].evaluationMetrics.multiClassClassificationMetrics OBJECT

Evaluation metrics for multi-class classification/classifier models

trainingRuns[].evaluationMetrics.clusteringMetrics OBJECT

Evaluation metrics for clustering models

trainingRuns[].evaluationMetrics.clusteringMetrics.meanSquaredDistance NUMBER

Mean of squared distances between each sample to its cluster centroid

trainingRuns[].evaluationMetrics.clusteringMetrics.daviesBouldinIndex NUMBER

Davies-Bouldin index

modelReference OBJECT

Id path of a model

modelReference.projectId STRING

[Required] The ID of the project containing this model

modelReference.datasetId STRING

[Required] The ID of the dataset containing this model

modelReference.modelId STRING

[Required] The ID of the model. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters

description STRING

[Optional] A user-friendly description of this model

etag STRING

Output only. A hash of this resource

creationTime INTEGER

Output only. The time when this model was created, in millisecs since the epoch

location STRING

Output only. The geographic location where the model resides. This value is inherited from the dataset

friendlyName STRING

[Optional] A descriptive name for this model