BERT-Relation-Extraction icon indicating copy to clipboard operation
BERT-Relation-Extraction copied to clipboard

Missing ./data/BERT_tokenizer.pkl file

Open ozbej opened this issue 3 years ago • 2 comments

I want to run only the "Fine-tuning on SemEval2010 Task 8" section (main_task.py file). However, I get the following error: FileNotFoundError: [Errno 2] No such file or directory: './data/BERT_tokenizer.pkl'

Can anyone tell me where I can get this file?

ozbej avatar Apr 23 '22 08:04 ozbej

This is the whole stack trace:

Traceback (most recent call last): File "main_task.py", line 50, in net = train_and_fit(args) File "/content/BERT-Relation-Extraction/src/tasks/trainer.py", line 33, in train_and_fit train_loader, test_loader, train_len, test_len = load_dataloaders(args) File "/content/BERT-Relation-Extraction/src/tasks/preprocessing_funcs.py", line 319, in load_dataloaders save_as_pickle("%s_tokenizer.pkl" % model_name, tokenizer) File "/content/BERT-Relation-Extraction/src/misc.py", line 22, in save_as_pickle with open(completeName, 'wb') as output: FileNotFoundError: [Errno 2] No such file or directory: './data/BERT_tokenizer.pkl'

ozbej avatar Apr 23 '22 09:04 ozbej

You may run python main_task.py with default values first to generate the BERT_tokenizer.pkl

leonseet avatar Jun 01 '22 01:06 leonseet

Still its showing the same error

ayankhan31 avatar Jan 17 '23 12:01 ayankhan31

Requires SemEval2010 Task 8 dataset, available here. Download & unzip to ./data/ folder.

GabrielSoranzoUPEC avatar May 23 '23 10:05 GabrielSoranzoUPEC

I have added instructions as suggested to download & unzip the data

plkmo avatar Sep 24 '23 06:09 plkmo