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

Input #5

Closed
Jiang-X-Pro opened this issue Oct 22, 2021 · 13 comments
Closed

Input #5

Jiang-X-Pro opened this issue Oct 22, 2021 · 13 comments

Comments

@Jiang-X-Pro
Copy link

thanks for your excellent work in KGC filed.
i have not seen the code yet and i am confused about the input . the input text of entity is the short version like "Gary Rydstrom" or the long version like "Gary Roger Rydstrom is an American sound designer and director. He has won seven Academy Awards for his work in sound for movies."?

@wangbo9719
Copy link
Owner

Thanks for your attention.

We use the long one as input.

@Jiang-X-Pro
Copy link
Author

Thanks for your response , and could you explain the why we need the steps of "do_train" and "do_eval" for getting a new dev subset? I am not clear with the get_new_dev_dict.py about how it works.Hope for your reply!!!

@wangbo9719
Copy link
Owner

The original dev set is the same size as the test set. If we use the original dev set in the validation stage, it will take about one hour (sorry, I forgot the accurate time) for one validation. And there will be many validations during the training stage, which is very time-consuming.
Therefore, we develop a new dev subset to mitigate this problem. We apply a basic model to get the ranked top-50 candidate entities that are hard to predict for this triple. And the other candidates far from the gold entity are ignored. The selected entity set of each triple replaces the original candidate entity set containing all entities in the graph. In this way, we speed up the validation stage and maintain its effectiveness.

@Jiang-X-Pro
Copy link
Author

thanks for your quick reply , do you mean that for the fact (h,r,{t1,t2,...,tn}) , you keep the top-50 t_i which gets the lower score than other entity t_j by Bert(h,r,t_i) < Bert(h,r,t_j) ?

@wangbo9719
Copy link
Owner

wangbo9719 commented Oct 24, 2021

Sorry, I forgot that the Bert(h,r,t_i) is lower or higher than Bert(h,r,t_j) in the implement. Whatever, Bert(h,r,t_i) is closer than Bert(h,r,t_j) and the "closer " means that the t_i is more likely to be mispredicted by the trained model as a gold entity than other t_j.

@Jiang-X-Pro
Copy link
Author

Thanks for your reply!
Could you tell me how much memory you use for the evaluation of fb15-237. I use up it with 50GB.

@wangbo9719
Copy link
Owner

Sorry, I forgot the detail. But I used a 24G GPU before, which is enough.

@Jiang-X-Pro
Copy link
Author

Thanks for your great work.
Could you tell me how to use the new dev file "new_dev.dict"?

@wangbo9719
Copy link
Owner

Add "--do_eval" to the training command of StAR. For example, section 4.1 in README.

@Jiang-X-Pro
Copy link
Author

according to the code

self.data_path = join(self.data_dir, "{}.tsv".format(self.data_type))
, it will use the dev.tsv instead,should I rename the file "new_dev.dict" as "dev.tsv"?

@wangbo9719
Copy link
Owner

It has been written directly in

dev_dict = torch.load("./data/" + args.dataset + "/new_dev.dict")
.

@Jiang-X-Pro
Copy link
Author

it went wrong when reproducing the results of NELL, usepacka was not found

@wangbo9719
Copy link
Owner

Sorry for the wrong command. You can just remove the 'usepacka' parameter. It may be a copy mistake in the readme.md writing. I will revise it.

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