Skip to content

Commit 1122a26

Browse files
ageronnayaknishant
andauthored
docs: endpoint.create => aiplatform.Endpoint.create (#1153)
* endpoint.create => aiplatform.Endpoint.create Fix error in code example * Move endpoint.predict(...) after endpoint creation Co-authored-by: nayaknishant <[email protected]>
1 parent 0ba88f0 commit 1122a26

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

README.rst

+8-9
Original file line numberDiff line numberDiff line change
@@ -316,18 +316,11 @@ You can also create a batch prediction job asynchronously by including the `sync
316316
Endpoints
317317
---------
318318

319-
To get predictions from endpoints:
320-
321-
.. code-block:: Python
322-
323-
endpoint.predict(instances=[[6.7, 3.1, 4.7, 1.5], [4.6, 3.1, 1.5, 0.2]])
324-
325-
326-
To create an endpoint
319+
To create an endpoint:
327320

328321
.. code-block:: Python
329322
330-
endpoint = endpoint.create(display_name='my-endpoint')
323+
endpoint = aiplatform.Endpoint.create(display_name='my-endpoint')
331324
332325
To deploy a model to a created endpoint:
333326

@@ -342,6 +335,12 @@ To deploy a model to a created endpoint:
342335
accelerator_type='NVIDIA_TESLA_K80',
343336
accelerator_count=1)
344337
338+
To get predictions from endpoints:
339+
340+
.. code-block:: Python
341+
342+
endpoint.predict(instances=[[6.7, 3.1, 4.7, 1.5], [4.6, 3.1, 1.5, 0.2]])
343+
345344
To undeploy models from an endpoint:
346345

347346
.. code-block:: Python

0 commit comments

Comments
 (0)