无法导入拥抱面变换器



直到今天,我一直在使用变压器。然而,当我今天导入包时,我收到了以下错误消息:

In Transformers v4.0.0, the default path to cache downloaded models changed from '~/.cache/torch/transformers' to '~/.cache/huggingface/transformers'. Since you don't seem to have overridden and '~/.cache/torch/transformers' is a directory that exists, we're moving it to '~/.cache/huggingface/transformers' to avoid redownloading models you have already in the cache. You should only see this message once.
Error: Destination path '/home/user/.cache/huggingface/transformers/transformers' already exists

我试过安装和卸载这个软件包,但仍然无法使其正常工作。

任何解决此问题的建议都将不胜感激。

由于它看起来是一个缓存文件,只需将/huggingface/dir移动到/huggingpace.bak

然后您应该能够重新运行脚本。

感谢Joshua,通过以下命令解决了上述问题:

mv ~/.cache/huggingface/transformers ~/.cache/huggingface-tmp

最新更新