当前位置:   article > 正文

OSError: We couldn‘t connect to ‘https://huggingface.co‘ to load this file,_module 'accuracy' doesn't exist on the hugging fac

module 'accuracy' doesn't exist on the hugging face hub either.

场景:训练bert-base-chinese下游任务:分类。在一个服务器可以用,但GPU只有一个卡,只能换一个服务器,换个服务器又要重装环境,但后者下载模型有问题,手动用git-lfs下载后指定位置报错:

Traceback (most recent call last):

/examples/pytorch/text-classification/run_glue.py", line 622, in <module>

    main()

/examples/pytorch/text-classification/run_glue.py", line 486, in main

    metric = evaluate.load("accuracy")

/python3.9/site-packages/evaluate/loading.py", line 731, in load

    evaluation_module = evaluation_module_factory(

/python3.9/site-packages/evaluate/loading.py", line 681, in evaluation_module_factory

    raise FileNotFoundError(

FileNotFoundError: Couldn't find a module script at 。。。Class4/bin/accuracy/accuracy.py. Module 'accuracy' doesn't exist on the Hugging Face Hub either.

因此,只有将前者的root下的模型cp过去同样的位置/root/.cache/huggingface/hub/models--bert-base-chinese

跑起来了。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小惠珠哦/article/detail/838335
推荐阅读
相关标签
  

闽ICP备14008679号