8000 Changed the endpoint from v1beta1 to v1 (#917) · merla18/python-docs-samples@0a3e0c5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0a3e0c5

Browse files
rhaertel80elibixby
authored andcommitted
Changed the endpoint from v1beta1 to v1 (GoogleCloudPlatform#917)
* Changed the endpoint from v1beta1 to v1 * Update predict.py
1 parent 6d062e7 commit 0a3e0c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ml_engine/online_prediction/predict.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def predict_json(project, model, instances, version=None):
4343
# Create the ML Engine service object.
4444
# To authenticate set the environment variable
4545
# GOOGLE_APPLICATION_CREDENTIALS=<path_to_service_account_file>
46-
service = googleapiclient.discovery.build('ml', 'v1beta1')
46+
service = googleapiclient.discovery.build('ml', 'v1')
4747
name = 'projects/{}/models/{}'.format(project, model)
4848

4949
if version is not None:
@@ -80,7 +80,7 @@ def predict_examples(project,
8080
Mapping[str: any]: dictionary of prediction results defined by the
8181
model.
8282
"""
83-
service = googleapiclient.discovery.build('ml', 'v1beta1')
83+
service = googleapiclient.discovery.build('ml', 'v1')
8484
name = 'projects/{}/models/{}'.format(project, model)
8585

8686
if version is not None:

0 commit comments

Comments
 (0)
0