mk-runner / FSE

Factual Serialization Enhancement: A Key Innovation for Chest X-ray Report Generation
https://arxiv.org/abs/2405.09586
3 stars 0 forks source link

some problems #4

Open milky-FatJay opened 2 weeks ago

milky-FatJay commented 2 weeks ago

Traceback (most recent call last): File "/home/yanghaofeng/anaconda3/envs/dygiepp/bin/allennlp", line 8, in sys.exit(run()) File "/home/yanghaofeng/anaconda3/envs/dygiepp/lib/python3.7/site-packages/allennlp/main.py", line 34, in run main(prog="allennlp") File "/home/yanghaofeng/anaconda3/envs/dygiepp/lib/python3.7/site-packages/allennlp/commands/init.py", line 92, in main args.func(args) File "/home/yanghaofeng/anaconda3/envs/dygiepp/lib/python3.7/site-packages/allennlp/commands/predict.py", line 211, in _predict predictor = _get_predictor(args) File "/home/yanghaofeng/anaconda3/envs/dygiepp/lib/python3.7/site-packages/allennlp/commands/predict.py", line 110, in _get_predictor overrides=args.overrides, File "/home/yanghaofeng/anaconda3/envs/dygiepp/lib/python3.7/site-packages/allennlp/models/archival.py", line 191, in load_archive cuda_device=cuda_device, File "/home/yanghaofeng/anaconda3/envs/dygiepp/lib/python3.7/site-packages/allennlp/models/model.py", line 367, in load return model_class._load(config, serialization_dir, weights_file, cuda_device) File "/home/yanghaofeng/anaconda3/envs/dygiepp/lib/python3.7/site-packages/allennlp/models/model.py", line 295, in _load model = Model.from_params(vocab=vocab, params=model_params) File "/home/yanghaofeng/anaconda3/envs/dygiepp/lib/python3.7/site-packages/allennlp/common/from_params.py", line 595, in from_params extras, File "/home/yanghaofeng/anaconda3/envs/dygiepp/lib/python3.7/site-packages/allennlp/common/from_params.py", line 622, in from_params kwargs = create_kwargs(constructor_to_inspect, cls, params, extras) File "/home/yanghaofeng/anaconda3/envs/dygiepp/lib/python3.7/site-packages/allennlp/common/from_params.py", line 193, in create_kwargs cls.name, param_name, annotation, param.default, params, extras File "/home/yanghaofeng/anaconda3/envs/dygiepp/lib/python3.7/site-packages/allennlp/common/from_params.py", line 302, in pop_and_construct_arg return construct_arg(class_name, name, popped_params, annotation, default, extras) File "/home/yanghaofeng/anaconda3/envs/dygiepp/lib/python3.7/site-packages/allennlp/common/from_params.py", line 336, in construct_arg return annotation.from_params(params=popped_params, subextras) File "/home/yanghaofeng/anaconda3/envs/dygiepp/lib/python3.7/site-packages/allennlp/common/from_params.py", line 595, in from_params extras, File "/home/yanghaofeng/anaconda3/envs/dygiepp/lib/python3.7/site-packages/allennlp/common/from_params.py", line 622, in from_params kwargs = create_kwargs(constructor_to_inspect, cls, params, extras) File "/home/yanghaofeng/anaconda3/envs/dygiepp/lib/python3.7/site-packages/allennlp/common/from_params.py", line 193, in create_kwargs cls.name, param_name, annotation, param.default, params, extras File "/home/yanghaofeng/anaconda3/envs/dygiepp/lib/python3.7/site-packages/allennlp/common/from_params.py", line 302, in pop_and_construct_arg return construct_arg(class_name, name, popped_params, annotation, default, extras) File "/home/yanghaofeng/anaconda3/envs/dygiepp/lib/python3.7/site-packages/allennlp/common/from_params.py", line 383, in construct_arg extras, File "/home/yanghaofeng/anaconda3/envs/dygiepp/lib/python3.7/site-packages/allennlp/common/from_params.py", line 336, in construct_arg return annotation.from_params(params=popped_params, subextras) File "/home/yanghaofeng/anaconda3/envs/dygiepp/lib/python3.7/site-packages/allennlp/common/from_params.py", line 595, in from_params extras, File "/home/yanghaofeng/anaconda3/envs/dygiepp/lib/python3.7/site-packages/allennlp/common/from_params.py", line 624, in from_params return constructor_to_call(*kwargs) # type: ignore File "/home/yanghaofeng/anaconda3/envs/dygiepp/lib/python3.7/site-packages/allennlp/modules/token_embedders/pretrained_transformer_mismatched_embedder.py", line 53, in init gradient_checkpointing=gradient_checkpointing, File "/home/yanghaofeng/anaconda3/envs/dygiepp/lib/python3.7/site-packages/allennlp/modules/token_embedders/pretrained_transformer_embedder.py", line 63, in init model_name, True, override_weights_file, override_weights_strip_prefix File "/home/yanghaofeng/anaconda3/envs/dygiepp/lib/python3.7/site-packages/allennlp/common/cached_transformers.py", line 79, in get transformer = AutoModel.from_pretrained(model_name) File "/home/yanghaofeng/anaconda3/envs/dygiepp/lib/python3.7/site-packages/transformers/modeling_auto.py", line 502, in from_pretrained return model_class.from_pretrained(pretrained_model_name_or_path, model_args, config=config, **kwargs) File "/home/yanghaofeng/anaconda3/envs/dygiepp/lib/python3.7/site-packages/transformers/modeling_utils.py", line 662, in from_pretrained raise EnvironmentError(msg) OSError: Can't load weights for 'microsoft/BiomedNLP-PubMedBERT-base-uncased-abstract-fulltext'. Make sure that:

mk-runner commented 2 weeks ago

microsoft/BiomedNLP-BiomedBERT-base-uncased-abstract-fulltext is a pre-trained model used in RadGraph, which can be downloaded in huggingface.

The experimental setup includes two virtual environments: one for extracting factual serialization from radiology reports using the structural entities approach (see knowledge_encoder/radgraph_requirements.txt for details), and the other for running the overall FSE framework excluding the structural entities approach (see requirements.txt for more information).

milky-FatJay commented 2 weeks ago

microsoft/BiomedNLP-BiomedBERT-base-uncased-abstract-fulltext is a pre-trained model used in RadGraph, which can be downloaded in huggingface.

The experimental setup includes two virtual environments: one for extracting factual serialization from radiology reports using the structural entities approach (see knowledge_encoder/radgraph_requirements.txt for details), and the other for running the overall FSE framework excluding the structural entities approach (see requirements.txt for more information).

感谢作者的提醒,我把radgraph里面的model.tar.gz解压了之后发现了这个配置,现在问题已经解决了

milky-FatJay commented 2 weeks ago

microsoft/BiomedNLP-BiomedBERT-base-uncased-abstract-fulltext is a pre-trained model used in RadGraph, which can be downloaded in huggingface.

The experimental setup includes two virtual environments: one for extracting factual serialization from radiology reports using the structural entities approach (see knowledge_encoder/radgraph_requirements.txt for details), and the other for running the overall FSE framework excluding the structural entities approach (see requirements.txt for more information).

请问mimic_cxr_annotation_sen_best_reports_keywords_20.json是哪里来的,我经过运行knowledge_encoder/factual_serialization.py只生成了mimic_cxr_annotation_sen.json

mk-runner commented 2 weeks ago

image