Skip to content

Commit

Permalink
docs: endpoint.create => aiplatform.Endpoint.create (#1153)
Browse files Browse the repository at this point in the history
* endpoint.create => aiplatform.Endpoint.create

Fix error in code example

* Move endpoint.predict(...) after endpoint creation

Co-authored-by: nayaknishant <nishantnayak@google.com>
  • Loading branch information
ageron and nayaknishant committed Apr 11, 2022
1 parent 0ba88f0 commit 1122a26
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -316,18 +316,11 @@ 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
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:

Expand All @@ -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
Expand Down

0 comments on commit 1122a26

Please sign in to comment.