seq2rel icon indicating copy to clipboard operation
seq2rel copied to clipboard

Training the model

Open REEMALIK94 opened this issue 1 year ago • 3 comments

Hey,

I am trying to train model on my dataset, everything goes well, but at the end I am getting this error everytime. Not able to figure out what's wrong. Any help would be great. Screenshot from 2023-03-24 15-00-41(1)

REEMALIK94 avatar Mar 24 '23 09:03 REEMALIK94

Hi @REEMALIK94,

Just reading the error, seems AllenNLP expected a folder /content/drive/MyDrive/DOCRED/model to exist, and it didn't. Could you manually create this directory, and then try re-training?

If that doesn't work, it would be helpful to know

  • your full config
  • possibly some training/validation data if you are ok sharing
  • version of allennlp installed (pip freeze | grep "allennlp")

JohnGiorgi avatar Mar 24 '23 16:03 JohnGiorgi

Hey, I tried this. It didn't work. But since the training was done, I created tar.gz file by myself. The issue at present is,I am trying to use load_archive method to load the saved model. But it is giving me this error. I have tried using the docred.tar.gz, still getting the same error. Screenshot from 2023-03-28 15-14-29

REEMALIK94 avatar Mar 28 '23 09:03 REEMALIK94

This is likely because seq2rel is an AllenNLP 'module' you must import like this:

https://github.com/JohnGiorgi/seq2rel/blob/6bcffb47da157e4139f3537372f6845a8b35d1a6/seq2rel/seq2rel.py#L79

I recommend checking out that script to see how to load trained models^

JohnGiorgi avatar Mar 28 '23 13:03 JohnGiorgi