Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 58522c2

Browse filesBrowse files
authored
Update AutoML region tags to use standard product prefixes (GoogleCloudPlatform#1669)
1 parent 6a0436f commit 58522c2
Copy full SHA for 58522c2
Expand file treeCollapse file tree

6 files changed

+56
-56
lines changed

‎language/automl/automl_natural_language_dataset.py

Copy file name to clipboardExpand all lines: language/automl/automl_natural_language_dataset.py
+12-12Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
def create_dataset(project_id, compute_region, dataset_name, multilabel=False):
2929
"""Create a dataset."""
30-
# [START automl_natural_language_create_dataset]
30+
# [START automl_language_create_dataset]
3131
# TODO(developer): Uncomment and set the following variables
3232
# project_id = 'PROJECT_ID_HERE'
3333
# compute_region = 'COMPUTE_REGION_HERE'
@@ -69,12 +69,12 @@ def create_dataset(project_id, compute_region, dataset_name, multilabel=False):
6969
print("\tseconds: {}".format(dataset.create_time.seconds))
7070
print("\tnanos: {}".format(dataset.create_time.nanos))
7171

72-
# [END automl_natural_language_create_dataset]
72+
# [END automl_language_create_dataset]
7373

7474

7575
def list_datasets(project_id, compute_region, filter_):
7676
"""List all datasets."""
77-
# [START automl_natural_language_list_datasets]
77+
# [START automl_language_list_datasets]
7878
# TODO(developer): Uncomment and set the following variables
7979
# project_id = 'PROJECT_ID_HERE'
8080
# compute_region = 'COMPUTE_REGION_HERE'
@@ -103,12 +103,12 @@ def list_datasets(project_id, compute_region, filter_):
103103
print("\tseconds: {}".format(dataset.create_time.seconds))
104104
print("\tnanos: {}".format(dataset.create_time.nanos))
105105

106-
# [END automl_natural_language_list_datasets]
106+
# [END automl_language_list_datasets]
107107

108108

109109
def get_dataset(project_id, compute_region, dataset_id):
110110
"""Get the dataset."""
111-
# [START automl_natural_language_get_dataset]
111+
# [START automl_language_get_dataset]
112112
# TODO(developer): Uncomment and set the following variables
113113
# project_id = 'PROJECT_ID_HERE'
114114
# compute_region = 'COMPUTE_REGION_HERE'
@@ -137,12 +137,12 @@ def get_dataset(project_id, compute_region, dataset_id):
137137
print("\tseconds: {}".format(dataset.create_time.seconds))
138138
print("\tnanos: {}".format(dataset.create_time.nanos))
139139

140-
# [END automl_natural_language_get_dataset]
140+
# [END automl_language_get_dataset]
141141

142142

143143
def import_data(project_id, compute_region, dataset_id, path):
144144
"""Import labelled items."""
145-
# [START automl_natural_language_import_data]
145+
# [START automl_language_import_data]
146146
# TODO(developer): Uncomment and set the following variables
147147
# project_id = 'PROJECT_ID_HERE'
148148
# compute_region = 'COMPUTE_REGION_HERE'
@@ -169,12 +169,12 @@ def import_data(project_id, compute_region, dataset_id, path):
169169
# synchronous check of operation status.
170170
print("Data imported. {}".format(response.result()))
171171

172-
# [END automl_natural_language_import_data]
172+
# [END automl_language_import_data]
173173

174174

175175
def export_data(project_id, compute_region, dataset_id, output_uri):
176176
"""Export a dataset to a Google Cloud Storage bucket."""
177-
# [START automl_natural_language_export_data]
177+
# [START automl_language_export_data]
178178
# TODO(developer): Uncomment and set the following variables
179179
# project_id = 'PROJECT_ID_HERE'
180180
# compute_region = 'COMPUTE_REGION_HERE'
@@ -200,12 +200,12 @@ def export_data(project_id, compute_region, dataset_id, output_uri):
200200
# synchronous check of operation status.
201201
print("Data exported. {}".format(response.result()))
202202

203-
# [END automl_natural_language_export_data]
203+
# [END automl_language_export_data]
204204

205205

206206
def delete_dataset(project_id, compute_region, dataset_id):
207207
"""Delete a dataset."""
208-
# [START automl_natural_language_delete_dataset]
208+
# [START automl_language_delete_dataset]
209209
# TODO(developer): Uncomment and set the following variables
210210
# project_id = 'PROJECT_ID_HERE'
211211
# compute_region = 'COMPUTE_REGION_HERE'
@@ -226,7 +226,7 @@ def delete_dataset(project_id, compute_region, dataset_id):
226226
# synchronous check of operation status.
227227
print("Dataset deleted. {}".format(response.result()))
228228

229-
# [END automl_natural_language_delete_dataset]
229+
# [END automl_language_delete_dataset]
230230

231231

232232
if __name__ == "__main__":

‎language/automl/automl_natural_language_model.py

Copy file name to clipboardExpand all lines: language/automl/automl_natural_language_model.py
+16-16Lines changed: 16 additions & 16 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_natural_language_create_model]
30+
# [START automl_language_create_model]
3131
# TODO(developer): Uncomment and set the following variables
3232
# project_id = 'PROJECT_ID_HERE'
3333
# compute_region = 'COMPUTE_REGION_HERE'
@@ -53,12 +53,12 @@ def create_model(project_id, compute_region, dataset_id, model_name):
5353
print("Training operation name: {}".format(response.operation.name))
5454
print("Training started...")
5555

56-
# [END automl_natural_language_create_model]
56+
# [END automl_language_create_model]
5757

5858

5959
def get_operation_status(operation_full_id):
6060
"""Get operation status."""
61-
# [START automl_natural_language_get_operation_status]
61+
# [START automl_language_get_operation_status]
6262
# TODO(developer): Uncomment and set the following variables
6363
# operation_full_id =
6464
# 'projects/<projectId>/locations/<region>/operations/<operationId>'
@@ -74,12 +74,12 @@ def get_operation_status(operation_full_id):
7474

7575
print("Operation status: {}".format(response))
7676

77-
# [END automl_natural_language_get_operation_status]
77+
# [END automl_language_get_operation_status]
7878

7979

8080
def list_models(project_id, compute_region, filter_):
8181
"""List all models."""
82-
# [START automl_natural_language_list_models]
82+
# [START automl_language_list_models]
8383
# TODO(developer): Uncomment and set the following variables
8484
# project_id = 'PROJECT_ID_HERE'
8585
# compute_region = 'COMPUTE_REGION_HERE'
@@ -114,12 +114,12 @@ def list_models(project_id, compute_region, filter_):
114114
print("\tnanos: {}".format(model.create_time.nanos))
115115
print("Model deployment state: {}".format(deployment_state))
116116

117-
# [END automl_natural_language_list_models]
117+
# [END automl_language_list_models]
118118

119119

120120
def get_model(project_id, compute_region, model_id):
121121
"""Get model details."""
122-
# [START automl_natural_language_get_model]
122+
# [START automl_language_get_model]
123123
# TODO(developer): Uncomment and set the following variables
124124
# project_id = 'PROJECT_ID_HERE'
125125
# compute_region = 'COMPUTE_REGION_HERE'
@@ -152,12 +152,12 @@ def get_model(project_id, compute_region, model_id):
152152
print("\tnanos: {}".format(model.create_time.nanos))
153153
print("Model deployment state: {}".format(deployment_state))
154154

155-
# [END automl_natural_language_get_model]
155+
# [END automl_language_get_model]
156156

157157

158158
def list_model_evaluations(project_id, compute_region, model_id, filter_):
159159
"""List model evaluations."""
160-
# [START automl_natural_language_list_model_evaluations]
160+
# [START automl_language_list_model_evaluations]
161161
# TODO(developer): Uncomment and set the following variables
162162
# project_id = 'PROJECT_ID_HERE'
163163
# compute_region = 'COMPUTE_REGION_HERE'
@@ -178,14 +178,14 @@ def list_model_evaluations(project_id, compute_region, model_id, filter_):
178178
for element in response:
179179
print(element)
180180

181-
# [END automl_natural_language_list_model_evaluations]
181+
# [END automl_language_list_model_evaluations]
182182

183183

184184
def get_model_evaluation(
185185
project_id, compute_region, model_id, model_evaluation_id
186186
):
187187
"""Get model evaluation."""
188-
# [START automl_natural_language_get_model_evaluation]
188+
# [START automl_language_get_model_evaluation]
189189
# TODO(developer): Uncomment and set the following variables
190190
# project_id = 'PROJECT_ID_HERE'
191191
# compute_region = 'COMPUTE_REGION_HERE'
@@ -206,12 +206,12 @@ def get_model_evaluation(
206206

207207
print(response)
208208

209-
# [END automl_natural_language_get_model_evaluation]
209+
# [END automl_language_get_model_evaluation]
210210

211211

212212
def display_evaluation(project_id, compute_region, model_id, filter_):
213213
"""Display evaluation."""
214-
# [START automl_natural_language_display_evaluation]
214+
# [START automl_language_display_evaluation]
215215
# TODO(developer): Uncomment and set the following variables
216216
# project_id = 'PROJECT_ID_HERE'
217217
# compute_region = 'COMPUTE_REGION_HERE'
@@ -281,12 +281,12 @@ def display_evaluation(project_id, compute_region, model_id, filter_):
281281
)
282282
)
283283

284-
# [END automl_natural_language_display_evaluation]
284+
# [END automl_language_display_evaluation]
285285

286286

287287
def delete_model(project_id, compute_region, model_id):
288288
"""Delete a model."""
289-
# [START automl_natural_language_delete_model]
289+
# [START automl_language_delete_model]
290290
# TODO(developer): Uncomment and set the following variables
291291
# project_id = 'PROJECT_ID_HERE'
292292
# compute_region = 'COMPUTE_REGION_HERE'
@@ -305,7 +305,7 @@ def delete_model(project_id, compute_region, model_id):
305305
# synchronous check of operation status.
306306
print("Model deleted. {}".format(response.result()))
307307

308-
# [END automl_natural_language_delete_model]
308+
# [END automl_language_delete_model]
309309

310310

311311
if __name__ == "__main__":

‎language/automl/automl_natural_language_predict.py

Copy file name to clipboardExpand all lines: language/automl/automl_natural_language_predict.py
+2-2Lines 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
"""Classify the content."""
30-
# [START automl_natural_language_predict]
30+
# [START automl_language_predict]
3131
# TODO(developer): Uncomment and set the following variables
3232
# project_id = 'PROJECT_ID_HERE'
3333
# compute_region = 'COMPUTE_REGION_HERE'
@@ -62,7 +62,7 @@ def predict(project_id, compute_region, model_id, file_path):
6262
print("Predicted class name: {}".format(result.display_name))
6363
print("Predicted class score: {}".format(result.classification.score))
6464

65-
# [END automl_natural_language_predict]
65+
# [END automl_language_predict]
6666

6767

6868
if __name__ == "__main__":

‎translate/automl/automl_translation_dataset.py

Copy file name to clipboardExpand all lines: translate/automl/automl_translation_dataset.py
+10-10Lines 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__":

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.