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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add clarity to parameters per user feedback #886

Merged
merged 8 commits into from Dec 7, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 9 additions & 1 deletion samples/model-builder/predict_tabular_classification_sample.py
Expand Up @@ -22,9 +22,17 @@
def predict_tabular_classification_sample(
project: str, location: str, endpoint: str, instances: List[Dict],
andrewferlitsch marked this conversation as resolved.
Show resolved Hide resolved
):
'''
Args
project: Your project ID or project number.
location: Region where Endpoint is located. For example, 'us-central1'.
endpoint: A fully qualified endpoint name or endpoint ID. Example: "projects/123/locations/us-central1/endpoints/456" or
andrewferlitsch marked this conversation as resolved.
Show resolved Hide resolved
| "456" when project and location are initialized or passed.
instances: A list of one or more instances (examples) to return a prediction for.
'''
aiplatform.init(project=project, location=location)

endpoint = aiplatform.Endpoint(endpoint)
endpoint = aiplatform.Endpoint(endpoint_name)

response = endpoint.predict(instances=instances)

Expand Down