1
votes

I have to manually upload the training data label CSV and click on 'train' to train the model. I want to automate all these preferably with python.

2

2 Answers

1
votes

You can use the google-cloud-automl to automate this with Python. For example:

from google.cloud import automl_v1beta1

client = automl_v1beta1.AutoMlClient()

parent = client.location_path('[PROJECT]', '[LOCATION]')

# Create the dataset
dataset = {} . # TODO: Initialize `dataset`
response = client.create_dataset(parent, dataset)

# Create the model
model = {}  # TODO: Initialize `model`
response = client.create_model(parent, model)

def callback(operation_future):
    result = operation_future.result()  # Handle result

response.add_done_callback(callback)
metadata = response.metadata()
0
votes

I used AutoML RESTapi for creating datasets to training the model. Although If I want to retrain a model on more data, I have to delete the previously trained model and create and train a new one.