Create
|
|||||
|
|
Creates a model which will later contain one or more versions.
You must add at least one version before you can request predictions from the model. Add versions by calling projects.models.versions.create
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 across Google Cloud Platform services
Input
This building block consumes 32 input parameters
Name | Format | Description |
---|---|---|
parent Required |
STRING |
Required. The project name |
onlinePredictionConsoleLogging |
BOOLEAN |
Optional. If true, online prediction nodes send Default is false |
regions[] |
STRING |
|
description |
STRING |
Optional. The description specified for the model when it was created |
onlinePredictionLogging |
BOOLEAN |
Optional. If true, online prediction access logs are sent to StackDriver Logging. These logs are like standard server access logs, containing information like timestamp and latency for each request. Note that Stackdriver logs may incur a cost, especially if your project receives prediction requests at a high queries per second rate (QPS). Estimate your costs before enabling this option. Default is false |
etag |
BINARY |
|
labels |
OBJECT |
Optional. One or more labels that you can add, to organize your models. Each label is a key-value pair, where both the key and the value are arbitrary strings that you supply. For more information, see the documentation on using labels |
labels.customKey.value Required |
STRING |
Optional. One or more labels that you can add, to organize your models. Each label is a key-value pair, where both the key and the value are arbitrary strings that you supply. For more information, see the documentation on using labels |
name |
STRING |
Required. The name specified for the model when it was created. The model name must be unique within the project it is created in |
defaultVersion |
OBJECT |
Represents a version of the model. Each version is a trained model deployed in the cloud, ready to handle prediction requests. A model can have multiple versions. You can get information about all of the versions of a given model by calling projects.models.versions.list |
defaultVersion.description |
STRING |
Optional. The description specified for the version when it was created |
defaultVersion.framework |
ENUMERATION |
Optional. The machine learning framework AI Platform uses to train
this version of the model. Valid values are Do not specify a framework if you're deploying a custom prediction routine |
defaultVersion.etag |
BINARY |
|
defaultVersion.isDefault |
BOOLEAN |
Output only. If true, this version will be used to handle prediction requests that do not specify a version. You can change the default version by calling projects.methods.versions.setDefault |
defaultVersion.state |
ENUMERATION |
Output only. The state of a version |
defaultVersion.manualScaling |
OBJECT |
Options for manually scaling a model |
defaultVersion.manualScaling.nodes |
INTEGER |
The number of nodes to allocate for this model. These nodes are always up,
starting from the time the model is deployed, so the cost of operating
this model will be proportional to |
defaultVersion.name |
STRING |
Required.The name specified for the version when it was created. The version name must be unique within the model it is created in |
defaultVersion.serviceAccount |
STRING |
Optional. Specifies the service account for resource access control |
defaultVersion.pythonVersion |
STRING |
Optional. The version of Python used in prediction. If not set, the default
version is '2.7'. Python '3.5' is available when |
defaultVersion.lastUseTime |
ANY |
Output only. The time the version was last used for prediction |
defaultVersion.predictionClass |
STRING |
Optional. The fully qualified name
(module_name.class_name) of a class that implements
the Predictor interface described in this reference field. The module
containing this class should be included in a package provided to the
Specify this field if and only if you are deploying a custom prediction
routine (beta).
If you specify this field, you must set
The following code sample provides the Predictor interface:
Learn more about the Predictor interface and custom prediction routines |
defaultVersion.packageUris[] |
STRING |
|
defaultVersion.deploymentUri |
STRING |
Required. The Cloud Storage location of the trained model used to create the version. See the guide to model deployment for more information. When passing Version to projects.models.versions.create the model service uses the specified location as the source of the model. Once deployed, the model version is hosted by the prediction service, so this location is useful only as a historical record. The total number of model files can't exceed 1000 |
defaultVersion.autoScaling |
OBJECT |
Options for automatically scaling a model |
defaultVersion.autoScaling.minNodes |
INTEGER |
Optional. The minimum number of nodes to allocate for this model. These
nodes are always up, starting from the time the model is deployed.
Therefore, the cost of operating this model will be at least
Unlike manual scaling, if the load gets too heavy for the nodes
that are up, the service will automatically add nodes to handle the
increased load as well as scale back as traffic drops, always maintaining
at least If not specified, You can set HTTP request: <pre> PATCH https://ml.googleapis.com/v1/{name=projects/*/models/*/versions/*}?update_mask=autoScaling.minNodes -d @./update_body.json </pre> |
defaultVersion.createTime |
ANY |
Output only. The time the version was created |
defaultVersion.labels |
OBJECT |
Optional. One or more labels that you can add, to organize your model versions. Each label is a key-value pair, where both the key and the value are arbitrary strings that you supply. For more information, see the documentation on using labels |
defaultVersion.labels.customKey.value Required |
STRING |
Optional. One or more labels that you can add, to organize your model versions. Each label is a key-value pair, where both the key and the value are arbitrary strings that you supply. For more information, see the documentation on using labels |
defaultVersion.errorMessage |
STRING |
Output only. The details of a failure or a cancellation |
defaultVersion.machineType |
STRING |
Optional. The type of machine on which to serve the model. Currently only applies to online prediction service. <dl> <dt>mls1-c1-m2</dt> <dd> The <b>default</b> machine type, with 1 core and 2 GB RAM. The deprecated name for this machine type is "mls1-highmem-1". </dd> <dt>mls1-c4-m2</dt> <dd> In <b>Beta</b>. This machine type has 4 cores and 2 GB RAM. The deprecated name for this machine type is "mls1-highcpu-4". </dd> </dl> |
defaultVersion.runtimeVersion |
STRING |
Optional. The AI Platform runtime version to use for this deployment. If not set, AI Platform uses the default stable version, 1.0. For more information, see the runtime version list and how to manage runtime versions |
= Parameter name
= Format
parent STRING Required Required. The project name |
onlinePredictionConsoleLogging BOOLEAN Optional. If true, online prediction nodes send Default is false |
regions[] STRING |
description STRING Optional. The description specified for the model when it was created |
onlinePredictionLogging BOOLEAN Optional. If true, online prediction access logs are sent to StackDriver Logging. These logs are like standard server access logs, containing information like timestamp and latency for each request. Note that Stackdriver logs may incur a cost, especially if your project receives prediction requests at a high queries per second rate (QPS). Estimate your costs before enabling this option. Default is false |
etag BINARY
|
labels OBJECT Optional. One or more labels that you can add, to organize your models. Each label is a key-value pair, where both the key and the value are arbitrary strings that you supply. For more information, see the documentation on using labels |
labels.customKey.value STRING Required Optional. One or more labels that you can add, to organize your models. Each label is a key-value pair, where both the key and the value are arbitrary strings that you supply. For more information, see the documentation on using labels |
name STRING Required. The name specified for the model when it was created. The model name must be unique within the project it is created in |
defaultVersion OBJECT Represents a version of the model. Each version is a trained model deployed in the cloud, ready to handle prediction requests. A model can have multiple versions. You can get information about all of the versions of a given model by calling projects.models.versions.list |
defaultVersion.description STRING Optional. The description specified for the version when it was created |
defaultVersion.framework ENUMERATION Optional. The machine learning framework AI Platform uses to train
this version of the model. Valid values are Do not specify a framework if you're deploying a custom prediction routine |
defaultVersion.etag BINARY
|
defaultVersion.isDefault BOOLEAN Output only. If true, this version will be used to handle prediction requests that do not specify a version. You can change the default version by calling projects.methods.versions.setDefault |
defaultVersion.state ENUMERATION Output only. The state of a version |
defaultVersion.manualScaling OBJECT Options for manually scaling a model |
defaultVersion.manualScaling.nodes INTEGER The number of nodes to allocate for this model. These nodes are always up,
starting from the time the model is deployed, so the cost of operating
this model will be proportional to |
defaultVersion.name STRING Required.The name specified for the version when it was created. The version name must be unique within the model it is created in |
defaultVersion.serviceAccount STRING Optional. Specifies the service account for resource access control |
defaultVersion.pythonVersion STRING Optional. The version of Python used in prediction. If not set, the default
version is '2.7'. Python '3.5' is available when |
defaultVersion.lastUseTime ANY Output only. The time the version was last used for prediction |
defaultVersion.predictionClass STRING Optional. The fully qualified name
(module_name.class_name) of a class that implements
the Predictor interface described in this reference field. The module
containing this class should be included in a package provided to the
Specify this field if and only if you are deploying a custom prediction
routine (beta).
If you specify this field, you must set
The following code sample provides the Predictor interface:
Learn more about the Predictor interface and custom prediction routines |
defaultVersion.packageUris[] STRING |
defaultVersion.deploymentUri STRING Required. The Cloud Storage location of the trained model used to create the version. See the guide to model deployment for more information. When passing Version to projects.models.versions.create the model service uses the specified location as the source of the model. Once deployed, the model version is hosted by the prediction service, so this location is useful only as a historical record. The total number of model files can't exceed 1000 |
defaultVersion.autoScaling OBJECT Options for automatically scaling a model |
defaultVersion.autoScaling.minNodes INTEGER Optional. The minimum number of nodes to allocate for this model. These
nodes are always up, starting from the time the model is deployed.
Therefore, the cost of operating this model will be at least
Unlike manual scaling, if the load gets too heavy for the nodes
that are up, the service will automatically add nodes to handle the
increased load as well as scale back as traffic drops, always maintaining
at least If not specified, You can set HTTP request: <pre> PATCH https://ml.googleapis.com/v1/{name=projects/*/models/*/versions/*}?update_mask=autoScaling.minNodes -d @./update_body.json </pre> |
defaultVersion.createTime ANY Output only. The time the version was created |
defaultVersion.labels OBJECT Optional. One or more labels that you can add, to organize your model versions. Each label is a key-value pair, where both the key and the value are arbitrary strings that you supply. For more information, see the documentation on using labels |
defaultVersion.labels.customKey.value STRING Required Optional. One or more labels that you can add, to organize your model versions. Each label is a key-value pair, where both the key and the value are arbitrary strings that you supply. For more information, see the documentation on using labels |
defaultVersion.errorMessage STRING Output only. The details of a failure or a cancellation |
defaultVersion.machineType STRING Optional. The type of machine on which to serve the model. Currently only applies to online prediction service. <dl> <dt>mls1-c1-m2</dt> <dd> The <b>default</b> machine type, with 1 core and 2 GB RAM. The deprecated name for this machine type is "mls1-highmem-1". </dd> <dt>mls1-c4-m2</dt> <dd> In <b>Beta</b>. This machine type has 4 cores and 2 GB RAM. The deprecated name for this machine type is "mls1-highcpu-4". </dd> </dl> |
defaultVersion.runtimeVersion STRING Optional. The AI Platform runtime version to use for this deployment. If not set, AI Platform uses the default stable version, 1.0. For more information, see the runtime version list and how to manage runtime versions |
Output
This building block provides 31 output parameters
Name | Format | Description |
---|---|---|
onlinePredictionConsoleLogging |
BOOLEAN |
Optional. If true, online prediction nodes send Default is false |
regions[] |
STRING |
|
description |
STRING |
Optional. The description specified for the model when it was created |
onlinePredictionLogging |
BOOLEAN |
Optional. If true, online prediction access logs are sent to StackDriver Logging. These logs are like standard server access logs, containing information like timestamp and latency for each request. Note that Stackdriver logs may incur a cost, especially if your project receives prediction requests at a high queries per second rate (QPS). Estimate your costs before enabling this option. Default is false |
etag |
BINARY |
|
labels |
OBJECT |
Optional. One or more labels that you can add, to organize your models. Each label is a key-value pair, where both the key and the value are arbitrary strings that you supply. For more information, see the documentation on using labels |
labels.customKey.value |
STRING |
Optional. One or more labels that you can add, to organize your models. Each label is a key-value pair, where both the key and the value are arbitrary strings that you supply. For more information, see the documentation on using labels |
name |
STRING |
Required. The name specified for the model when it was created. The model name must be unique within the project it is created in |
defaultVersion |
OBJECT |
Represents a version of the model. Each version is a trained model deployed in the cloud, ready to handle prediction requests. A model can have multiple versions. You can get information about all of the versions of a given model by calling projects.models.versions.list |
defaultVersion.description |
STRING |
Optional. The description specified for the version when it was created |
defaultVersion.framework |
ENUMERATION |
Optional. The machine learning framework AI Platform uses to train
this version of the model. Valid values are Do not specify a framework if you're deploying a custom prediction routine |
defaultVersion.etag |
BINARY |
|
defaultVersion.isDefault |
BOOLEAN |
Output only. If true, this version will be used to handle prediction requests that do not specify a version. You can change the default version by calling projects.methods.versions.setDefault |
defaultVersion.state |
ENUMERATION |
Output only. The state of a version |
defaultVersion.manualScaling |
OBJECT |
Options for manually scaling a model |
defaultVersion.manualScaling.nodes |
INTEGER |
The number of nodes to allocate for this model. These nodes are always up,
starting from the time the model is deployed, so the cost of operating
this model will be proportional to |
defaultVersion.name |
STRING |
Required.The name specified for the version when it was created. The version name must be unique within the model it is created in |
defaultVersion.serviceAccount |
STRING |
Optional. Specifies the service account for resource access control |
defaultVersion.pythonVersion |
STRING |
Optional. The version of Python used in prediction. If not set, the default
version is '2.7'. Python '3.5' is available when |
defaultVersion.lastUseTime |
ANY |
Output only. The time the version was last used for prediction |
defaultVersion.predictionClass |
STRING |
Optional. The fully qualified name
(module_name.class_name) of a class that implements
the Predictor interface described in this reference field. The module
containing this class should be included in a package provided to the
Specify this field if and only if you are deploying a custom prediction
routine (beta).
If you specify this field, you must set
The following code sample provides the Predictor interface:
Learn more about the Predictor interface and custom prediction routines |
defaultVersion.packageUris[] |
STRING |
|
defaultVersion.deploymentUri |
STRING |
Required. The Cloud Storage location of the trained model used to create the version. See the guide to model deployment for more information. When passing Version to projects.models.versions.create the model service uses the specified location as the source of the model. Once deployed, the model version is hosted by the prediction service, so this location is useful only as a historical record. The total number of model files can't exceed 1000 |
defaultVersion.autoScaling |
OBJECT |
Options for automatically scaling a model |
defaultVersion.autoScaling.minNodes |
INTEGER |
Optional. The minimum number of nodes to allocate for this model. These
nodes are always up, starting from the time the model is deployed.
Therefore, the cost of operating this model will be at least
Unlike manual scaling, if the load gets too heavy for the nodes
that are up, the service will automatically add nodes to handle the
increased load as well as scale back as traffic drops, always maintaining
at least If not specified, You can set HTTP request: <pre> PATCH https://ml.googleapis.com/v1/{name=projects/*/models/*/versions/*}?update_mask=autoScaling.minNodes -d @./update_body.json </pre> |
defaultVersion.createTime |
ANY |
Output only. The time the version was created |
defaultVersion.labels |
OBJECT |
Optional. One or more labels that you can add, to organize your model versions. Each label is a key-value pair, where both the key and the value are arbitrary strings that you supply. For more information, see the documentation on using labels |
defaultVersion.labels.customKey.value |
STRING |
Optional. One or more labels that you can add, to organize your model versions. Each label is a key-value pair, where both the key and the value are arbitrary strings that you supply. For more information, see the documentation on using labels |
defaultVersion.errorMessage |
STRING |
Output only. The details of a failure or a cancellation |
defaultVersion.machineType |
STRING |
Optional. The type of machine on which to serve the model. Currently only applies to online prediction service. <dl> <dt>mls1-c1-m2</dt> <dd> The <b>default</b> machine type, with 1 core and 2 GB RAM. The deprecated name for this machine type is "mls1-highmem-1". </dd> <dt>mls1-c4-m2</dt> <dd> In <b>Beta</b>. This machine type has 4 cores and 2 GB RAM. The deprecated name for this machine type is "mls1-highcpu-4". </dd> </dl> |
defaultVersion.runtimeVersion |
STRING |
Optional. The AI Platform runtime version to use for this deployment. If not set, AI Platform uses the default stable version, 1.0. For more information, see the runtime version list and how to manage runtime versions |
= Parameter name
= Format
onlinePredictionConsoleLogging BOOLEAN Optional. If true, online prediction nodes send Default is false |
regions[] STRING |
description STRING Optional. The description specified for the model when it was created |
onlinePredictionLogging BOOLEAN Optional. If true, online prediction access logs are sent to StackDriver Logging. These logs are like standard server access logs, containing information like timestamp and latency for each request. Note that Stackdriver logs may incur a cost, especially if your project receives prediction requests at a high queries per second rate (QPS). Estimate your costs before enabling this option. Default is false |
etag BINARY
|
labels OBJECT Optional. One or more labels that you can add, to organize your models. Each label is a key-value pair, where both the key and the value are arbitrary strings that you supply. For more information, see the documentation on using labels |
labels.customKey.value STRING Optional. One or more labels that you can add, to organize your models. Each label is a key-value pair, where both the key and the value are arbitrary strings that you supply. For more information, see the documentation on using labels |
name STRING Required. The name specified for the model when it was created. The model name must be unique within the project it is created in |
defaultVersion OBJECT Represents a version of the model. Each version is a trained model deployed in the cloud, ready to handle prediction requests. A model can have multiple versions. You can get information about all of the versions of a given model by calling projects.models.versions.list |
defaultVersion.description STRING Optional. The description specified for the version when it was created |
defaultVersion.framework ENUMERATION Optional. The machine learning framework AI Platform uses to train
this version of the model. Valid values are Do not specify a framework if you're deploying a custom prediction routine |
defaultVersion.etag BINARY
|
defaultVersion.isDefault BOOLEAN Output only. If true, this version will be used to handle prediction requests that do not specify a version. You can change the default version by calling projects.methods.versions.setDefault |
defaultVersion.state ENUMERATION Output only. The state of a version |
defaultVersion.manualScaling OBJECT Options for manually scaling a model |
defaultVersion.manualScaling.nodes INTEGER The number of nodes to allocate for this model. These nodes are always up,
starting from the time the model is deployed, so the cost of operating
this model will be proportional to |
defaultVersion.name STRING Required.The name specified for the version when it was created. The version name must be unique within the model it is created in |
defaultVersion.serviceAccount STRING Optional. Specifies the service account for resource access control |
defaultVersion.pythonVersion STRING Optional. The version of Python used in prediction. If not set, the default
version is '2.7'. Python '3.5' is available when |
defaultVersion.lastUseTime ANY Output only. The time the version was last used for prediction |
defaultVersion.predictionClass STRING Optional. The fully qualified name
(module_name.class_name) of a class that implements
the Predictor interface described in this reference field. The module
containing this class should be included in a package provided to the
Specify this field if and only if you are deploying a custom prediction
routine (beta).
If you specify this field, you must set
The following code sample provides the Predictor interface:
Learn more about the Predictor interface and custom prediction routines |
defaultVersion.packageUris[] STRING |
defaultVersion.deploymentUri STRING Required. The Cloud Storage location of the trained model used to create the version. See the guide to model deployment for more information. When passing Version to projects.models.versions.create the model service uses the specified location as the source of the model. Once deployed, the model version is hosted by the prediction service, so this location is useful only as a historical record. The total number of model files can't exceed 1000 |
defaultVersion.autoScaling OBJECT Options for automatically scaling a model |
defaultVersion.autoScaling.minNodes INTEGER Optional. The minimum number of nodes to allocate for this model. These
nodes are always up, starting from the time the model is deployed.
Therefore, the cost of operating this model will be at least
Unlike manual scaling, if the load gets too heavy for the nodes
that are up, the service will automatically add nodes to handle the
increased load as well as scale back as traffic drops, always maintaining
at least If not specified, You can set HTTP request: <pre> PATCH https://ml.googleapis.com/v1/{name=projects/*/models/*/versions/*}?update_mask=autoScaling.minNodes -d @./update_body.json </pre> |
defaultVersion.createTime ANY Output only. The time the version was created |
defaultVersion.labels OBJECT Optional. One or more labels that you can add, to organize your model versions. Each label is a key-value pair, where both the key and the value are arbitrary strings that you supply. For more information, see the documentation on using labels |
defaultVersion.labels.customKey.value STRING Optional. One or more labels that you can add, to organize your model versions. Each label is a key-value pair, where both the key and the value are arbitrary strings that you supply. For more information, see the documentation on using labels |
defaultVersion.errorMessage STRING Output only. The details of a failure or a cancellation |
defaultVersion.machineType STRING Optional. The type of machine on which to serve the model. Currently only applies to online prediction service. <dl> <dt>mls1-c1-m2</dt> <dd> The <b>default</b> machine type, with 1 core and 2 GB RAM. The deprecated name for this machine type is "mls1-highmem-1". </dd> <dt>mls1-c4-m2</dt> <dd> In <b>Beta</b>. This machine type has 4 cores and 2 GB RAM. The deprecated name for this machine type is "mls1-highcpu-4". </dd> </dl> |
defaultVersion.runtimeVersion STRING Optional. The AI Platform runtime version to use for this deployment. If not set, AI Platform uses the default stable version, 1.0. For more information, see the runtime version list and how to manage runtime versions |