modelfoxdotdev / modelfox

ModelFox makes it easy to train, deploy, and monitor machine learning models.
Other
1.46k stars 63 forks source link

Forgetting the threshold in logPrediction causes bad request #114

Open tbillington opened 2 years ago

tbillington commented 2 years ago

When calling logPrediction using the nodejs library, I passed the option parameter in with computeFeatureContributions: true, however I forgot to add threshold too.

When I ran the code I got back a generic Error: bad request. It took me a little bit of fiddling with double checking urls, the app was running, etc before I checked the examples and tried adding threshold to see if it would help.

I initially assumed I wouldn't need the threshold because tuning was not supported for my model type in the first place.

Once I added threshold my code was working again.

Is there a better error that can be provided to clients if they are accidentally misusing the API?