We implemented a News Recommender System with an Online Reinforcement Learning approach, based on MIND dataset. Our first challenge was how to extract information from news texts and categories that represent precisely the data. Second challenge was how to formulate problem in a RL literature. Finally, we had to figure out how to train the model in offline manner.
- Designed a Deep Q-Network model using Pytorch
- Deployed and tracked the model using the MLFlow tool
- Developed a very straightforward back-end using FastAPI
- Wrote a Dockerfile and dockerized the whole project
- python = 3.9
- pandas = 1.4.1
- numpy = 1.22.2
- nltk = 3.7
- fastapi = 0.75.0
- uvicorn = 0.17.5
- mlflow = 1.24.0
- torch = 1.11.0
- Download MIND large dataset
- Create 'dataset' directory
- Create 'train', 'dev', and 'test' directories inside 'dataset' directory
- Copy Training Set, paste it in 'train' directory
- Copy Validation Set, paste it in 'dev' directory
- Copy Test Set, paste it in 'test' directory
- Install Poetry -> pip install poetry
- Remove 'poetry.lock' file
- Install dependencies -> poetry install
- Run 'features.py' -> python src/features.py
- Run 'run.py' -> uvicorn run:app
- Open 'front/code.html' in Chrome
- Run mlflow -> mlflow ui
We are RecBrain, four data science enthusiasts:
Gather together in Rahnema College Machine Learning Internship Program with mentorship of Matin Zivdar.
Special thanks to Matin Zivdar for his sincerely guidance and mentorship.
Many thanks to Rahnema College for their fantastic internship program, Azin Azarkar, Yasin Orouskhani, and everyone else who helped us through this project.