DeepKE icon indicating copy to clipboard operation
DeepKE copied to clipboard

ner-multimodal 模型无法训练

Open 3525355094 opened this issue 4 years ago • 10 comments

Describe the question

A clear and concise description of what the question is. 训练时一直出现这样的错误: OSError: Can't load config for 'openai/clip-vit-base-patch32'. Make sure that:

  • 'openai/clip-vit-base-patch32' is a correct model identifier listed on 'https://huggingface.co/models'

  • or 'openai/clip-vit-base-patch32' is the correct path to a directory containing a config.json file

Environment (please complete the following information):

  • OS: [e.g. mac / window]
  • Python Version [e.g. 3.6]

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

3525355094 avatar Jul 08 '22 07:07 3525355094

下载模型https://huggingface.co/openai/clip-vit-base-patch32 并以绝对路径导入的方式使用

xxupiano avatar Jul 08 '22 08:07 xxupiano

  1. 将transformers升级至4.11.3;
  2. 下载模型https://huggingface.co/openai/clip-vit-base-patch32 并以绝对路径导入的方式使用

请问下载后把模型放在哪个文件夹下呢?

3525355094 avatar Jul 08 '22 08:07 3525355094

放在哪都行,只需要将train.yaml和predict.yaml中vit_name修改为模型绝对路径即可

tlk1997 avatar Jul 08 '22 08:07 tlk1997

放在哪都行,只需要讲train.yaml中vit_name修改为模型绝对路径即可

好的,谢谢,我试一试

3525355094 avatar Jul 08 '22 08:07 3525355094

放在哪都行,只需要将train.yaml和predict.yaml中vit_name修改为模型绝对路径即可

我已经将模型下载并将路径修改为绝对路径·,但我发现无论怎样修改路径、重启项目,代码的默认路径都是vit_name='openai/clip-vit-base-patch32',都会报最上面的那个错误。

3525355094 avatar Jul 08 '22 10:07 3525355094

能否贴一下您具体的报错截图和vit模型文件夹下内容的截图

GoooDte avatar Jul 08 '22 11:07 GoooDte

文件截图是这样的: image 刚才那个报错截图没有了,因为我刚刚将train.yaml中的vit模型路径的参数名改为vit_name1,并将代码中出现它的地方也全部改了,然后运行没有了那个错误,不过现在又出现了这样的情况: image 正在进一步观察中。

3525355094 avatar Jul 08 '22 11:07 3525355094

predict.yaml里也要改

tlk1997 avatar Jul 08 '22 11:07 tlk1997

请问有人见过这种问题吗?: image

3525355094 avatar Jul 08 '22 14:07 3525355094

文件路径问题,可以修改文件内对应路径,可以先更新一下代码

tlk1997 avatar Jul 09 '22 05:07 tlk1997