Skip to content

Commit de432f6

Browse files
alixhamibusunkim96
authored andcommitted
Update AutoML region tags to use standard product prefixes [(#1669)](#1669)
1 parent 32adfc4 commit de432f6

File tree

3 files changed

+26
-26
lines changed

3 files changed

+26
-26
lines changed

translation/samples/snippets/automl_translation_dataset.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
def create_dataset(project_id, compute_region, dataset_name, source, target):
2929
"""Create a dataset."""
30-
# [START automl_translation_create_dataset]
30+
# [START automl_translate_create_dataset]
3131
# TODO(developer): Uncomment and set the following variables
3232
# project_id = 'PROJECT_ID_HERE'
3333
# compute_region = 'COMPUTE_REGION_HERE'
@@ -75,12 +75,12 @@ def create_dataset(project_id, compute_region, dataset_name, source, target):
7575
print("\tseconds: {}".format(dataset.create_time.seconds))
7676
print("\tnanos: {}".format(dataset.create_time.nanos))
7777

78-
# [END automl_translation_create_dataset]
78+
# [END automl_translate_create_dataset]
7979

8080

8181
def list_datasets(project_id, compute_region, filter_):
8282
"""List Datasets."""
83-
# [START automl_translation_list_datasets]
83+
# [START automl_translate_list_datasets]
8484
# TODO(developer): Uncomment and set the following variables
8585
# project_id = 'PROJECT_ID_HERE'
8686
# compute_region = 'COMPUTE_REGION_HERE'
@@ -117,12 +117,12 @@ def list_datasets(project_id, compute_region, filter_):
117117
print("\tseconds: {}".format(dataset.create_time.seconds))
118118
print("\tnanos: {}".format(dataset.create_time.nanos))
119119

120-
# [END automl_translation_list_datasets]
120+
# [END automl_translate_list_datasets]
121121

122122

123123
def get_dataset(project_id, compute_region, dataset_id):
124124
"""Get the dataset."""
125-
# [START automl_translation_get_dataset]
125+
# [START automl_translate_get_dataset]
126126
# TODO(developer): Uncomment and set the following variables
127127
# project_id = 'PROJECT_ID_HERE'
128128
# compute_region = 'COMPUTE_REGION_HERE'
@@ -159,12 +159,12 @@ def get_dataset(project_id, compute_region, dataset_id):
159159
print("\tseconds: {}".format(dataset.create_time.seconds))
160160
print("\tnanos: {}".format(dataset.create_time.nanos))
161161

162-
# [END automl_translation_get_dataset]
162+
# [END automl_translate_get_dataset]
163163

164164

165165
def import_data(project_id, compute_region, dataset_id, path):
166166
"""Import sentence pairs to the dataset."""
167-
# [START automl_translation_import_data]
167+
# [START automl_translate_import_data]
168168
# TODO(developer): Uncomment and set the following variables
169169
# project_id = 'PROJECT_ID_HERE'
170170
# compute_region = 'COMPUTE_REGION_HERE'
@@ -191,12 +191,12 @@ def import_data(project_id, compute_region, dataset_id, path):
191191
# synchronous check of operation status
192192
print("Data imported. {}".format(response.result()))
193193

194-
# [END automl_translation_import_data]
194+
# [END automl_translate_import_data]
195195

196196

197197
def delete_dataset(project_id, compute_region, dataset_id):
198198
"""Delete a dataset."""
199-
# [START automl_translation_delete_dataset]]
199+
# [START automl_translate_delete_dataset]]
200200
# TODO(developer): Uncomment and set the following variables
201201
# project_id = 'PROJECT_ID_HERE'
202202
# compute_region = 'COMPUTE_REGION_HERE'
@@ -217,7 +217,7 @@ def delete_dataset(project_id, compute_region, dataset_id):
217217
# synchronous check of operation status
218218
print("Dataset deleted. {}".format(response.result()))
219219

220-
# [END automl_translation_delete_dataset]
220+
# [END automl_translate_delete_dataset]
221221

222222

223223
if __name__ == "__main__":

translation/samples/snippets/automl_translation_model.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
def 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

6060
def 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

9898
def 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

135135
def 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

158158
def 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

186186
def 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

210210
def 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

231231
if __name__ == "__main__":

translation/samples/snippets/automl_translation_predict.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
def predict(project_id, compute_region, model_id, file_path):
2929
"""Translate the content."""
30-
# [START automl_translation_predict]
30+
# [START automl_translate_predict]
3131
# project_id = 'PROJECT_ID_HERE'
3232
# compute_region = 'COMPUTE_REGION_HERE'
3333
# model_id = 'MODEL_ID_HERE'
@@ -61,7 +61,7 @@ def predict(project_id, compute_region, model_id, file_path):
6161

6262
print(u"Translated content: {}".format(translated_content.content))
6363

64-
# [END automl_translation_predict]
64+
# [END automl_translate_predict]
6565

6666

6767
if __name__ == "__main__":

0 commit comments

Comments
 (0)