Reputation: 11
Upvotes: 1
Views: 146
Reputation: 1
The instructions in the Vertex AI "Sample Request" popup guide are wrong. Here's what the guide suggested, and what you're doing:
predict_tabular_classification_sample(
project="930429533881",
endpoint_id="6309734392969297920",
location="us-central1",
instances=[{ "feature_column_a": "value", "feature_column_b": "value" ...}, {...}]
)
But here's the function as defined in https://github.com/googleapis/python-aiplatform/blob/main/samples/snippets/prediction_service/predict_tabular_classification_sample.py
def predict_tabular_classification_sample(
project: str,
endpoint_id: str,
instance_dict: Dict,
location: str = "us-central1",
api_endpoint: str = "us-central1-aiplatform.googleapis.com", ):
Spot the problem? The argument should be instance_dict
, not instances
.
Upvotes: 0