question

AbhishekRao-9629 avatar image
0 Votes"
AbhishekRao-9629 asked ramr-msft answered

Python code deployment using Azureml and swaggee json

Hii..I am trying to deploy a model built in python using azureml-model-management-sdk package and then writing to swagger json. The python function - the model simply takes 2 inputs and give an output.
Both the inputs are string and can contain special characters like ', " / etc. Have added the handling of such special characters in the python code itself using re. But when the inputs contain these characters in the deployment setup it gives an error saying http 400 bad request. Is there a way to allow single and double quotes in the json directly to rectify this issue. Have searched all over the internet but haven't found a solution for the same. Please help.

azure-machine-learning
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ramr-msft avatar image
0 Votes"
ramr-msft answered

@AbhishekRao-9629 Thanks for the question. Can you please share the score.py to check the schema and If you've enabled an OpenAPI(Swagger) specification for your deployment, you can use tools such as swagger-codegen to create client libraries for your service.
Please follow the samples to consume an Azure Machine Learning model deployed as a web service.


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@AbhishekRao-9629 Just checking any update on this. If this helps your query, do click Up-Vote for the same, which might be beneficial to other community members reading this thread. And, if you have any further query do let us know.

0 Votes 0 ·