raspberryice / gen-arg

Code for paper "Document-Level Argument Extraction by Conditional Generation". NAACL 21'
MIT License
115 stars 29 forks source link

the directory of checkpoints is empty #7

Closed jc-ryan closed 2 years ago

jc-ryan commented 3 years ago

Hello Sha Li, according to your code,I found that the checkpoint directory is still empty after the execution of code,which made it impossible to test the model on test set. Have you ever met this problem and could you give me some clue to fix it?

raspberryice commented 2 years ago

I was unable to reproduce this problem for a long time but now I have finally discovered the reason 😅 . It is caused by the difference in the pytorch-lightning version.

See this https://pytorch-lightning.readthedocs.io/en/latest/common/trainer.html#checkpoint-callback for details, but the key is that the checkpoint_callback should be passed in the Trainer as part of the list of callbacks instead of being an individual argument.