Coder-Yu/SELFRec

NCL中KeyError的问题

MoriaaaVici opened this issue · 2 comments

相同的数据集其他的模型跑就不会出现这个问题,但是NCL中就会有这个报错该怎么解决呢?
File "main.py", line 37, in
rec.execute()
File "/root/SELFRec/SELFRec.py", line 25, in execute
eval(recommender).execute()
File "/root/SELFRec/base/recommender.py", line 73, in execute
self.train()
File "/root/SELFRec/model/graph/NCL.py", line 121, in train
self.fast_evaluation(epoch)
File "/root/SELFRec/base/graph_recommender.py", line 91, in fast_evaluation
rec_list = self.test()
File "/root/SELFRec/base/graph_recommender.py", line 57, in test
item_names = [self.data.id2item[iid] for iid in ids]
File "/root/SELFRec/base/graph_recommender.py", line 57, in
item_names = [self.data.id2item[iid] for iid in ids]
KeyError: 22225

你是不是自己改过代码?

解决了!