For practice, I tried to implement the news recommendation algorithms in the recommenders with PyTorch
Take it easy, do not download the dataset first, We will automatically download the dataset in train.py
Please follow the setup steps bellow:
$> conda env create -n deepnewsrec python=3.7.13
$> conda activate deepnewsrec
(deepnewsrec)$> pip install mlflow==1.29.0
Try a toy example with demo
dataset
$> mlflow run -e train --experiment-name individual_runs -P mind_type=demo -P epochs=1 .
or you can use git uri
$> mlflow run -e train --experiment-name individual_runs -P mind_type=demo -P epochs=1 git@github.com:hongjunyan/pytorch-news-recommendation.git
Run hyperparameter tuning
$> mlflow run -e tune_with_ray --experiment-name tune_hyperparams -P mind_type=demo -P epochs=1 .
For training a formal model, please use mind_type=large
.
The experiment results recorded in /mlruns
.
You can execute mlflow ui
to see the results.
$> mlflow ui -h 127.0.0.1
then hit http://127.0.0.1:5000
I train the bellowing models with epochs=15, batch_size=128
Algorithms \ Metrics | AUC | MRR | NDCG@5 | NDCG@10 |
---|---|---|---|---|
NPA | 0.6655 | 0.3171 | 0.3504 | 0.4143 |
FastFormer | 0.6813 | 0.3287 | 0.3633 | 0.4273 |
NRMS | 0.6822 | 0.3307 | 0.3655 | 0.4311 |