wujcan / SGL-TensorFlow

173 stars 42 forks source link

运行报错问题 #33

Open kbk12 opened 1 year ago

kbk12 commented 1 year ago

Traceback (most recent call last): File "main.py", line 46, in model = MyClass(sess, dataset, conf) File "/home/xgxy/KB/SGL-TensorFlow-main/model/general_recommender/SGL.py", line 25, in init super(SGL, self).init(dataset, conf) File "/home/xgxy/KB/SGL-TensorFlow-main/model/AbstractRecommender.py", line 34, in init num_thread=conf["num_thread"]) File "/home/xgxy/KB/SGL-TensorFlow-main/util/tool.py", line 182, in wrapper return func(*args, *kwargs) File "/home/xgxy/KB/SGL-TensorFlow-main/evaluator/proxy_evaluator.py", line 84, in init num_thread=num_thread) File "/home/xgxy/KB/SGL-TensorFlow-main/util/tool.py", line 177, in wrapper bound_values = sig.bind(args, **kwargs) File "/home/xgxy/.conda/envs/kb/lib/python3.6/inspect.py", line 2997, in bind return args[0]._bind(args[1:], kwargs) File "/home/xgxy/.conda/envs/kb/lib/python3.6/inspect.py", line 2938, in _bind arg=param.name)) from None TypeError: multiple values for argument 'metric'

wujcan commented 1 year ago

应该是给metric传参的时候传入了多个value,注意采用以下形式:--metric=["Precision", "Recall", "NDCG", "MAP", "MRR"]

kbk12 commented 1 year ago

直接下载的然后想跑一下,就报这个错误,没有进行任何改动,找到配置文件metric=["Precision", "Recall", "NDCG", "MAP", "MRR"],是正确的,请问还有其他注意的地方吗

wujcan commented 1 year ago

首先比对下NeuRec.properties里面metric附近的内容是否正确,如果没问题,建议单步调试到出错的地方,监控下key和value的值看是不是正常读入