huggingface / huggingface/transfer-learning-conv-ai
Error while saving models
- Dominant language
- Python
- Stars
- 1.8k
- Forks
- 430
- PR merge metrics
- No merged PRs in 30d
Description
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?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in train_no_sc.py at the train() call and line 279, where checkpoint_handler._saved[-1][1][-1] is passed to os.rename. Inspect how the checkpoint path becomes 'h', then reproduce the training run and confirm that the final saved model can be renamed to pytorch_model.bin without a FileNotFoundError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100