MaurizioFD / RecSys_Course_AT_PoliMi

⚠️ [ARCHIVED] This version has been archived as of october 2024 and will not be updated anymore, please refer to the README for a link to the new version. This is the official repository for the Recommender Systems course at Politecnico di Milano.
GNU Affero General Public License v3.0
359 stars 148 forks source link

Missing super initialization in MF_MSE_PyTorch #5

Closed Alexdruso closed 4 years ago

Alexdruso commented 4 years ago

Hi, using the code in this repo I noticed that at line 25 of the MF_MSE_PyTorch recommender it is invoked

super(MF_MSE_PyTorch, self).__init__()

without the URM as an argument and this causes the impossibility to initialize the model.

MaurizioFD commented 4 years ago

Thanks, I forgot to update the model. It should work now, but it tends to be quite slow compared to the others. Not sure if speed can be improved somehow.

Alexdruso commented 4 years ago

I'm trying to use it right now with the CUDA version of PyTorch, it's superfast on my RTX 2060 😄

MaurizioFD commented 4 years ago

Ok good. You can also tweak the num_workers in DataLoader, 5 or so should allow to improve speed. How many samples per second do you get?

Alexdruso commented 4 years ago

Around 23700 samples per second with default num_workers = 0 and batch_size = 128. Increasing num_workers breaks the code, increasing batch_size to 500 returns 50000 samples per second!