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
Getting RuntimeError for LukeRelationClassification #57
Comments
Hi! https://github.com/studio-ousia/luke/blob/master/examples/relation_classification/main.py#L47 |
@ikuyamada Thanks for the heads up, I fine-tuned the model, and generated checkpoint is not throwing errors as expected. However, the results I get from fine-tuning and using the generated retained differs vastly. "test_f1": 0.7204502814258913, "test_precision": 0.6925638179800222, "test_recall": 0.7506766917293233 After using the generated pre-trained: "test_f1": 0.6183343319352906, "test_precision": 0.6159355416293644, "test_recall": 0.6207518796992482 Any comments or is there something I am missing? |
@akshayparakh25 Would you provide commands used to run the fine-tuning and the inference based on the checkpoint? |
Command Used for fine-tuning:
For Inference based on checkpoint:
|
Thanks for your prompt reply! Can you reproduce the scores based on the publicized checkpoint file by running the same command for inference? |
I tried to follow your comment, but I wasn't sure about the special token you mentioned earlier. So I thought pre-training won't create the issue and went ahead with that. |
Regarding the error mentioned in the first comment, the released checkpoint file of the relation classification task contains a word embedding with shape (50267, 1024) and an entity embedding with shape (3, 256). I think your checkpoint file is different from the publicized checkpoint file.
|
Do you mean the checkpoint file that I have downloaded is different from the publicized one? |
I do not know why this happens. I have downloaded the checkpoint file to my local computer and confirmed that the shapes are different from those shown in the error message. |
Thanks for your response. The link shared in this comment is working for me. And the results for test set, "test_f1": 0.6442931771410481, |
I can reproduce the reported results based on the checkpoint file... Did you use poetry to create the environment? This may be related to the mismatch of library versions. |
With reference to your first point. Possibly that could be the reason. Thanks for your efforts in resolving the issue. |
@akshayparakh25
I got a similar problem, the expected f1 is 72, but I got 64. I have checked the data loading utils and evaluation metrics, but I didn't solve the problem. |
While trying to replicate results using pre-trained model for Relation Classification, I am getting the following error. I looked at the function
load_state_dict()
,strict
argument is set toFalse
.I cannot understand the reason behind this. Can somebody please explain!
The text was updated successfully, but these errors were encountered: