8000 Custom dataset with different relations · Issue #17 · monologg/R-BERT · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Custom dataset with different relations #17
Open
@Taghreed7878

Description

@Taghreed7878

Hi,
I'm trying to train R-BERT on my dataset with different relations using your repo. I reformatted my dataset to be in your format for semeval, but when I run the train eval command I get an error because the evaluator tries to read from the result file and finds it empty.

When I looked at the eval directory before training, I found two files, I understand that the answer_keys file in used during evaluating model performance, I constructed my own answer_keys file.

About the second file, I changed the if part that contains relations for semeval to my relations. I still got the same error:
Evaluating: 100% 1178/1178 [02:04<00:00, 9.48it/s]
Bad file format on line 37675: '155333 date of birth(e1, e2)'
Iteration: 3% 249/7354 [03:24<1:37:08, 1.22it/s]
Epoch: 0% 0/10 [03:24<?, ?it/s]
Traceback (most recent call last):
File "main.py", line 117, in
main(args)
File "main.py", line 19, in main
trainer.train()
File "/content/drive/MyDrive/R-BERT/trainer.py", line 125, in train
self.evaluate("test") # There is no dev set for semeval task
File "/content/drive/MyDrive/R-BERT/trainer.py", line 192, in evaluate
result = compute_metrics(preds, out_label_ids)
File "/content/drive/MyDrive/R-BERT/utils.py", line 54, in compute_metrics
return acc_and_f1(preds, labels)
File "/content/drive/MyDrive/R-BERT/utils.py", line 65, in acc_and_f1
"f1": official_f1(),
File "/content/drive/MyDrive/R-BERT/official_eval.py", line 17, in official_f1
macro_result = list(f)[-1]
IndexError: list index out of range

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0