2727
2828def create_model(project_id, compute_region, dataset_id, model_name):
2929 """Create a model."""
30- # [START automl_translation_create_model ]
30+ # [START automl_translate_create_model ]
3131 # TODO(developer): Uncomment and set the following variables
3232 # project_id = 'PROJECT_ID_HERE'
3333 # compute_region = 'COMPUTE_REGION_HERE'
@@ -54,12 +54,12 @@ def create_model(project_id, compute_region, dataset_id, model_name):
5454 print("Training operation name: {}".format(response.operation.name))
5555 print("Training started...")
5656
57- # [END automl_translation_create_model ]
57+ # [END automl_translate_create_model ]
5858
5959
6060def list_models(project_id, compute_region, filter_):
6161 """List all models."""
62- # [START automl_translation_list_models ]
62+ # [START automl_translate_list_models ]
6363 # TODO(developer): Uncomment and set the following variables
6464 # project_id = 'PROJECT_ID_HERE'
6565 # compute_region = 'COMPUTE_REGION_HERE'
@@ -92,12 +92,12 @@ def list_models(project_id, compute_region, filter_):
9292 print("\tnanos: {}".format(model.create_time.nanos))
9393 print("Model deployment state: {}".format(deployment_state))
9494
95- # [END automl_translation_list_models ]
95+ # [END automl_translate_list_models ]
9696
9797
9898def get_model(project_id, compute_region, model_id):
9999 """Get model details."""
100- # [START automl_translation_get_model ]
100+ # [START automl_translate_get_model ]
101101 # TODO(developer): Uncomment and set the following variables
102102 # project_id = 'PROJECT_ID_HERE'
103103 # compute_region = 'COMPUTE_REGION_HERE'
@@ -129,12 +129,12 @@ def get_model(project_id, compute_region, model_id):
129129 print("\tnanos: {}".format(model.create_time.nanos))
130130 print("Model deployment state: {}".format(deployment_state))
131131
132- # [END automl_translation_get_model ]
132+ # [END automl_translate_get_model ]
133133
134134
135135def list_model_evaluations(project_id, compute_region, model_id, filter_):
136136 """List model evaluations."""
137- # [START automl_translation_list_model_evaluations ]
137+ # [START automl_translate_list_model_evaluations ]
138138 # TODO(developer): Uncomment and set the following variables
139139 # project_id = 'PROJECT_ID_HERE'
140140 # compute_region = 'COMPUTE_REGION_HERE'
@@ -152,14 +152,14 @@ def list_model_evaluations(project_id, compute_region, model_id, filter_):
152152 for element in client.list_model_evaluations(model_full_id, filter_):
153153 print(element)
154154
155- # [END automl_translation_list_model_evaluations ]
155+ # [END automl_translate_list_model_evaluations ]
156156
157157
158158def get_model_evaluation(
159159 project_id, compute_region, model_id, model_evaluation_id
160160):
161161 """Get model evaluation."""
162- # [START automl_translation_get_model_evaluation ]
162+ # [START automl_translate_get_model_evaluation ]
163163 # TODO(developer): Uncomment and set the following variables
164164 # project_id = 'PROJECT_ID_HERE'
165165 # compute_region = 'COMPUTE_REGION_HERE'
@@ -180,12 +180,12 @@ def get_model_evaluation(
180180
181181 print(response)
182182
183- # [END automl_translation_get_model_evaluation ]
183+ # [END automl_translate_get_model_evaluation ]
184184
185185
186186def delete_model(project_id, compute_region, model_id):
187187 """Delete a model."""
188- # [START automl_translation_delete_model ]
188+ # [START automl_translate_delete_model ]
189189 # TODO(developer): Uncomment and set the following variables
190190 # project_id = 'PROJECT_ID_HERE'
191191 # compute_region = 'COMPUTE_REGION_HERE'
@@ -204,12 +204,12 @@ def delete_model(project_id, compute_region, model_id):
204204 # synchronous check of operation status.
205205 print("Model deleted. {}".format(response.result()))
206206
207- # [END automl_translation_delete_model ]
207+ # [END automl_translate_delete_model ]
208208
209209
210210def get_operation_status(operation_full_id):
211211 """Get operation status."""
212- # [START automl_translation_get_operation_status ]
212+ # [START automl_translate_get_operation_status ]
213213 # TODO(developer): Uncomment and set the following variables
214214 # operation_full_id =
215215 # 'projects/<projectId>/locations/<region>/operations/<operationId>'
@@ -225,7 +225,7 @@ def get_operation_status(operation_full_id):
225225
226226 print("Operation status: {}".format(response))
227227
228- # [END automl_translation_get_operation_status ]
228+ # [END automl_translate_get_operation_status ]
229229
230230
231231if __name__ == "__main__":
0 commit comments