From 66fcbff43d3fd128252753983d6f7ccaa06c1312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Geron?= Date: Sat, 9 Apr 2022 08:49:01 +1200 Subject: [PATCH 1/2] endpoint.create => aiplatform.Endpoint.create Fix error in code example --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index c0bb3fd5b3..e7d1a84c55 100644 --- a/README.rst +++ b/README.rst @@ -323,11 +323,11 @@ To get predictions from endpoints: endpoint.predict(instances=[[6.7, 3.1, 4.7, 1.5], [4.6, 3.1, 1.5, 0.2]]) -To create an endpoint +To create an endpoint: .. code-block:: Python - endpoint = endpoint.create(display_name='my-endpoint') + endpoint = aiplatform.Endpoint.create(display_name='my-endpoint') To deploy a model to a created endpoint: From 6ec20dec23c90dcf69e14d17d6fdb9a52c0871cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Geron?= Date: Sat, 9 Apr 2022 10:52:03 +1200 Subject: [PATCH 2/2] Move endpoint.predict(...) after endpoint creation --- README.rst | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/README.rst b/README.rst index e7d1a84c55..c5232b5b5b 100644 --- a/README.rst +++ b/README.rst @@ -316,13 +316,6 @@ You can also create a batch prediction job asynchronously by including the `sync Endpoints --------- -To get predictions from endpoints: - -.. code-block:: Python - - endpoint.predict(instances=[[6.7, 3.1, 4.7, 1.5], [4.6, 3.1, 1.5, 0.2]]) - - To create an endpoint: .. code-block:: Python @@ -342,6 +335,12 @@ To deploy a model to a created endpoint: accelerator_type='NVIDIA_TESLA_K80', accelerator_count=1) +To get predictions from endpoints: + +.. code-block:: Python + + endpoint.predict(instances=[[6.7, 3.1, 4.7, 1.5], [4.6, 3.1, 1.5, 0.2]]) + To undeploy models from an endpoint: .. code-block:: Python