This page describes how to deploy, undeploy, list, delete, and get information about your custom models using AutoML Tables.
For information about training a new model, see Training models.
Deploying a model
After you train your model, you must deploy it before you can request online predictions using that model. Batch predictions can be requested from a model that is not deployed.
Deploying a model incurs charges. For more information, see the pricing page.
Console
Go to the AutoML Tables page in the Google Cloud console.
Select the Models tab in the left navigation pane and select the Region.
In the More actions menu for the model you want to deploy, click Deploy model.
REST
You deploy a model by using the models.deploy method.Before using any of the request data, make the following replacements:
-
endpoint:
automl.googleapis.com
for the global location, andeu-automl.googleapis.com
for the EU region. - project-id: your Google Cloud project ID.
- location: the location for the resource:
us-central1
for Global oreu
for the European Union. -
model-id: the ID of the model you want to deploy. For example,
TBL543
.
HTTP method and URL:
POST https://endpoint/v1beta1/projects/project-id/locations/location/models/model-id:deploy
To send your request, choose one of these options:
curl
Execute the following command:
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "x-goog-user-project: project-id" \
-H "Content-Type: application/json; charset=utf-8" \
-d "" \
"https://endpoint/v1beta1/projects/project-id/locations/location/models/model-id:deploy"
PowerShell
Execute the following command:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred"; "x-goog-user-project" = "project-id" }
Invoke-WebRequest `
-Method POST `
-Headers $headers `
-Uri "https://endpoint/v1beta1/projects/project-id/locations/location/models/model-id:deploy" | Select-Object -Expand Content
You should receive a JSON response similar to the following:
{ "name": "projects/292381/locations/us-central1/operations/TBL543", "metadata": { "@type": "type.googleapis.com/google.cloud.automl.v1beta1.OperationMetadata", "createTime": "2019-12-26T19:21:00.550021Z", "updateTime": "2019-12-26T19:21:00.550021Z", "worksOn": [ "projects/292381/locations/us-central1/models/TBL543" ], "deployModelDetails": {}, "state": "RUNNING" } }
Deploying a model is a long-running operation. You can poll for the operation status or wait for the operation to return. Learn more.
Java
If your resources are located in the EU region, you must explicitly set the endpoint. Learn more.
Node.js
If your resources are located in the EU region, you must explicitly set the endpoint. Learn more.
Python
The client library for AutoML Tables includes additional Python methods that simplify using the AutoML Tables API. These methods refer to datasets and models by name instead of id. Your dataset and model names must be unique. For more information, see the Client reference.
If your resources are located in the EU region, you must explicitly set the endpoint. Learn more.
Undeploying a model
Your model must be deployed before you can request online predictions. When you no longer need a model for online predictions, you can undeploy the model to avoid deployment charges.
For information about deployment charges, see the pricing page.
Console
Go to the AutoML Tables page in the Google Cloud console.
Select the Models tab in the left navigation pane and select the Region.
In the More actions menu for the model you want to undeploy, click Remove deployment.
REST
You use the models.undeploy method to undeploy a model.Before using any of the request data, make the following replacements:
-
endpoint:
automl.googleapis.com
for the global location, andeu-automl.googleapis.com
for the EU region. - project-id: your Google Cloud project ID.
- location: the location for the resource:
us-central1
for Global oreu
for the European Union. -
model-id: the ID of the model you want to undeploy. For example,
TBL543
.
HTTP method and URL:
POST https://endpoint/v1beta1/projects/project-id/locations/location/models/model-id:undeploy
To send your request, choose one of these options:
curl
Execute the following command:
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "x-goog-user-project: project-id" \
-H "Content-Type: application/json; charset=utf-8" \
-d "" \
"https://endpoint/v1beta1/projects/project-id/locations/location/models/model-id:undeploy"
PowerShell
Execute the following command:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred"; "x-goog-user-project" = "project-id" }
Invoke-WebRequest `
-Method POST `
-Headers $headers `
-Uri "https://endpoint/v1beta1/projects/project-id/locations/location/models/model-id:undeploy" | Select-Object -Expand Content
You should receive a JSON response similar to the following:
{ "name": "projects/292381/locations/us-central1/operations/TBL543", "metadata": { "@type": "type.googleapis.com/google.cloud.automl.v1beta1.OperationMetadata", "createTime": "2019-12-26T19:19:21.579163Z", "updateTime": "2019-12-26T19:19:21.579163Z", "worksOn": [ "projects/292381/locations/us-central1/models/TBL543" ], "undeployModelDetails": {}, "state": "RUNNING" } }
Java
If your resources are located in the EU region, you must explicitly set the endpoint. Learn more.
Node.js
If your resources are located in the EU region, you must explicitly set the endpoint. Learn more.
Python
The client library for AutoML Tables includes additional Python methods that simplify using the AutoML Tables API. These methods refer to datasets and models by name instead of id. Your dataset and model names must be unique. For more information, see the Client reference.
If your resources are located in the EU region, you must explicitly set the endpoint. Learn more.
Getting information about a model
When training is complete, you can get information about the newly created model.
Console
Go to the AutoML Tables page in the Google Cloud console.
Select the Models tab in the left navigation pane, and select the model you want to see information about.
Select the Train tab.
You can see high-level metrics for the model, such as precision and recall.
For help with evaluating the quality of your model, see Evaluating models.
REST
You use the models.get method to get information about a model.
Before using any of the request data, make the following replacements:
-
endpoint:
automl.googleapis.com
for the global location, andeu-automl.googleapis.com
for the EU region. - project-id: your Google Cloud project ID.
- location: the location for the resource:
us-central1
for Global oreu
for the European Union. -
model-id: the ID of the model you want get information about. For example,
TBL543
.
HTTP method and URL:
GET https://endpoint/v1beta1/projects/project-id/locations/location/models/model-id
To send your request, choose one of these options:
curl
Execute the following command:
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "x-goog-user-project: project-id" \
"https://endpoint/v1beta1/projects/project-id/locations/location/models/model-id"
PowerShell
Execute the following command:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred"; "x-goog-user-project" = "project-id" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://endpoint/v1beta1/projects/project-id/locations/location/models/model-id" | Select-Object -Expand Content
You should receive a JSON response similar to the following:
Java
If your resources are located in the EU region, you must explicitly set the endpoint. Learn more.
Node.js
If your resources are located in the EU region, you must explicitly set the endpoint. Learn more.
Python
The client library for AutoML Tables includes additional Python methods that simplify using the AutoML Tables API. These methods refer to datasets and models by name instead of id. Your dataset and model names must be unique. For more information, see the Client reference.
If your resources are located in the EU region, you must explicitly set the endpoint. Learn more.
Listing models
A project can include numerous models trained from the same or different datasets.
Console
To see a list of the available models using the Google Cloud console, click the Models tab in the left navigation bar and select the Region.
REST
To see a list of the available models using the API, you use the models.list method.
Before using any of the request data, make the following replacements:
-
endpoint:
automl.googleapis.com
for the global location, andeu-automl.googleapis.com
for the EU region. - project-id: your Google Cloud project ID.
- location: the location for the resource:
us-central1
for Global oreu
for the European Union.
HTTP method and URL:
GET https://endpoint/v1beta1/projects/project-id/locations/location/models
To send your request, choose one of these options:
curl
Execute the following command:
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "x-goog-user-project: project-id" \
"https://endpoint/v1beta1/projects/project-id/locations/location/models"
PowerShell
Execute the following command:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred"; "x-goog-user-project" = "project-id" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://endpoint/v1beta1/projects/project-id/locations/location/models" | Select-Object -Expand Content
Java
If your resources are located in the EU region, you must explicitly set the endpoint. Learn more.
Node.js
If your resources are located in the EU region, you must explicitly set the endpoint. Learn more.
Python
The client library for AutoML Tables includes additional Python methods that simplify using the AutoML Tables API. These methods refer to datasets and models by name instead of id. Your dataset and model names must be unique. For more information, see the Client reference.
If your resources are located in the EU region, you must explicitly set the endpoint. Learn more.
Deleting a model
Deleting a model removes it permanently from your project.
Console
In the AutoML Tables UI, click the Models tab in the left navigation menu and select the Region to display the list of available models for that region.
Click the three-dot menu at the far right of the row you want to delete and select Delete model.
Click Delete in the confirmation dialog box.
REST
You use the models.delete method to delete a model.
Before using any of the request data, make the following replacements:
-
endpoint:
automl.googleapis.com
for the global location, andeu-automl.googleapis.com
for the EU region. - project-id: your Google Cloud project ID.
- location: the location for the resource:
us-central1
for Global oreu
for the European Union. -
model-id: the ID of the model you want to delete. For example,
TBL543
.
HTTP method and URL:
DELETE https://endpoint/v1beta1/projects/project-id/locations/location/models/model-id
To send your request, choose one of these options:
curl
Execute the following command:
curl -X DELETE \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "x-goog-user-project: project-id" \
"https://endpoint/v1beta1/projects/project-id/locations/location/models/model-id"
PowerShell
Execute the following command:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred"; "x-goog-user-project" = "project-id" }
Invoke-WebRequest `
-Method DELETE `
-Headers $headers `
-Uri "https://endpoint/v1beta1/projects/project-id/locations/location/models/model-id" | Select-Object -Expand Content
You should receive a JSON response similar to the following:
{ "name": "projects/29452381/locations/us-central1/operations/TBL543", "metadata": { "@type": "type.googleapis.com/google.cloud.automl.v1beta1.OperationMetadata", "createTime": "2019-12-26T17:19:50.684850Z", "updateTime": "2019-12-26T17:19:50.684850Z", "deleteDetails": {}, "worksOn": [ "projects/29452381/locations/us-central1/models/TBL543" ], "state": "DONE" }, "done": true, "response": { "@type": "type.googleapis.com/google.protobuf.Empty" } }
Deleting a model is a long-running operation. You can poll for the operation status or wait for the operation to return. Learn more.
Java
If your resources are located in the EU region, you must explicitly set the endpoint. Learn more.
Node.js
If your resources are located in the EU region, you must explicitly set the endpoint. Learn more.
Python
The client library for AutoML Tables includes additional Python methods that simplify using the AutoML Tables API. These methods refer to datasets and models by name instead of id. Your dataset and model names must be unique. For more information, see the Client reference.
If your resources are located in the EU region, you must explicitly set the endpoint. Learn more.
What's next
- Evaluate your model.
- Get batch predictions from your model.
- Get online predictions from your model.
- Learn more about using long-running operations.