You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
使用PaddleNLP/slm/examples/machine_reading_comprehension
/SQuAD训完后export静态图,没有报错但目录中没有pdmodel文件,export日志:
[2025-04-15 20:30:54,323][ WARNING] - Detected that datasets module was imported before paddlenlp. This may cause PaddleNLP datasets to be unavalible in intranet. Please import paddlenlp before datasets module to avoid download issues
[2025-04-15 20:30:55,490][ INFO] - Loading configuration file ./trained_models/mrc_squad2_all45_v2/model_172000/config.json
[2025-04-15 20:30:55,491][ INFO] - Loading weights file ./trained_models/mrc_squad2_all45_v2/model_172000/model_state.pdparams
[2025-04-15 20:30:56,101][ INFO] - Loaded weights file from disk, setting weights to model.
W0415 20:30:56.327435 59824 gpu_resources.cc:119] Please NOTE: device: 0, GPU Compute Capability: 8.0, Driver API Version: 12.4, Runtime API Version: 12.3
W0415 20:30:56.328116 59824 gpu_resources.cc:164] device: 0, cuDNN Version: 9.8.
[2025-04-15 20:30:56,989][ INFO] - All model checkpoint weights were used when initializing ErnieForQuestionAnswering.
[2025-04-15 20:30:56,989][ INFO] - All the weights of ErnieForQuestionAnswering were initialized from the model checkpoint at ./trained_models/mrc_squad2_all45_v2/model_172000.
If your task is similar to the task the model of the checkpoint was trained on, you can already use ErnieForQuestionAnswering for predictions without further training.
/ssd3/zhaol/anaconda3/envs/paddlenlp_env/lib/python3.10/site-packages/paddle/jit/dy2static/program_translator.py:780: UserWarning: full_graph=False don't support input_spec arguments. It will not produce any effect.
You can set full_graph=True, then you can assign input spec.
warnings.warn(
/ssd3/zhaol/anaconda3/envs/paddlenlp_env/lib/python3.10/site-packages/paddlenlp/transformers/utils.py:204: UserWarning: The `forward` method of <class 'paddlenlp.transformers.ernie.modeling.ErnieModel'> is patched and the patch might be based on an old oversion which missing some arguments compared with the latest, such as ['output_hidden_states', 'output_attentions', 'return_dict']. We automatically add compatibility on the patch for these arguemnts, and maybe the patch should be updated.
warnings.warn(
/ssd3/zhaol/anaconda3/envs/paddlenlp_env/lib/python3.10/site-packages/paddlenlp/transformers/utils.py:212: UserWarning: The `forward` method of <class 'paddle.nn.layer.transformer.TransformerEncoder'> is patched and the patch might be conflict with patches made by paddlenlp which seems have more arguments such as ['output_hidden_states', 'output_attentions', 'return_dict']. We automatically add compatibility on the patch for these arguemnts, and maybe the patch should be updated.
warnings.warn(
[2025-04-15 20:30:58,691][ INFO] - tokenizer config file saved in ./infer_model/tokenizer_config.json
[2025-04-15 20:30:58,691][ INFO] - Special tokens file saved in ./infer_model/special_tokens_map.json
export之后的infer文件夹:
model.json model.pdiparams special_tokens_map.json tokenizer_config.json vocab.txt
运行python -u deploy/python/predict.py报错:
config = paddle.inference.Config(args.model_name_or_path + ".pdmodel", args.model_name_or_path + ".pdiparams")
RuntimeError: (NotFound) Cannot open file ./infer_model/model.pdmodel, please confirm whether the file is normal.
[Hint: Expected paddle::inference::IsFileExists(prog_file_) == true, but received paddle::inference::IsFileExists(prog_file_):0 != true:1.] (at ../paddle/fluid/inference/api/analysis_config.cc:112)
软件环境
重复问题
错误描述
稳定复现步骤 & 代码
我是按照https://github.com/PaddlePaddle/PaddleNLP/tree/develop/slm/examples/machine_reading_comprehension/SQuAD#%E9%9D%99%E6%80%81%E5%9B%BE%E9%A2%84%E6%B5%8B 的步骤进行的
The text was updated successfully, but these errors were encountered: