This repository is ready-to-use for designing->training->testing a News Recommendation Model on MIND dataset. It offers comprehensive classes and utilities to load data and train/evaluate the model.
python=3.8.11
torch==1.9.1
# manager will email you the training result, so you should add your gmail and password as follows:
mkdir data/configs
echo "email = '[email protected]'" >> data/configs/email.py
echo "password = 'your password'" >> data/configs/email.py
# train a basic twotower model with CNN news encoder and LSTM user encoder
python twotower.py
# test
python twotower.py -m test- specify
-p=/your/path/to/MIND/root - specify
-d=xif you want to train/test on thex-th gpu - specify
-ws=xif you want to train/test withxgpus - for more hyper parameters, run
python twotower.py --help
- design your model in
models/referring toTwoTower.py - write a script in
./referring totwotower.py
in utils/MIND.py
- tokenize
- generate cache
in utils/Manager.py
- handle hyper parameters
- prepare dataloaders
- handle the training/evaluation process
in models/Enocders
- CNN
- RNN
- Multi Head Attention
- Transformer
- Pooling
in models/Enocders
- LSTM
- MHA
- LSTUR
- Pooling