allenai / allenai/dont-stop-pretraining

ImportError SpacyTokenizer on vampire branch allennlp-1.0

未关闭
#31 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
544
派生
72
PR 合并指标
30 天内没有已合并 PR

描述

Hi,

When following the instructions in DATA_SELECTION.md, upon running the command ""python -m scripts.train --config training_config/vampire.jsonnet --serialization-dir model_logs/vampire-world --environment VAMPIRE --device 0 -o", I get the following error:

> ImportError: cannot import name 'SpacyTokenizer' from 'allennlp.data.tokenizers' (/path/to/python3.7/site-packages/allennlp/data/tokenizers/__init__.py)

If I upgrade to alllennlp==1.0, it states:

> Something went wrong during jsonnet_evaluate_file, please report this: [json.exception.parse_error.101] parse error at line 1, column 1: syntax error while parsing value - invalid literal; last read: 'Z'

I notice scripts/train.py works on the vampire master branch, so this seems to be an issue related to the vampire branch the DSP DATA_SELECTION.md requires.

I've tried staying on master branch, copying 'run_vampire.py' from dont-stop-pretraining/scripts/tapt_selection and then running "parallel --ungroup python -m scripts.run_vampire ${VAMPIRE_DIR}/model_logs/vampire-world/model.tar.gz {1} --batch 64 --include-package vampire --predictor vampire --output-file ${ROOT_DIR}/task_emb/{1/.} --silent ::: ${ROOT_DIR}/task_shards/*". This gives:

> ImportError: cannot import name 'import_module_and_submodules' from 'allennlp.common.util' (/home/mitarb/vdberg/anaconda3/envs/domains/lib/python3.7/site-packages/allennlp/common/util.py)

Could you perhaps help out with this? Thank you!

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。