Batch Prediction with scikit-learn using jsonl in Vertex AI

343 Views Asked by At

I have a scikit-learn model successfully trained and loaded onto Vertex AI, but I can't seem to do batch prediction with jsonl. I've tried using these formats with jsonl:

{"dense_input": [1, 2, 3, ...]}
{"dense_input": [4, 5, 6, ...]}

and

{"val_1": 1, "val_2": 2, ...}
{"val_1": 4, "val_2": 5, ...}

but I get this error for both:

('Post request fails. Cannot get predictions. Error: Predictions are not in the response. Got: {"error": "Prediction failed: Exception during sklearn prediction: float() argument must be a string or a number, not 'dict'"}.', 2)

I've tried batch prediction using a CSV file and it works fine, but I'm having difficulty with the jsonl file. Does anyone know what's the problem? Thanks!

0

There are 0 best solutions below