Closed eyuansu62 closed 2 years ago
Hi,
I'm confused... Could you explain more about what exactly did you do and what causes the error exactly?
Hope we can help! Thanks
在我训好一个模型以后,我发现保存的checkpoint文件夹里并没有config.json这个文件。 因此我想用我保存的ckpt去eval模型的时候,就会报错找不过config.json这个文件。报错如下:
OSError: Can't load config for 't5-model'. Make sure that:
- 't5-model' is a correct model identifier listed on 'https://huggingface.co/models'
- or 't5-model' is the correct path to a directory containing a config.json file
- ```
Hi,
I think the answer to this question can be useful for a broader audience, so forgive me for replying in English.
In general, there are two ways to test a pretrained model.
The first one is quite general: you can 1) initialize the model in the same way as training and then 2) load the pretrained weights as is done here: https://github.com/HKUNLP/UnifiedSKG/blob/7a2de6d31bfd5d69a4d71bd8f6ce92bf2b8d7a3b/train.py#L149
The second one is a little bit hack: you can use the same command as training while removing the --overwrite_output_dir
flag and setting --num_train_epochs 0
. It works because it will load the previous best checkpoint but not continue training.
Further questions are welcome!
It works! Thanks!! :)
You're welcome, contact us if you have further problem!🥰
When I try to eval the model using my saved checkpoint, it points to "'t5-model' is the correct path to a directory containing a config.json file". I realize the saved model folder does not contain config.json. How can I figure it out?