The Azure ML Studio Test interface presents me with a JSON template to send as a Post Request payload:
{
"input_data": {
"columns": [
"content_type",
"project_name",
"source_words",
"source_text",
"target_locale",
"evaluated_phase",
"evaluated_translation",
"evaluated_vendor",
"lqe_phase"
],
"index": [],
"data": []
}
}
I am completing it as follows:
{
"input_data": {
"columns": [
"content_type",
"project_name",
"source_words",
"source_text",
"target_locale",
"evaluated_phase",
"evaluated_translation",
"evaluated_vendor",
"lqe_phase"
],
"index": [],
"data": [
{
"content_type": "some text",
"project_name": "some text",
"source_words": 1267,
"source_text": "some text",
"target_locale": "text",
"evaluated_phase": "more text",
"evaluated_translation": "text text",
"evaluated_vendor": "text",
"lqe_phase": "final text"
}
]
}
}
All input fields except source_words
are text, source_words
being int
.
I continually get the error:
InnerException: ValueError: ['source_words']: Found array with 0 sample(s) (shape=(0, 1)) while a minimum of 1 is required.
Can anyone tell me what's likely wrong here?
Update 2023-10-05
Have deployed several other models and all give the same error.
Based on provided information it seems the issue is with the input format. One possible solution is to properly format the input.
You can check the swagger input format for your model. For this you can check
Swagger URI
to get proper the input format and check this thread for more info. Alternate you can also try to format the input based on below shown python code snippet example (Modify the input as per your definition):With this you'll get properly formatted input for your endpoint testing.
For further details you can check this thread.