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

I have successfully run the training code but unable to eval #25

Closed
Ironeie opened this issue Sep 7, 2020 · 11 comments
Closed

I have successfully run the training code but unable to eval #25

Ironeie opened this issue Sep 7, 2020 · 11 comments

Comments

@Ironeie
Copy link

Ironeie commented Sep 7, 2020

I have successfully run the training code but it gave no print out. And I cannot run the code in eval mode since there's no eval function. Can you give the eval code? Thx

@apoorvumang
Copy link
Collaborator

Can you share what command you ran, and a screenshot of whatever you saw when you ran the command?

@Ironeie
Copy link
Author

Ironeie commented Sep 7, 2020

I ran the following code successfully
python3 main.py --mode train --relation_dim 200 --hidden_dim 256 \ --gpu 3 --freeze 0 --batch_size 128 --validate_every 5 --hops 2 --lr 0.0005 --entdrop 0.1 --reldrop 0.2 --scoredrop 0.2 \ --decay 1.0 --model ComplEx --patience 5 --ls 0.0 --kg_type full
But when I wanna get the test score and ran the following code:
python3 main.py --mode eval --relation_dim 200 --hidden_dim 256 \ --gpu 3 --freeze 0 --batch_size 128 --validate_every 5 --hops 2 --lr 0.0005 --entdrop 0.1 --reldrop 0.2 --scoredrop 0.2 \ --decay 1.0 --model ComplEx --patience 5 --ls 0.0 --kg_type full
It didin't work, and the error message was as follows:
Traceback (most recent call last): File "main.py", line 361, in <module> embedding_dim=args.embedding_dim) TypeError: eval() takes no keyword arguments
which I think is because there's no eval function in main.py, is there?

@apoorvumang
Copy link
Collaborator

Yes, eval function isn't there, but eval happens when running the train command. What output did you get when you ran the train command?

@Ironeie
Copy link
Author

Ironeie commented Sep 8, 2020

Model has exceed patience. Saving best model and exiting.
And there isn't any score message

@Ironeie
Copy link
Author

Ironeie commented Sep 8, 2020

There IS validation accuracy, but no test accuracy

@apoorvumang
Copy link
Collaborator

Please see issue #14. Whenever validation accuracy increases it finds and prints the test accuracy. If this still doesn't work, please let me know.

@Ironeie
Copy link
Author

Ironeie commented Sep 8, 2020

Thank you for your reply, I've understood. When I train on KG-50, it can be shown normally. When I train on KG-Full, the best test score appears at the first epoch, therefore no test score is shown. For convenience, will you give the eval function and online QA code in the future?

@apoorvumang
Copy link
Collaborator

Yes, I'll create a new issue about having separate eval function. What do you mean by online QA code?

@Ironeie
Copy link
Author

Ironeie commented Sep 8, 2020

It means when inputing a question, output an answer, which realizes a question answering process.

@apoorvumang
Copy link
Collaborator

Got it. Can you please create a new issue with relevant title for this? I will close this one. It will be easier to resolve that way. Thanks.

@Ironeie
Copy link
Author

Ironeie commented Sep 8, 2020

All right

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