Closed rahul110228 closed 2 years ago
@rahul110228 Can you share more details about your environment? Specifically, the output of pip freeze
?
This issue is being closed due to lack of activity. If you think it still needs to be addressed, please comment on this thread 👇
How to solve? I meet the same problem.
Thanks!
ISSUE
When I'm running this command ( python train.py --config config/ud/multilingual/udify_bert_finetune_multilingual.json --name multilingual) then i found this error "TypeError( TypeError: UniversalDependenciesDatasetReader._read: return type None is not a typing.Iterable[allennlp.data.instance.Instance]."
Termional: Traceback (most recent call last): File "/Users/rahuldebmohalder/Giga Tech lLtd/Udify Project/udify-master/train.py", line 18, in
from udify import util
File "/Users/rahuldebmohalder/Giga Tech lLtd/Udify Project/udify-master/udify/init.py", line 1, in
from udify.dataset_readers import *
File "/Users/rahuldebmohalder/Giga Tech lLtd/Udify Project/udify-master/udify/dataset_readers/init.py", line 1, in
from udify.dataset_readers.universal_dependencies import UniversalDependenciesDatasetReader
File "/Users/rahuldebmohalder/Giga Tech lLtd/Udify Project/udify-master/udify/dataset_readers/universal_dependencies.py", line 29, in
class UniversalDependenciesDatasetReader(DatasetReader):
File "/Users/rahuldebmohalder/Giga Tech lLtd/Udify Project/udify-master/udify/dataset_readers/universal_dependencies.py", line 39, in UniversalDependenciesDatasetReader
def _read(self, file_path: str):
File "/Users/rahuldebmohalder/opt/anaconda3/envs/udify/lib/python3.9/site-packages/overrides/overrides.py", line 88, in overrides
return _overrides(method, check_signature, check_at_runtime)
File "/Users/rahuldebmohalder/opt/anaconda3/envs/udify/lib/python3.9/site-packages/overrides/overrides.py", line 114, in _overrides
_validate_method(method, super_class, check_signature)
File "/Users/rahuldebmohalder/opt/anaconda3/envs/udify/lib/python3.9/site-packages/overrides/overrides.py", line 135, in _validate_method
ensure_signature_is_compatible(super_method, method, is_static)
File "/Users/rahuldebmohalder/opt/anaconda3/envs/udify/lib/python3.9/site-packages/overrides/signature.py", line 86, in ensure_signature_is_compatible
ensure_return_type_compatibility(super_type_hints, sub_type_hints, method_name)
File "/Users/rahuldebmohalder/opt/anaconda3/envs/udify/lib/python3.9/site-packages/overrides/signature.py", line 269, in ensure_return_type_compatibility
raise TypeError(
TypeError: UniversalDependenciesDatasetReader._read: return type
None
is not atyping.Iterable[allennlp.data.instance.Instance]
.