27
27
28
28
def create_model (project_id , compute_region , dataset_id , model_name ):
29
29
"""Create a model."""
30
- # [START automl_translation_create_model ]
30
+ # [START automl_translate_create_model ]
31
31
# TODO(developer): Uncomment and set the following variables
32
32
# project_id = 'PROJECT_ID_HERE'
33
33
# compute_region = 'COMPUTE_REGION_HERE'
@@ -54,12 +54,12 @@ def create_model(project_id, compute_region, dataset_id, model_name):
54
54
print ("Training operation name: {}" .format (response .operation .name ))
55
55
print ("Training started..." )
56
56
57
- # [END automl_translation_create_model ]
57
+ # [END automl_translate_create_model ]
58
58
59
59
60
60
def list_models (project_id , compute_region , filter_ ):
61
61
"""List all models."""
62
- # [START automl_translation_list_models ]
62
+ # [START automl_translate_list_models ]
63
63
# TODO(developer): Uncomment and set the following variables
64
64
# project_id = 'PROJECT_ID_HERE'
65
65
# compute_region = 'COMPUTE_REGION_HERE'
@@ -92,12 +92,12 @@ def list_models(project_id, compute_region, filter_):
92
92
print ("\t nanos: {}" .format (model .create_time .nanos ))
93
93
print ("Model deployment state: {}" .format (deployment_state ))
94
94
95
- # [END automl_translation_list_models ]
95
+ # [END automl_translate_list_models ]
96
96
97
97
98
98
def get_model (project_id , compute_region , model_id ):
99
99
"""Get model details."""
100
- # [START automl_translation_get_model ]
100
+ # [START automl_translate_get_model ]
101
101
# TODO(developer): Uncomment and set the following variables
102
102
# project_id = 'PROJECT_ID_HERE'
103
103
# compute_region = 'COMPUTE_REGION_HERE'
@@ -129,12 +129,12 @@ def get_model(project_id, compute_region, model_id):
129
129
print ("\t nanos: {}" .format (model .create_time .nanos ))
130
130
print ("Model deployment state: {}" .format (deployment_state ))
131
131
132
- # [END automl_translation_get_model ]
132
+ # [END automl_translate_get_model ]
133
133
134
134
135
135
def list_model_evaluations (project_id , compute_region , model_id , filter_ ):
136
136
"""List model evaluations."""
137
- # [START automl_translation_list_model_evaluations ]
137
+ # [START automl_translate_list_model_evaluations ]
138
138
# TODO(developer): Uncomment and set the following variables
139
139
# project_id = 'PROJECT_ID_HERE'
140
140
# compute_region = 'COMPUTE_REGION_HERE'
@@ -152,14 +152,14 @@ def list_model_evaluations(project_id, compute_region, model_id, filter_):
152
152
for element in client .list_model_evaluations (model_full_id , filter_ ):
153
153
print (element )
154
154
155
- # [END automl_translation_list_model_evaluations ]
155
+ # [END automl_translate_list_model_evaluations ]
156
156
157
157
158
158
def get_model_evaluation (
159
159
project_id , compute_region , model_id , model_evaluation_id
160
160
):
161
161
"""Get model evaluation."""
162
- # [START automl_translation_get_model_evaluation ]
162
+ # [START automl_translate_get_model_evaluation ]
163
163
# TODO(developer): Uncomment and set the following variables
164
164
# project_id = 'PROJECT_ID_HERE'
165
165
# compute_region = 'COMPUTE_REGION_HERE'
@@ -180,12 +180,12 @@ def get_model_evaluation(
180
180
181
181
print (response )
182
182
183
- # [END automl_translation_get_model_evaluation ]
183
+ # [END automl_translate_get_model_evaluation ]
184
184
185
185
186
186
def delete_model (project_id , compute_region , model_id ):
187
187
"""Delete a model."""
188
- # [START automl_translation_delete_model ]
188
+ # [START automl_translate_delete_model ]
189
189
# TODO(developer): Uncomment and set the following variables
190
190
# project_id = 'PROJECT_ID_HERE'
191
191
# compute_region = 'COMPUTE_REGION_HERE'
@@ -204,12 +204,12 @@ def delete_model(project_id, compute_region, model_id):
204
204
# synchronous check of operation status.
205
205
print ("Model deleted. {}" .format (response .result ()))
206
206
207
- # [END automl_translation_delete_model ]
207
+ # [END automl_translate_delete_model ]
208
208
209
209
210
210
def get_operation_status (operation_full_id ):
211
211
"""Get operation status."""
212
- # [START automl_translation_get_operation_status ]
212
+ # [START automl_translate_get_operation_status ]
213
213
# TODO(developer): Uncomment and set the following variables
214
214
# operation_full_id =
215
215
# 'projects/<projectId>/locations/<region>/operations/<operationId>'
@@ -225,7 +225,7 @@ def get_operation_status(operation_full_id):
225
225
226
226
print ("Operation status: {}" .format (response ))
227
227
228
- # [END automl_translation_get_operation_status ]
228
+ # [END automl_translate_get_operation_status ]
229
229
230
230
231
231
if __name__ == "__main__" :
0 commit comments