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

conda develop . # Adds DyGIE to your PYTHONPATH #2

Open milky-FatJay opened 1 month ago

milky-FatJay commented 1 month ago

F6773864811B946980077839A42A5FB1 在执行conda develop . 的时候报错,请问有没有方法可以解决这个问题

mk-runner commented 1 month ago

F6773864811B946980077839A42A5FB1 在执行conda develop . 的时候报错,请问有没有方法可以解决这个问题

建议新建一个新环境,python 3.7,我的具体环境配置如knowledge_encoder/radgraph_requirements.yml

milky-FatJay commented 1 month ago

F6773864811B946980077839A42A5FB1 在执行conda develop . 的时候报错,请问有没有方法可以解决这个问题

建议新建一个新环境,python 3.7,我的具体环境配置如knowledge_encoder/radgraph_requirements.yml

我已经把radgraph环境配置成功了,但是在执行配置dygiepp环境配置中的conda develop .命令仍然报错,请问这个命令的目的是什么

mk-runner commented 1 month ago

F6773864811B946980077839A42A5FB1 在执行conda develop . 的时候报错,请问有没有方法可以解决这个问题

建议新建一个新环境,python 3.7,我的具体环境配置如knowledge_encoder/radgraph_requirements.yml

我已经把radgraph环境配置成功了,但是在执行配置dygiepp环境配置中的conda develop .命令仍然报错,请问这个命令的目的是什么

dygiepp环境配置,我参考的是“https://github.com/dwadden/dygiepp” 。 至于“conda develop . ”的目的,dygiepp写的是“ # Adds DyGIE to your PYTHONPATH”。

在实现RadGraph时,它是基于allennlp工具提取诊断报告中的实体与关系,allennlp又基于dygie实现的,具体实现如下所示:

os.system(f"allennlp predict {self.model_path} {self.input_path} \ --predictor dygie --include-package dygie \ --use-dataset-reader \ --output-file {self.output_path} \ --silent")

因此,dygie环境必须配置好。建议新建一个虚拟环境,严格按照dygie要求配置其环境(备注:你的python是3.11,而dygie要求3.7)

milky-FatJay commented 2 weeks ago

F6773864811B946980077839A42A5FB1 在执行conda develop . 的时候报错,请问有没有方法可以解决这个问题

建议新建一个新环境,python 3.7,我的具体环境配置如knowledge_encoder/radgraph_requirements.yml

我已经把radgraph环境配置成功了,但是在执行配置dygiepp环境配置中的conda develop .命令仍然报错,请问这个命令的目的是什么

dygiepp环境配置,我参考的是“https://github.com/dwadden/dygiepp” 。 至于“conda develop . ”的目的,dygiepp写的是“ # Adds DyGIE to your PYTHONPATH”。

在实现RadGraph时,它是基于allennlp工具提取诊断报告中的实体与关系,allennlp又基于dygie实现的,具体实现如下所示:

os.system(f"allennlp predict {self.model_path} {self.input_path} \ --predictor dygie --include-package dygie \ --use-dataset-reader \ --output-file {self.output_path} \ --silent")

因此,dygie环境必须配置好。建议新建一个虚拟环境,严格按照dygie要求配置其环境(备注:你的python是3.11,而dygie要求3.7)

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: