huggingface / transfer-learning-conv-ai

🦄 State-of-the-Art Conversational AI with Transfer Learning
MIT License
1.74k stars 432 forks source link

Error while saving models #87

Open Rasipuram opened 4 years ago

Rasipuram commented 4 years ago

Hi,

Thank you for sharing us the code. I am using this repo to fine-tune GPT2 model on my conversation dataset. I am using pytorch_transformers to import AdamW, OpenAIGPTDoubleHeadsModel, OpenAIGPTTokenizer, GPT2DoubleHeadsModel, GPT2Tokenizer, WEIGHTS_NAME. I get this error after it runs all epochs.

Traceback (most recent call last): File "./train_no_sc.py", line 283, in train() File "./train_no_sc.py", line 279, in train os.rename(checkpoint_handler._saved[-1][1][-1], os.path.join(log_dir, WEIGHTS_NAME)) # TODO: PR in ignite to have better access to saved file paths (cleaner) FileNotFoundError: [Errno 2] No such file or directory: 'h' -> 'runs/Jul29_04-14-19_ip-172-31-38-243_gpt2/pytorch_model.bin'

Can you please suggest me?

Rasipuram commented 4 years ago

The issue is resolved when pytorch-ignite==1.2.1 is used.