Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError SpacyTokenizer on vampire branch allennlp-1.0 #31

Open
vdenberg opened this issue Mar 30, 2021 · 0 comments
Open

ImportError SpacyTokenizer on vampire branch allennlp-1.0 #31

vdenberg opened this issue Mar 30, 2021 · 0 comments

Comments

@vdenberg
Copy link

vdenberg commented Mar 30, 2021

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!

@vdenberg vdenberg changed the title jsonnet_evaluate_file issue on branch allennlp-1.0 jsonnet_evaluate_file issue on vampire branch allennlp-1.0 Mar 30, 2021
@vdenberg vdenberg changed the title jsonnet_evaluate_file issue on vampire branch allennlp-1.0 ImportError SpacyTokenizer on vampire branch allennlp-1.0 Mar 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant