首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >没有名为“huggingface_hub.snapshot_download”的模块

没有名为“huggingface_hub.snapshot_download”的模块
EN

Stack Overflow用户
提问于 2022-11-24 06:14:59
回答 1查看 416关注 0票数 2

当我试图运行快速启动笔记本 of 这个回购时,会得到错误ModuleNotFoundError: No module named 'huggingface_hub.snapshot_download'。我怎么才能修好它?我已经使用pip安装了huggingface_hub

编译以下单元格后会出现错误:

代码语言:javascript
运行
复制
!CUDA_VISIBLE_DEVICES=0 python -u ../scripts/main.py --summarizer gpt3_summarizer --controller longformer_classifier longformer_classifier --loader alignment coherence --controller-load-dir emnlp22_re3_data/ckpt/relevance_reranker emnlp22_re3_data/ckpt/coherence_reranker --controller-model-string allenai/longformer-base-4096 allenai/longformer-base-4096 --save-outline-file output/outline0.pkl --save-complete-file output/complete_story0.pkl --log-file output/story0.log

以下是整个输出:

代码语言:javascript
运行
复制
Traceback (most recent call last):
  File "../scripts/main.py", line 20, in <module>
    from story_generation.edit_module.entity import *
  File "/home/jovyan/emnlp22-re3-story-generation/story_generation/edit_module/entity.py", line 20, in <module>
    from story_generation.common.util import *
  File "/home/jovyan/emnlp22-re3-story-generation/story_generation/common/util.py", line 13, in <module>
    from sentence_transformers import SentenceTransformer
  File "/opt/conda/lib/python3.8/site-packages/sentence_transformers/__init__.py", line 3, in <module>
    from .datasets import SentencesDataset, ParallelSentencesDataset
  File "/opt/conda/lib/python3.8/site-packages/sentence_transformers/datasets/__init__.py", line 3, in <module>
    from .ParallelSentencesDataset import ParallelSentencesDataset
  File "/opt/conda/lib/python3.8/site-packages/sentence_transformers/datasets/ParallelSentencesDataset.py", line 4, in <module>
    from .. import SentenceTransformer
  File "/opt/conda/lib/python3.8/site-packages/sentence_transformers/SentenceTransformer.py", line 25, in <module>
    from .evaluation import SentenceEvaluator
  File "/opt/conda/lib/python3.8/site-packages/sentence_transformers/evaluation/__init__.py", line 5, in <module>
    from .InformationRetrievalEvaluator import InformationRetrievalEvaluator
  File "/opt/conda/lib/python3.8/site-packages/sentence_transformers/evaluation/InformationRetrievalEvaluator.py", line 6, in <module>
    from ..util import cos_sim, dot_score
  File "/opt/conda/lib/python3.8/site-packages/sentence_transformers/util.py", line 407, in <module>
    from huggingface_hub.snapshot_download import REPO_ID_SEPARATOR
ModuleNotFoundError: No module named 'huggingface_hub.snapshot_download'
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-11-25 13:49:39

更新到最新版本的sentence-transformers修复它(不需要显式安装huggingface-hub ):

代码语言:javascript
运行
复制
pip install -U sentence-transformers

我在最初的回购中已经为此提议了拉扯请求

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/74556349

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档