【问题标题】:Location of downloaded model when using Predictor.from_path in AllenNLP?在 AllenNLP 中使用 Predictor.from_path 时下载模型的位置?
【发布时间】:2022-01-02 23:38:23
【问题描述】:

我正在关注 AllenNLP 的 correference resolution 示例代码,它有一个方法 Predictor.from_path

from allennlp.predictors.predictor import Predictor
import allennlp_models.tagging

predictor = Predictor.from_path("https://storage.googleapis.com/allennlp-public-models/coref-spanbert-large-2021.03.10.tar.gz")

我在 conda 环境中的 Jupyter 笔记本中运行它。当我执行示例 sn-p 时,会下载模型文件,大小约为 1.5gb。

我想知道这个文件是下载到哪里的,所以我可以在必要时清理它吗?它不在~/conda/env/<my env>~/.jupyter~/.local/share/jupyter//tmp 或笔记本所在的工作目录中。

【问题讨论】:

    标签: jupyter-notebook conda allennlp


    【解决方案1】:

    它进入~/.allennlp/cache/

    【讨论】:

      猜你喜欢
      • 2020-10-29
      • 2019-06-11
      • 2021-02-28
      • 2021-04-20
      • 1970-01-01
      • 2020-11-21
      • 2020-09-05
      • 2022-10-13
      • 2021-11-30
      相关资源
      最近更新 更多