131250208 / TPlinker-joint-extraction

438 stars 94 forks source link

the train scrip dies at line 473 #59

Closed abasirat closed 2 years ago

abasirat commented 2 years ago

Hi,

The train.py scrip stops working at line 473 when enumerating over dataloader. I have traced it back and found that the train_dataloader stops after loading the pre-trained BERT model in Line 278. In fact, when I print the iter(train_dataloader) after Line 278, the program dies and needed to be stopped manually (Ctrl+C). I wonder if you have any thoughts on what might be the reason for this faulire.

Thank you in advance, A.

131250208 commented 2 years ago

@abasirat It might because of the the version version of transformers.

abasirat commented 2 years ago

I use transformers v3.0.2 and the pre-trained BERT model provided by hugging face. I have also tried other versions of transformers but it stops exactly at the same line.

131250208 commented 2 years ago

@abasirat It is wired. Could you show me the error messages?

abasirat commented 2 years ago

There is no error message. It halts at line 473 where it starts enumerating over training data loader and I need to break the running with Ctrl+C.

131250208 commented 2 years ago

Did you try the code from line 253 to 269? If it halts again, you can try to remove num_workers = 6 when initiating the data loaders.

abasirat commented 2 years ago

It works after removing num_workers = 6. Thank you.