RUCAIBox / RecBole

A unified, comprehensive and efficient recommendation library
https://recbole.io/
MIT License
3.48k stars 615 forks source link

[🐛BUG] Sparse dropout disabled during evaluation? #599

Closed deklanw closed 3 years ago

deklanw commented 3 years ago

PyTorch currently doesn't have sparse dropout https://github.com/pytorch/pytorch/issues/35798

I see that it's being emulated here https://github.com/RUCAIBox/RecBole/blob/cedd7eac5cd2455727532b031beedf224d92be2f/recbole/model/general_recommender/gcmc.py#L437 and https://github.com/RUCAIBox/RecBole/blob/cedd7eac5cd2455727532b031beedf224d92be2f/recbole/model/general_recommender/ngcf.py#L35

Regular PyTorch Dropout is disabled when model.eval is called because training is set to false on the model https://github.com/RUCAIBox/RecBole/blob/511cda89deca404808bea1df2f5e98e17e9015f1/recbole/trainer/trainer.py#L362

Are these emulations of sparse dropout being disabled somewhere during evaluation?

linzihan-backforward commented 3 years ago

Hi @deklanw . Thanks for your reminder, that's exactly a bug and we have fixed it in #601 .