MS Azure Automated ML - Output JSON being sent as text

Viewed 70

I have started using Azure ML Studio and have come across an issue with the Automated ML model. I create an AutoML run and get a decent precision. I deploy the model and get an endpoint using the out-of-the-box deploy button. I use postman to test the endpoint and get a response. But the response is in text format.

What i'm getting:

"{\"result\": [\"Prediction Label X\"]}"
What i'm expecting:
{"result":["Prediction Label X"]}

Postman has Accept and Content-Type both set to application/json.

Of course i could clean this text response up and parse it as JSON, but i'd rather get it directly from Azure in the correct format.

There doesnt appear to be anywhere in the ML Studio to modify the code or response format and i'm new to the Azure Studio.

Any thoughts?

1 Answers

The service is returning the raw text, you can use the json.loads(response.content.decode("utf-8")) to convert to Json.

Related