anzhang314 / BC-Loss

Official code of "Incorporating Bias-aware Margins into Contrastive Loss for Collaborative Filtering" (2022 NeurIPS)
MIT License
22 stars 2 forks source link

Where is reckit? #3

Closed wisdomGEsLA closed 1 year ago

wisdomGEsLA commented 1 year ago

I tried to run the code, but there is a error:

File "/home/BC-Loss-main/data.py", line 16, in <module>
    from reckit import randint_choice
ModuleNotFoundError: No module named 'reckit'

Finally I copy the reckit from InvCF to run the code, is it OK?

By the way, the results in the paper are averaged result after n repeated runs or it has an fixed seed?

Arthurma71 commented 1 year ago

Yes, the randint_choice here is a cython version of random.choice for random sampling, which is the same as the function in InvCF . We have now fixed the code error. Results in the paper are averaged result after 3 repeated runs with random seeds, you should be able to obtain similar results by averaging over n repeated runs.

wisdomGEsLA commented 1 year ago

Yes, the randint_choice here is a cython version of random.choice for random sampling, which is the same as the function in InvCF . We have now fixed the code error. Results in the paper are averaged result after 3 repeated runs with random seeds, you should be able to obtain similar results by averaging over n repeated runs.

Thanks! But now it becomes extremely slow when we don't use in-batch negative sampling, I think maybe it will be better if we have reckit