Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: endpoint.create => aiplatform.Endpoint.create #1153

Merged
merged 3 commits into from
Apr 11, 2022

Conversation

ageron
Copy link
Contributor

@ageron ageron commented Apr 8, 2022

Fix error in code example.

@ageron ageron requested a review from a team as a code owner April 8, 2022 20:49
@product-auto-label product-auto-label bot added the size: xs Pull request size is extra small. label Apr 8, 2022
@nayaknishant
Copy link
Contributor

nayaknishant commented Apr 8, 2022

Hi @ageron thanks for opening a Pull Request, to pass the tests change the title to docs: endpoint.create => aiplatform.Endpoint.create, so it follows conventional commits :). I agree with the change. Can we also move the predict code snippet to after creating an endpoint, so the order would be

from what it is now:

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

endpoint = endpoint.create(display_name='my-endpoint') 

To deploy a model to a created endpoint:

model = aiplatform.Model('/projects/my-project/locations/us-central1/models/{MODEL_ID}')

endpoint.deploy(model,
                min_replica_count=1,
                max_replica_count=5
                machine_type='n1-standard-4',
                accelerator_type='NVIDIA_TESLA_K80',
                accelerator_count=1)

to what we want (with the change):

To create an endpoint

endpoint = aiplatform.Endpoint.create(display_name='my-endpoint') 

To deploy a model to a created endpoint:

model = aiplatform.Model('/projects/my-project/locations/us-central1/models/{MODEL_ID}')

endpoint.deploy(model,
                min_replica_count=1,
                max_replica_count=5
                machine_type='n1-standard-4',
                accelerator_type='NVIDIA_TESLA_K80',
                accelerator_count=1)

To get predictions from endpoints:

endpoint.predict(instances=[[6.7, 3.1, 4.7, 1.5], [4.6, 3.1, 1.5, 0.2]])

@product-auto-label product-auto-label bot added size: s Pull request size is small. and removed size: xs Pull request size is extra small. labels Apr 8, 2022
@ageron ageron changed the title endpoint.create => aiplatform.Endpoint.create fix: endpoint.create => aiplatform.Endpoint.create Apr 8, 2022
@ageron ageron changed the title fix: endpoint.create => aiplatform.Endpoint.create docs: endpoint.create => aiplatform.Endpoint.create Apr 8, 2022
@ageron
Copy link
Contributor Author

ageron commented Apr 8, 2022

Hi @ageron thanks for opening a Pull Request, to pass the tests change the title to docs: endpoint.create => aiplatform.Endpoint.create, so it follows conventional commits :). I agree with the change. Can we also move the predict code snippet to after creating an endpoint, so the order would be [...]

Thanks for your quick feedback. Done.

@nayaknishant nayaknishant added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 11, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 11, 2022
@nayaknishant nayaknishant added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 11, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 11, 2022
@nayaknishant nayaknishant merged commit 1122a26 into googleapis:main Apr 11, 2022
@ageron ageron deleted the patch-1 branch April 12, 2022 01:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants