Hiya! I deployed a customed trained model on google cloud and im currently trying to run it on python. When I deployed the model it said I could "use a simple Python script to get predictions from your active endpoint." Here are the instructions I followed:
I changed the values of the instances to the following (this is the format when doing a JSON request so i believe it should work properly):
did everything required but I kept getting the error :
google.api_core.exceptions.FailedPrecondition: 400 "Prediction failed: Exception during sklearn prediction: Expected 2D array, got 1D array instead:\narray=[{'instances': [[False, 1, 0, 0, 1, 0, 2, 2018, 1, 16, 0, 0, 0, 1, 1, 1, 3], [True, 1, 0, 0, 2, 0, 0, 2018, 1, 13, 0, 13, 0, 2, 1, 1, 3]]}].\nReshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample."
any clues on how i can fix this?
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 |