hexiangnan / neural_collaborative_filtering

Neural Collaborative Filtering
Apache License 2.0
1.79k stars 652 forks source link

`evaluation_threads` does not take effect #28

Open daming-lu opened 5 years ago

daming-lu commented 5 years ago

I tried evaluation_threads = 56, but the time spent for each epoch is pretty the same:

evaluation_threads = 1

Iteration 0 [112.8 s]: HR = 0.4967, NDCG = 0.2792, loss = 0.3568 [2.6 s] Iteration 1 [25.0 s]: HR = 0.5631, NDCG = 0.3147, loss = 0.3129 [2.5 s] Iteration 2 [24.1 s]: HR = 0.5887, NDCG = 0.3314, loss = 0.2943 [2.5 s] Iteration 3 [23.8 s]: HR = 0.6166, NDCG = 0.3512, loss = 0.2832 [2.5 s] Iteration 4 [23.6 s]: HR = 0.6215, NDCG = 0.3562, loss = 0.2764 [2.5 s]

vs.

evaluation_threads = 56

Iteration 0 [26.1 s]: HR = 0.4965, NDCG = 0.2790, loss = 0.3659 [1.2 s] Iteration 1 [23.5 s]: HR = 0.5618, NDCG = 0.3141, loss = 0.3094 [1.2 s] Iteration 2 [23.1 s]: HR = 0.5952, NDCG = 0.3352, loss = 0.2923 [4.5 s] Iteration 3 [24.0 s]: HR = 0.6075, NDCG = 0.3474, loss = 0.2807 [3.3 s] Iteration 4 [24.2 s]: HR = 0.6174, NDCG = 0.3528, loss = 0.2756 [4.3 s]

998898 commented 8 months ago

Hello, why did I adjust the evaluation_threads to other values, and the error will be reported:TypeError: 'NoneType' object is not subscriptable.Is it because global variables are set in the evaluate.py? How do I adjust to use multithreading?