allenai / vampire

Variational Methods for Pretraining in Resource-limited Environments
Apache License 2.0
174 stars 33 forks source link

E ImportError: cannot import name 'WordTokenizer' from 'allennlp.data.tokenizers' #48

Closed bjayakumar closed 4 years ago

bjayakumar commented 4 years ago

===================================================================================================== ERRORS ====================================================================================================== _______________________________________________________ ERROR collecting vampire/tests/data/dataset_readers/semisupervised_text_classification_json_test.py _______________________________________________________ ImportError while importing test module '/Others_Models/vampire/vampire/tests/data/dataset_readers/semisupervised_text_classification_json_test.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: vampire/tests/data/dataset_readers/semisupervised_text_classification_json_test.py:8: in <module> from vampire.data.dataset_readers import SemiSupervisedTextClassificationJsonReader vampire/data/__init__.py:1: in <module> from vampire.data.dataset_readers import SemiSupervisedTextClassificationJsonReader vampire/data/dataset_readers/__init__.py:1: in <module> from vampire.data.dataset_readers.semisupervised_text_classification_json import ( vampire/data/dataset_readers/semisupervised_text_classification_json.py:12: in <module> from allennlp.data.tokenizers import Tokenizer, WordTokenizer E ImportError: cannot import name 'WordTokenizer' from 'allennlp.data.tokenizers' (~/.conda/envs/allennlp/lib/python3.7/site-packages/allennlp/data/tokenizers/__init__.py) ______________________________________________________________________________ ERROR collecting vampire/tests/models/vampire_test.py ______________________________________________________________________________ ImportError while importing test module '/Others_Models/vampire/vampire/tests/models/vampire_test.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: vampire/tests/models/vampire_test.py:8: in <module> from vampire.data.dataset_readers import VampireReader vampire/data/__init__.py:1: in <module> from vampire.data.dataset_readers import SemiSupervisedTextClassificationJsonReader vampire/data/dataset_readers/__init__.py:1: in <module> from vampire.data.dataset_readers.semisupervised_text_classification_json import ( vampire/data/dataset_readers/semisupervised_text_classification_json.py:12: in <module> from allennlp.data.tokenizers import Tokenizer, WordTokenizer E ImportError: cannot import name 'WordTokenizer' from 'allennlp.data.tokenizers' (/.conda/envs/allennlp/lib/python3.7/site-packages/allennlp/data/tokenizers/__init__.py)

I did not have any issues with installation.

kernelmachine commented 4 years ago

Hey there, sorry about the delay. see #49

rouliandu commented 4 years ago

this error still happen, what should i do

wangjinjie722 commented 4 years ago

this error still happen, what should i do

hi, you can use 0.9.0 allennlp, it works for me