rajpurkarlab / CXR-Report-Metric

MIT License
34 stars 7 forks source link

Error:sh: 1: allennlp: not found #10

Open Kingofolk opened 1 week ago

Kingofolk commented 1 week ago

Hi!

Thanks for your great work. I am trying to caculate some metrics using your code but the following errors thrown out: sh: 1: allennlp: not found

It seems that there is a file allennlp needed? Could you please help me solve this problem?

Best regards Kingofolk

Kingofolk commented 1 week ago

Hi,

I v noticed that allennlp is a package and I v suceessfully installed it. But when running the code, the following prolems occurred. Could you please help me solve it?

Traceback (most recent call last): File "/home/zcwang/anaconda3/envs/cxrmetric/bin/allennlp", line 8, in sys.exit(run()) File "/home/zcwang/anaconda3/envs/cxrmetric/lib/python3.8/site-packages/allennlp/main.py", line 39, in run main(prog="allennlp") File "/home/zcwang/anaconda3/envs/cxrmetric/lib/python3.8/site-packages/allennlp/commands/init.py", line 119, in main import_module_and_submodules(package_name) File "/home/zcwang/anaconda3/envs/cxrmetric/lib/python3.8/site-packages/allennlp/common/util.py", line 376, in import_module_and_submodules import_module_and_submodules(subpackage, exclude=exclude) File "/home/zcwang/anaconda3/envs/cxrmetric/lib/python3.8/site-packages/allennlp/common/util.py", line 359, in import_module_and_submodules module = importlib.import_module(package_name) File "/home/zcwang/anaconda3/envs/cxrmetric/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 843, in exec_module File "", line 219, in _call_with_frames_removed File "/hdd2/zcwang/CXR-Report-Metric-1.1.0/dygie/data/init.py", line 1, in from dygie.data.dataset_readers.dygie import DyGIEReader File "/hdd2/zcwang/CXR-Report-Metric-1.1.0/dygie/data/dataset_readers/dygie.py", line 19, in from dygie.data.dataset_readers.document import Document, Sentence File "/hdd2/zcwang/CXR-Report-Metric-1.1.0/dygie/data/dataset_readers/document.py", line 3, in from dygie.models.shared import fields_to_batches, batches_to_fields File "/hdd2/zcwang/CXR-Report-Metric-1.1.0/dygie/models/init.py", line 1, in from dygie.models.dygie import DyGIE File "/hdd2/zcwang/CXR-Report-Metric-1.1.0/dygie/models/dygie.py", line 17, in from dygie.models.coref import CorefResolver File "/hdd2/zcwang/CXR-Report-Metric-1.1.0/dygie/models/coref.py", line 24, in class CorefResolver(Model): File "/hdd2/zcwang/CXR-Report-Metric-1.1.0/dygie/models/coref.py", line 388, in CorefResolver def make_output_human_readable(self, output_dict: Dict[str, torch.Tensor]): File "/home/zcwang/anaconda3/envs/cxrmetric/lib/python3.8/site-packages/overrides/overrides.py", line 83, in overrides return _overrides(method, check_signature, check_at_runtime) File "/home/zcwang/anaconda3/envs/cxrmetric/lib/python3.8/site-packages/overrides/overrides.py", line 170, in _overrides _validate_method(method, super_class, check_signature) File "/home/zcwang/anaconda3/envs/cxrmetric/lib/python3.8/site-packages/overrides/overrides.py", line 189, in _validate_method ensure_signature_is_compatible(super_method, method, is_static) File "/home/zcwang/anaconda3/envs/cxrmetric/lib/python3.8/site-packages/overrides/signature.py", line 102, in ensure_signature_is_compatible ensure_return_type_compatibility(super_type_hints, sub_type_hints, method_name) File "/home/zcwang/anaconda3/envs/cxrmetric/lib/python3.8/site-packages/overrides/signature.py", line 302, in ensure_return_type_compatibility raise TypeError( TypeError: CorefResolver.make_output_human_readable: return type None is not a typing.Dict[str, torch.Tensor].