allenai / allennlp

An open-source NLP research library, built on PyTorch.

Home Page:http://www.allennlp.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

python train.py Run issue

rahul110228 opened this issue · comments

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 a typing.Iterable[allennlp.data.instance.Instance].

@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!