I had to create the conda environment first without specifying the python version, as version 3.6.7 is not available with the current version of conda. The two subsequent lines allowed for python 3.6.7 to be installed - the correct version of python was downloaded from anaconda.org.
At the last line above (install requirements), I encountered the following error:
ERROR: Package 'protobuf' requires a different Python: 3.6.7 not in '>=3.7'
In an attempt to resolve this, I restarted the environment using the above steps, BUT added a command prior to installation of requirements export MACOSX_DEPLOYMENT_TARGET=10.14, and added protobuf version to requirements.txt. The requirements.txt file now looks like this:
# this is the fp16_e_s3 branch
git+https://github.com/matt-peters/allennlp.git@2d7ba1cb108428aaffe2dce875648253b44cb5ba
pytest==6.2.2
nltk==3.5
ipython==7.16.1
spacy==2.0.18
torch==1.2.0
#added
protobuf==4.0.0rc1
Specified spacy version per issue #39 , as not doing so yields ERROR: allennlp 0.8.3-unreleased has requirement spacy<2.1,>=2.0, but you'll have spacy 3.6.1 which is incompatible.
However, I then yielded the following error: ERROR: spacy 2.0.18 has requirement regex==2018.01.10, but you'll have regex 2023.8.8 which is incompatible.. If I then add the requirement regex==2018.01.10 in the requirements.txt, I yield the following error: ERROR: parsimonious 0.10.0 has requirement regex>=2022.3.15, but you'll have regex 2018.1.10 which is incompatible.
In both instances, I get this message along with the error: Successfully built allennlp.
If I run the following commands, I would be able to run them successfully to proceed to testing:
However, the test failed with the following message:
========================================================= ERRORS ==========================================================
_________________________________ ERROR collecting tests/test_bert_pretraining_reader.py __________________________________
tests/test_bert_pretraining_reader.py:2: in <module>
from kb.bert_pretraining_reader import BertPreTrainingReader, \
kb/bert_pretraining_reader.py:10: in <module>
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/__init__.py:1: in <module>
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/__init__.py:10: in <module>
from allennlp.data.dataset_readers.ccgbank import CcgBankDatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/ccgbank.py:9: in <module>
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/dataset_reader.py:4: in <module>
from allennlp.data.instance import Instance
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/instance.py:3: in <module>
from allennlp.data.fields.field import DataArray, Field
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/__init__.py:7: in <module>
from allennlp.data.fields.array_field import ArrayField
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/array_field.py:10: in <module>
class ArrayField(Field[numpy.ndarray]):
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/array_field.py:45: in ArrayField
@overrides
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:83: in overrides
return _overrides(method, check_signature, check_at_runtime)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:170: in _overrides
_validate_method(method, super_class, check_signature)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:189: in _validate_method
ensure_signature_is_compatible(super_method, method, is_static)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/signature.py:102: in ensure_signature_is_compatible
ensure_return_type_compatibility(super_type_hints, sub_type_hints, method_name)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/signature.py:303: in ensure_return_type_compatibility
f"{method_name}: return type `{sub_return}` is not a `{super_return}`."
E TypeError: ArrayField.empty_field: return type `None` is not a `allennlp.data.fields.field.Field`.
__________________________ ERROR collecting tests/test_bert_tokenizer_and_candidate_generator.py __________________________
tests/test_bert_tokenizer_and_candidate_generator.py:4: in <module>
from kb.bert_tokenizer_and_candidate_generator import BertTokenizerAndCandidateGenerator
kb/bert_tokenizer_and_candidate_generator.py:6: in <module>
from allennlp.data.fields import Field, TextField, ListField, SpanField, ArrayField, LabelField
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/__init__.py:1: in <module>
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/__init__.py:10: in <module>
from allennlp.data.dataset_readers.ccgbank import CcgBankDatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/ccgbank.py:9: in <module>
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/dataset_reader.py:4: in <module>
from allennlp.data.instance import Instance
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/instance.py:4: in <module>
from allennlp.data.fields import TextField, ListField, SpanField
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/__init__.py:7: in <module>
from allennlp.data.fields.array_field import ArrayField
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/array_field.py:10: in <module>
class ArrayField(Field[numpy.ndarray]):
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/array_field.py:45: in ArrayField
@overrides
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:83: in overrides
return _overrides(method, check_signature, check_at_runtime)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:170: in _overrides
_validate_method(method, super_class, check_signature)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:189: in _validate_method
ensure_signature_is_compatible(super_method, method, is_static)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/signature.py:102: in ensure_signature_is_compatible
ensure_return_type_compatibility(super_type_hints, sub_type_hints, method_name)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/signature.py:303: in ensure_return_type_compatibility
f"{method_name}: return type `{sub_return}` is not a `{super_return}`."
E TypeError: ArrayField.empty_field: return type `None` is not a `allennlp.data.fields.field.Field`.
__________________________________________ ERROR collecting tests/test_common.py __________________________________________
tests/test_common.py:6: in <module>
from kb.common import F1Metric
kb/common.py:11: in <module>
from allennlp.training.metrics.metric import Metric
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/training/__init__.py:1: in <module>
from allennlp.training.trainer import Trainer
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/training/trainer.py:19: in <module>
from allennlp.data.instance import Instance
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/__init__.py:1: in <module>
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/__init__.py:10: in <module>
from allennlp.data.dataset_readers.ccgbank import CcgBankDatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/ccgbank.py:9: in <module>
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/dataset_reader.py:4: in <module>
from allennlp.data.instance import Instance
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/instance.py:4: in <module>
from allennlp.data.fields import TextField, ListField, SpanField
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/__init__.py:7: in <module>
from allennlp.data.fields.array_field import ArrayField
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/array_field.py:10: in <module>
class ArrayField(Field[numpy.ndarray]):
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/array_field.py:45: in ArrayField
@overrides
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:83: in overrides
return _overrides(method, check_signature, check_at_runtime)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:170: in _overrides
_validate_method(method, super_class, check_signature)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:189: in _validate_method
ensure_signature_is_compatible(super_method, method, is_static)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/signature.py:102: in ensure_signature_is_compatible
ensure_return_type_compatibility(super_type_hints, sub_type_hints, method_name)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/signature.py:303: in ensure_return_type_compatibility
f"{method_name}: return type `{sub_return}` is not a `{super_return}`."
E TypeError: ArrayField.empty_field: return type `None` is not a `allennlp.data.fields.field.Field`.
________________________________________ ERROR collecting tests/test_dict_field.py ________________________________________
tests/test_dict_field.py:4: in <module>
from allennlp.data import Token, Vocabulary
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/__init__.py:1: in <module>
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/__init__.py:10: in <module>
from allennlp.data.dataset_readers.ccgbank import CcgBankDatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/ccgbank.py:9: in <module>
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/dataset_reader.py:4: in <module>
from allennlp.data.instance import Instance
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/instance.py:4: in <module>
from allennlp.data.fields import TextField, ListField, SpanField
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/__init__.py:7: in <module>
from allennlp.data.fields.array_field import ArrayField
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/array_field.py:10: in <module>
class ArrayField(Field[numpy.ndarray]):
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/array_field.py:45: in ArrayField
@overrides
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:83: in overrides
return _overrides(method, check_signature, check_at_runtime)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:170: in _overrides
_validate_method(method, super_class, check_signature)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:189: in _validate_method
ensure_signature_is_compatible(super_method, method, is_static)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/signature.py:102: in ensure_signature_is_compatible
ensure_return_type_compatibility(super_type_hints, sub_type_hints, method_name)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/signature.py:303: in ensure_return_type_compatibility
f"{method_name}: return type `{sub_return}` is not a `{super_return}`."
E TypeError: ArrayField.empty_field: return type `None` is not a `allennlp.data.fields.field.Field`.
______________________________________ ERROR collecting tests/test_entity_linking.py ______________________________________
tests/test_entity_linking.py:7: in <module>
from allennlp.data import TokenIndexer, Vocabulary, Token
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/__init__.py:1: in <module>
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/__init__.py:10: in <module>
from allennlp.data.dataset_readers.ccgbank import CcgBankDatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/ccgbank.py:9: in <module>
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/dataset_reader.py:4: in <module>
from allennlp.data.instance import Instance
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/instance.py:4: in <module>
from allennlp.data.fields import TextField, ListField, SpanField
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/__init__.py:7: in <module>
from allennlp.data.fields.array_field import ArrayField
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/array_field.py:10: in <module>
class ArrayField(Field[numpy.ndarray]):
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/array_field.py:45: in ArrayField
@overrides
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:83: in overrides
return _overrides(method, check_signature, check_at_runtime)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:170: in _overrides
_validate_method(method, super_class, check_signature)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:189: in _validate_method
ensure_signature_is_compatible(super_method, method, is_static)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/signature.py:102: in ensure_signature_is_compatible
ensure_return_type_compatibility(super_type_hints, sub_type_hints, method_name)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/signature.py:303: in ensure_return_type_compatibility
f"{method_name}: return type `{sub_return}` is not a `{super_return}`."
E TypeError: ArrayField.empty_field: return type `None` is not a `allennlp.data.fields.field.Field`.
_______________________________________ ERROR collecting tests/test_kg_embedding.py _______________________________________
tests/test_kg_embedding.py:5: in <module>
from kb.kg_embedding import KGTupleReader, get_labels_tensor_from_indices, \
kb/kg_embedding.py:8: in <module>
from allennlp.data import DatasetReader, Token, Vocabulary
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/__init__.py:1: in <module>
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/__init__.py:10: in <module>
from allennlp.data.dataset_readers.ccgbank import CcgBankDatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/ccgbank.py:9: in <module>
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/dataset_reader.py:4: in <module>
from allennlp.data.instance import Instance
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/instance.py:4: in <module>
from allennlp.data.fields import TextField, ListField, SpanField
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/__init__.py:7: in <module>
from allennlp.data.fields.array_field import ArrayField
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/array_field.py:10: in <module>
class ArrayField(Field[numpy.ndarray]):
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/array_field.py:45: in ArrayField
@overrides
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:83: in overrides
return _overrides(method, check_signature, check_at_runtime)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:170: in _overrides
_validate_method(method, super_class, check_signature)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:189: in _validate_method
ensure_signature_is_compatible(super_method, method, is_static)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/signature.py:102: in ensure_signature_is_compatible
ensure_return_type_compatibility(super_type_hints, sub_type_hints, method_name)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/signature.py:303: in ensure_return_type_compatibility
f"{method_name}: return type `{sub_return}` is not a `{super_return}`."
E TypeError: ArrayField.empty_field: return type `None` is not a `allennlp.data.fields.field.Field`.
_____________________________________ ERROR collecting tests/test_kg_probe_reader.py ______________________________________
tests/test_kg_probe_reader.py:5: in <module>
from allennlp.data import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/__init__.py:1: in <module>
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/__init__.py:10: in <module>
from allennlp.data.dataset_readers.ccgbank import CcgBankDatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/ccgbank.py:9: in <module>
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/dataset_reader.py:4: in <module>
from allennlp.data.instance import Instance
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/instance.py:4: in <module>
from allennlp.data.fields import TextField, ListField, SpanField
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/__init__.py:7: in <module>
from allennlp.data.fields.array_field import ArrayField
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/array_field.py:10: in <module>
class ArrayField(Field[numpy.ndarray]):
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/array_field.py:45: in ArrayField
@overrides
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:83: in overrides
return _overrides(method, check_signature, check_at_runtime)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:170: in _overrides
_validate_method(method, super_class, check_signature)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:189: in _validate_method
ensure_signature_is_compatible(super_method, method, is_static)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/signature.py:102: in ensure_signature_is_compatible
ensure_return_type_compatibility(super_type_hints, sub_type_hints, method_name)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/signature.py:303: in ensure_return_type_compatibility
f"{method_name}: return type `{sub_return}` is not a `{super_return}`."
E TypeError: ArrayField.empty_field: return type `None` is not a `allennlp.data.fields.field.Field`.
_________________________________________ ERROR collecting tests/test_knowbert.py _________________________________________
tests/test_knowbert.py:8: in <module>
from allennlp.data import Vocabulary, DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/__init__.py:1: in <module>
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/__init__.py:10: in <module>
from allennlp.data.dataset_readers.ccgbank import CcgBankDatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/ccgbank.py:9: in <module>
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/dataset_reader.py:4: in <module>
from allennlp.data.instance import Instance
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/instance.py:4: in <module>
from allennlp.data.fields import TextField, ListField, SpanField
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/__init__.py:7: in <module>
from allennlp.data.fields.array_field import ArrayField
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/array_field.py:10: in <module>
class ArrayField(Field[numpy.ndarray]):
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/array_field.py:45: in ArrayField
@overrides
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:83: in overrides
return _overrides(method, check_signature, check_at_runtime)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:170: in _overrides
_validate_method(method, super_class, check_signature)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:189: in _validate_method
ensure_signature_is_compatible(super_method, method, is_static)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/signature.py:102: in ensure_signature_is_compatible
ensure_return_type_compatibility(super_type_hints, sub_type_hints, method_name)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/signature.py:303: in ensure_return_type_compatibility
f"{method_name}: return type `{sub_return}` is not a `{super_return}`."
E TypeError: ArrayField.empty_field: return type `None` is not a `allennlp.data.fields.field.Field`.
_________________________________________ ERROR collecting tests/test_metrics.py __________________________________________
tests/test_metrics.py:5: in <module>
from kb.metrics import MeanReciprocalRank, MicroF1
kb/metrics.py:4: in <module>
from allennlp.training.metrics.metric import Metric
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/training/__init__.py:1: in <module>
from allennlp.training.trainer import Trainer
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/training/trainer.py:19: in <module>
from allennlp.data.instance import Instance
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/__init__.py:1: in <module>
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/__init__.py:10: in <module>
from allennlp.data.dataset_readers.ccgbank import CcgBankDatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/ccgbank.py:9: in <module>
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/dataset_reader.py:4: in <module>
from allennlp.data.instance import Instance
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/instance.py:4: in <module>
from allennlp.data.fields import TextField, ListField, SpanField
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/__init__.py:7: in <module>
from allennlp.data.fields.array_field import ArrayField
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/array_field.py:10: in <module>
class ArrayField(Field[numpy.ndarray]):
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/array_field.py:45: in ArrayField
@overrides
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:83: in overrides
return _overrides(method, check_signature, check_at_runtime)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:170: in _overrides
_validate_method(method, super_class, check_signature)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:189: in _validate_method
ensure_signature_is_compatible(super_method, method, is_static)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/signature.py:102: in ensure_signature_is_compatible
ensure_return_type_compatibility(super_type_hints, sub_type_hints, method_name)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/signature.py:303: in ensure_return_type_compatibility
f"{method_name}: return type `{sub_return}` is not a `{super_return}`."
E TypeError: ArrayField.empty_field: return type `None` is not a `allennlp.data.fields.field.Field`.
________________________________________ ERROR collecting tests/test_multitask.py _________________________________________
tests/test_multitask.py:5: in <module>
from allennlp.data.dataset_readers import CcgBankDatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/__init__.py:1: in <module>
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/__init__.py:10: in <module>
from allennlp.data.dataset_readers.ccgbank import CcgBankDatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/ccgbank.py:9: in <module>
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/dataset_reader.py:4: in <module>
from allennlp.data.instance import Instance
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/instance.py:4: in <module>
from allennlp.data.fields import TextField, ListField, SpanField
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/__init__.py:7: in <module>
from allennlp.data.fields.array_field import ArrayField
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/array_field.py:10: in <module>
class ArrayField(Field[numpy.ndarray]):
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/array_field.py:45: in ArrayField
@overrides
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:83: in overrides
return _overrides(method, check_signature, check_at_runtime)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:170: in _overrides
_validate_method(method, super_class, check_signature)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:189: in _validate_method
ensure_signature_is_compatible(super_method, method, is_static)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/signature.py:102: in ensure_signature_is_compatible
ensure_return_type_compatibility(super_type_hints, sub_type_hints, method_name)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/signature.py:303: in ensure_return_type_compatibility
f"{method_name}: return type `{sub_return}` is not a `{super_return}`."
E TypeError: ArrayField.empty_field: return type `None` is not a `allennlp.data.fields.field.Field`.
____________________________________ ERROR collecting tests/test_self_attn_iterator.py ____________________________________
tests/test_self_attn_iterator.py:6: in <module>
from kb.self_attn_bucket_iterator import SelfAttnBucketIterator
kb/self_attn_bucket_iterator.py:11: in <module>
from allennlp.data.dataset import Batch
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/__init__.py:1: in <module>
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/__init__.py:10: in <module>
from allennlp.data.dataset_readers.ccgbank import CcgBankDatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/ccgbank.py:9: in <module>
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/dataset_reader.py:4: in <module>
from allennlp.data.instance import Instance
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/instance.py:4: in <module>
from allennlp.data.fields import TextField, ListField, SpanField
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/__init__.py:7: in <module>
from allennlp.data.fields.array_field import ArrayField
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/array_field.py:10: in <module>
class ArrayField(Field[numpy.ndarray]):
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/array_field.py:45: in ArrayField
@overrides
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:83: in overrides
return _overrides(method, check_signature, check_at_runtime)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:170: in _overrides
_validate_method(method, super_class, check_signature)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:189: in _validate_method
ensure_signature_is_compatible(super_method, method, is_static)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/signature.py:102: in ensure_signature_is_compatible
ensure_return_type_compatibility(super_type_hints, sub_type_hints, method_name)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/signature.py:303: in ensure_return_type_compatibility
f"{method_name}: return type `{sub_return}` is not a `{super_return}`."
E TypeError: ArrayField.empty_field: return type `None` is not a `allennlp.data.fields.field.Field`.
___________________________________ ERROR collecting tests/test_span_attention_layer.py ___________________________________
tests/test_span_attention_layer.py:5: in <module>
from kb.span_attention_layer import SpanAttentionLayer, SpanWordAttention
kb/span_attention_layer.py:7: in <module>
from kb.common import get_dtype_for_module, extend_attention_mask_for_bert, get_linear_layer_init_identity, init_bert_weights
kb/common.py:11: in <module>
from allennlp.training.metrics.metric import Metric
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/training/__init__.py:1: in <module>
from allennlp.training.trainer import Trainer
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/training/trainer.py:19: in <module>
from allennlp.data.instance import Instance
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/__init__.py:1: in <module>
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/__init__.py:10: in <module>
from allennlp.data.dataset_readers.ccgbank import CcgBankDatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/ccgbank.py:9: in <module>
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/dataset_reader.py:4: in <module>
from allennlp.data.instance import Instance
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/instance.py:4: in <module>
from allennlp.data.fields import TextField, ListField, SpanField
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/__init__.py:7: in <module>
from allennlp.data.fields.array_field import ArrayField
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/array_field.py:10: in <module>
class ArrayField(Field[numpy.ndarray]):
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/array_field.py:45: in ArrayField
@overrides
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:83: in overrides
return _overrides(method, check_signature, check_at_runtime)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:170: in _overrides
_validate_method(method, super_class, check_signature)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:189: in _validate_method
ensure_signature_is_compatible(super_method, method, is_static)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/signature.py:102: in ensure_signature_is_compatible
ensure_return_type_compatibility(super_type_hints, sub_type_hints, method_name)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/signature.py:303: in ensure_return_type_compatibility
f"{method_name}: return type `{sub_return}` is not a `{super_return}`."
E TypeError: ArrayField.empty_field: return type `None` is not a `allennlp.data.fields.field.Field`.
_______________________________________ ERROR collecting tests/test_wiki_reader.py ________________________________________
tests/test_wiki_reader.py:4: in <module>
from allennlp.common.testing.test_case import AllenNlpTestCase
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/common/testing/__init__.py:5: in <module>
from allennlp.common.testing.model_test_case import ModelTestCase
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/common/testing/model_test_case.py:7: in <module>
from allennlp.commands.train import train_model_from_file
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/commands/__init__.py:8: in <module>
from allennlp.commands.configure import Configure
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/commands/configure.py:27: in <module>
from allennlp.service.config_explorer import make_app
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/service/config_explorer.py:24: in <module>
from allennlp.common.configuration import configure, choices
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/common/configuration.py:17: in <module>
from allennlp.data.dataset_readers import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/__init__.py:1: in <module>
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/__init__.py:10: in <module>
from allennlp.data.dataset_readers.ccgbank import CcgBankDatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/ccgbank.py:9: in <module>
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/dataset_reader.py:4: in <module>
from allennlp.data.instance import Instance
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/instance.py:4: in <module>
from allennlp.data.fields import TextField, ListField, SpanField
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/__init__.py:7: in <module>
from allennlp.data.fields.array_field import ArrayField
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/array_field.py:10: in <module>
class ArrayField(Field[numpy.ndarray]):
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/array_field.py:45: in ArrayField
@overrides
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:83: in overrides
return _overrides(method, check_signature, check_at_runtime)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:170: in _overrides
_validate_method(method, super_class, check_signature)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:189: in _validate_method
ensure_signature_is_compatible(super_method, method, is_static)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/signature.py:102: in ensure_signature_is_compatible
ensure_return_type_compatibility(super_type_hints, sub_type_hints, method_name)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/signature.py:303: in ensure_return_type_compatibility
f"{method_name}: return type `{sub_return}` is not a `{super_return}`."
E TypeError: ArrayField.empty_field: return type `None` is not a `allennlp.data.fields.field.Field`.
_________________________________________ ERROR collecting tests/test_wordnet.py __________________________________________
tests/test_wordnet.py:7: in <module>
from kb.wordnet import WordNetFineGrainedSenseDisambiguationReader
kb/wordnet.py:21: in <module>
from allennlp.data import DatasetReader, Token, Vocabulary, Tokenizer
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/__init__.py:1: in <module>
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/__init__.py:10: in <module>
from allennlp.data.dataset_readers.ccgbank import CcgBankDatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/ccgbank.py:9: in <module>
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/dataset_reader.py:4: in <module>
from allennlp.data.instance import Instance
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/instance.py:4: in <module>
from allennlp.data.fields import TextField, ListField, SpanField
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/__init__.py:7: in <module>
from allennlp.data.fields.array_field import ArrayField
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/array_field.py:10: in <module>
class ArrayField(Field[numpy.ndarray]):
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/array_field.py:45: in ArrayField
@overrides
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:83: in overrides
return _overrides(method, check_signature, check_at_runtime)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:170: in _overrides
_validate_method(method, super_class, check_signature)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:189: in _validate_method
ensure_signature_is_compatible(super_method, method, is_static)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/signature.py:102: in ensure_signature_is_compatible
ensure_return_type_compatibility(super_type_hints, sub_type_hints, method_name)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/signature.py:303: in ensure_return_type_compatibility
f"{method_name}: return type `{sub_return}` is not a `{super_return}`."
E TypeError: ArrayField.empty_field: return type `None` is not a `allennlp.data.fields.field.Field`.
_______________________________ ERROR collecting tests/evaluation/test_semeval2010_task8.py _______________________________
tests/evaluation/test_semeval2010_task8.py:3: in <module>
from kb.include_all import SemEval2010Task8Reader, SemEval2010Task8Metric
kb/include_all.py:2: in <module>
from kb.kg_embedding import KGTupleReader, KGTupleModel
kb/kg_embedding.py:8: in <module>
from allennlp.data import DatasetReader, Token, Vocabulary
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/__init__.py:1: in <module>
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/__init__.py:10: in <module>
from allennlp.data.dataset_readers.ccgbank import CcgBankDatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/ccgbank.py:9: in <module>
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/dataset_reader.py:4: in <module>
from allennlp.data.instance import Instance
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/instance.py:4: in <module>
from allennlp.data.fields import TextField, ListField, SpanField
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/__init__.py:7: in <module>
from allennlp.data.fields.array_field import ArrayField
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/array_field.py:10: in <module>
class ArrayField(Field[numpy.ndarray]):
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/array_field.py:45: in ArrayField
@overrides
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:83: in overrides
return _overrides(method, check_signature, check_at_runtime)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:170: in _overrides
_validate_method(method, super_class, check_signature)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:189: in _validate_method
ensure_signature_is_compatible(super_method, method, is_static)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/signature.py:102: in ensure_signature_is_compatible
ensure_return_type_compatibility(super_type_hints, sub_type_hints, method_name)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/signature.py:303: in ensure_return_type_compatibility
f"{method_name}: return type `{sub_return}` is not a `{super_return}`."
E TypeError: ArrayField.empty_field: return type `None` is not a `allennlp.data.fields.field.Field`.
_______________________________ ERROR collecting tests/evaluation/test_simple_classifier.py _______________________________
tests/evaluation/test_simple_classifier.py:3: in <module>
from kb.include_all import SimpleClassifier, F1Metric
kb/include_all.py:2: in <module>
from kb.kg_embedding import KGTupleReader, KGTupleModel
kb/kg_embedding.py:8: in <module>
from allennlp.data import DatasetReader, Token, Vocabulary
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/__init__.py:1: in <module>
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/__init__.py:10: in <module>
from allennlp.data.dataset_readers.ccgbank import CcgBankDatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/ccgbank.py:9: in <module>
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/dataset_reader.py:4: in <module>
from allennlp.data.instance import Instance
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/instance.py:4: in <module>
from allennlp.data.fields import TextField, ListField, SpanField
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/__init__.py:7: in <module>
from allennlp.data.fields.array_field import ArrayField
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/array_field.py:10: in <module>
class ArrayField(Field[numpy.ndarray]):
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/array_field.py:45: in ArrayField
@overrides
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:83: in overrides
return _overrides(method, check_signature, check_at_runtime)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:170: in _overrides
_validate_method(method, super_class, check_signature)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:189: in _validate_method
ensure_signature_is_compatible(super_method, method, is_static)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/signature.py:102: in ensure_signature_is_compatible
ensure_return_type_compatibility(super_type_hints, sub_type_hints, method_name)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/signature.py:303: in ensure_return_type_compatibility
f"{method_name}: return type `{sub_return}` is not a `{super_return}`."
E TypeError: ArrayField.empty_field: return type `None` is not a `allennlp.data.fields.field.Field`.
_________________________________ ERROR collecting tests/evaluation/test_tacred_reader.py _________________________________
tests/evaluation/test_tacred_reader.py:5: in <module>
from allennlp.data import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/__init__.py:1: in <module>
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/__init__.py:10: in <module>
from allennlp.data.dataset_readers.ccgbank import CcgBankDatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/ccgbank.py:9: in <module>
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/dataset_reader.py:4: in <module>
from allennlp.data.instance import Instance
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/instance.py:4: in <module>
from allennlp.data.fields import TextField, ListField, SpanField
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/__init__.py:7: in <module>
from allennlp.data.fields.array_field import ArrayField
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/array_field.py:10: in <module>
class ArrayField(Field[numpy.ndarray]):
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/array_field.py:45: in ArrayField
@overrides
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:83: in overrides
return _overrides(method, check_signature, check_at_runtime)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:170: in _overrides
_validate_method(method, super_class, check_signature)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:189: in _validate_method
ensure_signature_is_compatible(super_method, method, is_static)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/signature.py:102: in ensure_signature_is_compatible
ensure_return_type_compatibility(super_type_hints, sub_type_hints, method_name)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/signature.py:303: in ensure_return_type_compatibility
f"{method_name}: return type `{sub_return}` is not a `{super_return}`."
E TypeError: ArrayField.empty_field: return type `None` is not a `allennlp.data.fields.field.Field`.
_______________________________ ERROR collecting tests/evaluation/test_ultra_fine_reader.py _______________________________
tests/evaluation/test_ultra_fine_reader.py:5: in <module>
from allennlp.data import DatasetReader, DataIterator, Vocabulary
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/__init__.py:1: in <module>
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/__init__.py:10: in <module>
from allennlp.data.dataset_readers.ccgbank import CcgBankDatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/ccgbank.py:9: in <module>
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/dataset_reader.py:4: in <module>
from allennlp.data.instance import Instance
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/instance.py:4: in <module>
from allennlp.data.fields import TextField, ListField, SpanField
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/__init__.py:7: in <module>
from allennlp.data.fields.array_field import ArrayField
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/array_field.py:10: in <module>
class ArrayField(Field[numpy.ndarray]):
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/array_field.py:45: in ArrayField
@overrides
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:83: in overrides
return _overrides(method, check_signature, check_at_runtime)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:170: in _overrides
_validate_method(method, super_class, check_signature)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:189: in _validate_method
ensure_signature_is_compatible(super_method, method, is_static)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/signature.py:102: in ensure_signature_is_compatible
ensure_return_type_compatibility(super_type_hints, sub_type_hints, method_name)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/signature.py:303: in ensure_return_type_compatibility
f"{method_name}: return type `{sub_return}` is not a `{super_return}`."
E TypeError: ArrayField.empty_field: return type `None` is not a `allennlp.data.fields.field.Field`.
__________________________________ ERROR collecting tests/evaluation/test_wic_reader.py ___________________________________
tests/evaluation/test_wic_reader.py:3: in <module>
from kb.include_all import WicDatasetReader
kb/include_all.py:2: in <module>
from kb.kg_embedding import KGTupleReader, KGTupleModel
kb/kg_embedding.py:8: in <module>
from allennlp.data import DatasetReader, Token, Vocabulary
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/__init__.py:1: in <module>
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/__init__.py:10: in <module>
from allennlp.data.dataset_readers.ccgbank import CcgBankDatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/ccgbank.py:9: in <module>
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/dataset_readers/dataset_reader.py:4: in <module>
from allennlp.data.instance import Instance
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/instance.py:4: in <module>
from allennlp.data.fields import TextField, ListField, SpanField
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/__init__.py:7: in <module>
from allennlp.data.fields.array_field import ArrayField
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/array_field.py:10: in <module>
class ArrayField(Field[numpy.ndarray]):
../miniconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/fields/array_field.py:45: in ArrayField
@overrides
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:83: in overrides
return _overrides(method, check_signature, check_at_runtime)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:170: in _overrides
_validate_method(method, super_class, check_signature)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/overrides.py:189: in _validate_method
ensure_signature_is_compatible(super_method, method, is_static)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/signature.py:102: in ensure_signature_is_compatible
ensure_return_type_compatibility(super_type_hints, sub_type_hints, method_name)
../miniconda3/envs/knowbert/lib/python3.6/site-packages/overrides/signature.py:303: in ensure_return_type_compatibility
f"{method_name}: return type `{sub_return}` is not a `{super_return}`."
E TypeError: ArrayField.empty_field: return type `None` is not a `allennlp.data.fields.field.Field`.
==================================================== warnings summary =====================================================
../miniconda3/envs/knowbert/lib/python3.6/site-packages/plac_ext.py:6
/Users/ytchan/miniconda3/envs/knowbert/lib/python3.6/site-packages/plac_ext.py:6: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
-- Docs: https://docs.pytest.org/en/stable/warnings.html
================================================= short test summary info =================================================
ERROR tests/test_bert_pretraining_reader.py - TypeError: ArrayField.empty_field: return type `None` is not a `allennlp.d...
ERROR tests/test_bert_tokenizer_and_candidate_generator.py - TypeError: ArrayField.empty_field: return type `None` is no...
ERROR tests/test_common.py - TypeError: ArrayField.empty_field: return type `None` is not a `allennlp.data.fields.field....
ERROR tests/test_dict_field.py - TypeError: ArrayField.empty_field: return type `None` is not a `allennlp.data.fields.fi...
ERROR tests/test_entity_linking.py - TypeError: ArrayField.empty_field: return type `None` is not a `allennlp.data.field...
ERROR tests/test_kg_embedding.py - TypeError: ArrayField.empty_field: return type `None` is not a `allennlp.data.fields....
ERROR tests/test_kg_probe_reader.py - TypeError: ArrayField.empty_field: return type `None` is not a `allennlp.data.fiel...
ERROR tests/test_knowbert.py - TypeError: ArrayField.empty_field: return type `None` is not a `allennlp.data.fields.fiel...
ERROR tests/test_metrics.py - TypeError: ArrayField.empty_field: return type `None` is not a `allennlp.data.fields.field...
ERROR tests/test_multitask.py - TypeError: ArrayField.empty_field: return type `None` is not a `allennlp.data.fields.fie...
ERROR tests/test_self_attn_iterator.py - TypeError: ArrayField.empty_field: return type `None` is not a `allennlp.data.f...
ERROR tests/test_span_attention_layer.py - TypeError: ArrayField.empty_field: return type `None` is not a `allennlp.data...
ERROR tests/test_wiki_reader.py - TypeError: ArrayField.empty_field: return type `None` is not a `allennlp.data.fields.f...
ERROR tests/test_wordnet.py - TypeError: ArrayField.empty_field: return type `None` is not a `allennlp.data.fields.field...
ERROR tests/evaluation/test_semeval2010_task8.py - TypeError: ArrayField.empty_field: return type `None` is not a `allen...
ERROR tests/evaluation/test_simple_classifier.py - TypeError: ArrayField.empty_field: return type `None` is not a `allen...
ERROR tests/evaluation/test_tacred_reader.py - TypeError: ArrayField.empty_field: return type `None` is not a `allennlp....
ERROR tests/evaluation/test_ultra_fine_reader.py - TypeError: ArrayField.empty_field: return type `None` is not a `allen...
ERROR tests/evaluation/test_wic_reader.py - TypeError: ArrayField.empty_field: return type `None` is not a `allennlp.dat...
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 19 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================= 1 warning, 19 errors in 16.54s ==============================================
I am wondering if I did anything wrong? Would love your thoughts on how I can pass the tests. Thanks!
Additional note: Not sure if this is relevant, but it seems I am installing AllenNLP 0.8.3-unreleased instead of 0.8.2 as instructed in issue #39
Hello! I have issues with installing the environment for knowbert.
Running this from a Macbook Air M1, macOS Ventura 13.2.1.
I cloned the repository for allenai/kb.git, then used the following steps:
cd kb
conda create -n knowbert
conda activate knowbert
conda config --env --set subdir osx-64
conda install -c ehmoussi python
pip install torch==1.2.0
pip install -r requirements.txt
I had to create the conda environment first without specifying the python version, as version 3.6.7 is not available with the current version of conda. The two subsequent lines allowed for python 3.6.7 to be installed - the correct version of python was downloaded from anaconda.org.
At the last line above (install requirements), I encountered the following error:
ERROR: Package 'protobuf' requires a different Python: 3.6.7 not in '>=3.7'
In an attempt to resolve this, I restarted the environment using the above steps, BUT added a command prior to installation of requirements
export MACOSX_DEPLOYMENT_TARGET=10.14
, and added protobuf version to requirements.txt. The requirements.txt file now looks like this:Specified spacy version per issue #39 , as not doing so yields
ERROR: allennlp 0.8.3-unreleased has requirement spacy<2.1,>=2.0, but you'll have spacy 3.6.1 which is incompatible.
However, I then yielded the following error:
ERROR: spacy 2.0.18 has requirement regex==2018.01.10, but you'll have regex 2023.8.8 which is incompatible.
. If I then add the requirement regex==2018.01.10 in the requirements.txt, I yield the following error:ERROR: parsimonious 0.10.0 has requirement regex>=2022.3.15, but you'll have regex 2018.1.10 which is incompatible.
In both instances, I get this message along with the error:
Successfully built allennlp
.If I run the following commands, I would be able to run them successfully to proceed to testing:
However, the test failed with the following message:
I am wondering if I did anything wrong? Would love your thoughts on how I can pass the tests. Thanks!
Additional note: Not sure if this is relevant, but it seems I am installing AllenNLP 0.8.3-unreleased instead of 0.8.2 as instructed in issue #39