Bug in api while doing curl


#1

When we try deploy a model of a catagorical data, in web interface u have dropdown of catagorical data. But in curl utility, i can pass any value apart from the catagories mentioned.

I can see an error in logs also, ValueError: y contains new labels: [996], but the o/p gives me prodicted values:

curl -X POST “http://10.1.248.24:8881/models/ossec_test/v2/predict” -F “Bucketid”=“996” -F “Frequency”=“12” -F “Ruleid”=“52002”
{
“base_path”: “ossec_test/v2”,
“predictions”: “100”,
“probabilities”: “0.8134”,
“status”: “OK”,
“type”: “Categorical”
}

-Sitesh


#2

yes, the curl API does not do validation like the webapp. For now, we expect users to pass the values to be one of values used in training for categorical variables.

In future release, we will add validation to curl requests as well.