I have trained and deployed a FbProphet Time-series model using Mlflow in the Azure-ML . The model was properly registered and logged with all the required entities. I was able to deploy the model in Azure-ML and generate the endpoints.
My training Dataframe (which i used for training the Prophet mode) looks like :
df = pd.DataFrame({'ds': ['2023-01-01 00:00:00', '2023-01-01 01:00:00', '2023-01-01 02:00:00', '2023-01-01 03:00:00'],
'y': [20, 21, 19, 18]})
Now I want to test those endpoints. Under the testing-section, I see error while trying to give input. The interface for taking input looks like :
{
"input_data" :
}
I am unable to figure out,
exactly what data (please provide example) and in which format should be entered here to test my time-series prophet model.?
P.S. - I know that for prediction prophet takes Dataframe (which contains dates in the column named as 'ds') as an input to predict the future values. But in the Azure-testing interface there is no provision to enter a Dataframe (or if there, i do not know how to do it).
Also even for utilizing the end-points in the code I need to know the type and format of input_data required for consumption of end-points.
I have tried many combinations and every time I am getting error.
for e.g.
- using json on the data
json.dumps({'data': df.to_dict(orient='records')})
and feeding the its output here as :
{
"input_data":[{"ds": "2021-01-01 00:00:00", "y": 23.55}, {"ds": "2021-01-01 01:00:00", "y": 26.28}]
}
Error - Failed to test real-time endpoint {"message":"only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices"}
2- trying other combinations
{
"input_data" :{"ds":{"1":"2023-04-01 22:00:00", "2": "2023-04-01 23:00:00"}
}
Error: Failed to test real-time endpoint {"message":"POST body could not be decoded as JSON: Expecting ',' delimiter: line 3 column 2 (char 81)"}
3- feeding only dates
{
"input_data" :["2023-04-01 22:00:00","2023-04-01 23:00:00"]
}
then
{
"input_data" :[[1,2], ["2023-04-01 22:00:00","2023-04-01 23:00:00"]]
}
Error : Failed to test real-time endpoint {"message":"only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices"}
And likewise, i tried many more ways. But not able to figure out my mistake. Please help me, what i am missing-out ? I am new to deploying a Time-Series model.