chantilly icon indicating copy to clipboard operation
chantilly copied to clipboard

Allow for multiple models

Open kevinsteger opened this issue 6 years ago • 5 comments

to define my_model: requests.post('http://localhost:5000/api/my_model', data=dill.dumps(model))

make predictions to my_model: requests.post('http://localhost:5000/api/my_model/predict', json={...

etc.

kevinsteger avatar Mar 28 '20 13:03 kevinsteger

That's an interesting proposal. Have you got a valid use-case for this? I would like to do something like this, but I think it's important that there's a default behavior if no model name is provided. Maybe the latest one should be used?

On a side-note, if we are going to store multiple models, we need to improve the storage system. Either we go with SQLite, either we continue with the shelve module but add some tooling.

MaxHalford avatar Mar 28 '20 14:03 MaxHalford

Our use for the models is in advertising. Our environment supports any engineer to be able to propose a model for production. We typically run model vs. model in a champion challenger model for 24 hours and observe the results. Having a model server that hosts multiple models would be ideal.

Please consider REDIS support for the storage system.

kevinsteger avatar Mar 28 '20 16:03 kevinsteger

Our use for the models is in advertising. Our environment supports any engineer to be able to propose a model for production.

Ok nice. I was initially thinking of doing this transparently, by uploading an ensemble model to chantilly. For example in creme there is a SuccessiveHalvingClassifier model which you provide with a list of models. This wrapper model will transparently take care of selecting the best model and discarding the worst ones.

We typically run model vs. model in a champion challenger model for 24 hours and observe the results.

I didn't know about the champion challenger scheme, but it makes complete sense. I'll try to get something done soon.

Please consider REDIS support for the storage system.

I will!

MaxHalford avatar Mar 28 '20 16:03 MaxHalford

Okay @kevinsteger I added support for multiple models. You can see the relevant documentation here. Tell me what you think, the API is not in stone yet so I can make changes.

MaxHalford avatar Mar 29 '20 10:03 MaxHalford

Looks good to me. I will give it a try ASAP thanks for being so responsive!

kevinsteger avatar Mar 29 '20 13:03 kevinsteger