Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some problems #4

Open
milky-FatJay opened this issue Nov 16, 2024 · 4 comments
Open

some problems #4

milky-FatJay opened this issue Nov 16, 2024 · 4 comments

Comments

@milky-FatJay
Copy link

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:

  • 'microsoft/BiomedNLP-PubMedBERT-base-uncased-abstract-fulltext' is a correct model identifier listed on 'https://huggingface.co/models'

  • or 'microsoft/BiomedNLP-PubMedBERT-base-uncased-abstract-fulltext' is the correct path to a directory containing a file named one of pytorch_model.bin, tf_model.h5, model.ckpt.
    在执行factual_serialization.py出现了如上错误,但是文件中根本没有microsoft/BiomedNLP-PubMedBERT-base-uncased-abstract-fulltext,请问你有遇到这种问题吗

@mk-runner
Copy link
Owner

mk-runner commented Nov 16, 2024

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
Copy link
Author

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
Copy link
Author

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
Copy link
Owner

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants