Skip to content Skip to sidebar Skip to footer

How To Generate The Json Format For Google Cloud Predictions

I am trying to make predictions from my custom model on Vertex AI but am getting errors. I have deployed the model to an endpoint and I request prediction using this line gcloud be

Solution 1:

This worked for me:

If you train the model with df.values as per raj's answer, you can then pass the instances you want to get batch predictions from in a jsonl file ("input.jsonl" for example) with the following format for each instance/row:

    [3.0,1.0,30.0,1.0,0.0,16.1]

File would look something like this for 5 rows to predict:

    [3.0,1.0,30.0,1.0,0.0,16.1]
    [3.0,0.0,22.0,0.0,0.0,9.8375]
    [2.0,0.0,45.0,1.0,1.0,26.25]
    [1.0,0.0,21.0,0.0,0.0,26.55]
    [3.0,1.0,16.0,4.0,1.0,39.6875]

Post a Comment for "How To Generate The Json Format For Google Cloud Predictions"