Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

运行报错问题 #33

Open
kbk12 opened this issue Feb 22, 2023 · 3 comments
Open

运行报错问题 #33

kbk12 opened this issue Feb 22, 2023 · 3 comments

Comments

@kbk12
Copy link

kbk12 commented Feb 22, 2023

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
Copy link
Owner

wujcan commented Feb 22, 2023

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

@kbk12
Copy link
Author

kbk12 commented Feb 22, 2023

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

@wujcan
Copy link
Owner

wujcan commented Feb 22, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants