lyst / lightfm

A Python implementation of LightFM, a hybrid recommendation algorithm.
Apache License 2.0
4.73k stars 691 forks source link

Tutorial on deployment of lightfm model to production #585

Open smdshakeelhassan opened 3 years ago

smdshakeelhassan commented 3 years ago

It is just a feature request and not a bug or issue.

Could you guys please include a simple example of creating a server(maybe using Flask) that can be used for recommending items to users?

In the paper "Metadata Embeddings for User and Item Cold-start Recommendations" there is a paragraph on handling new users in an online manner.

Thousands of new items and users appear on Lyst everyday. To cope with this, we train our LightFM model in an online manner, continually updating the representations of existing features and creating fresh representations for features that we have never observed before.

Will it be possible to include a simple tutorial on that too using open source data like MovieLens? I believe it will really help out the community.

Thank you.

SimonCW commented 3 years ago

Hi @smdshakeelhassan , if I understood you correctly, you request two things,

  1. An example of creating a web API I think there are many tutorials for this on the internet and I wouldn't include this here because it is not strongly related to the library.

  2. Updating a model in production without full re-training You can check out this issue https://github.com/lyst/lightfm/issues/425 (you can find more if you search for "production", "update" or "fit_partial" in the issues). There is currently no specific code example for this but if you want to contribute an example to the Documentation, I would be happy to support you.