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

NameError: name 'get_scores' is not defined #3

Open
lqli-100 opened this issue Sep 9, 2021 · 4 comments
Open

NameError: name 'get_scores' is not defined #3

lqli-100 opened this issue Sep 9, 2021 · 4 comments

Comments

@lqli-100
Copy link

lqli-100 commented Sep 9, 2021

Hello, I'm studying your work recently, I have got the result of GCN+rf+knn+svm, then I add # to the last term "if name ==" main ":" of gcn_xgb_morgan.py, remove the # of "if name ==" main" in front of it, but the code has the following error. Could you please help me deal with this? Thank you very much.
Traceback (most recent call last):
File "gcn_xgb_morgan_xgboost.py", line 279, in
gcn_scores,xgb_gcn,gcn_morgan,morgan_scores = get_scores(gcn_scores,xgb_gcn,gcn_morgan,morgan_scores,args)
NameError: name 'get_scores' is not defined.

@chenxiaowei-vincent
Copy link
Owner

chenxiaowei-vincent commented Sep 9, 2021 via email

@lqli-100
Copy link
Author

lqli-100 commented Sep 9, 2021

You can add get_scores to "from gcn_model.gcn_xgboost_scores import get_feature" at the beginning of gcn_xgb_morgan.py, Change to "from gcn_model.gcn_xgboost_scores import get_feature, get_scores"

Got it.Thanks.

@lqli-100
Copy link
Author

gcn_xgb_morgan.py
Hello, I added “from gcn_model.gcn_xgboost_scores import get_feature, get_scores" at the beginning of gcn_xgb_morgan.py according to your suggestion. However, the code reported the following error again, I did not solve the problem according to the error report, I hope you can help me to solve it, thank you very much.
File "gcn_xgb_morgan_xgboost.py", line 275, in
gcn_scores,xgb_gcn,gcn_morgan,morgan_scores = get_scores(gcn_scores,xgb_gcn,gcn_morgan,morgan_scores,args)
File "F:\xgraphboost\XGraphBoost-main\gcn_ggnn_xgboost\gcn_model\gcn_xgboost_scores.py", line 120, in get_scores
xgb_train_feature = get_feature(names['model' + str(i) ], train_loader_xgb, args.device)
File "F:\xgraphboost\XGraphBoost-main\gcn_ggnn_xgboost\gcn_model\gcn_xgboost_scores.py", line 22, in get_feature
feature, A, y = k
ValueError: too many values to unpack (expected 3)

@chenxiaowei-vincent
Copy link
Owner

chenxiaowei-vincent commented Sep 10, 2021 via email

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