PaddleNLP icon indicating copy to clipboard operation
PaddleNLP copied to clipboard

[Question]: pp_uie微调之后, 推理的output.json没有输出

Open Chinesejunzai opened this issue 7 months ago • 4 comments
trafficstars

请提出你的问题

步骤链接: https://github.com/PaddlePaddle/PaddleNLP/tree/develop/llm/application/information_extraction 根据链接训练之后, 使用命令:

python predict/predictor.py \
    --model_name_or_path ./checkpoints/ie_ckpts \
    --dtype float16 \
    --data_file ./application/information_extraction/data/test.json \
    --output_file ./application/information_extraction/data/output.json \
    --src_length  512 \
    --max_length  1024 \
    --batch_size  4   

进行推理, 但是在对应的文件夹下找不到推理结果, 即output.json文件, 但是在推理过程中报:

/home/algo/miniconda3/envs/paddle_3/lib/python3.10/site-packages/paddle/utils/cpp_extension/extension_utils.py:711: UserWarning: No ccache found. Please be aware that recompiling all source files may be required. You can download and install ccache from: https://github.com/ccache/ccache/blob/master/doc/INSTALL.md
  warnings.warn(warning_message)
/home/algo/miniconda3/envs/paddle_3/lib/python3.10/site-packages/_distutils_hack/__init__.py:30: UserWarning: Setuptools is replacing distutils. Support for replacing an already imported distutils is deprecated. In the future, this condition will fail. Register concerns at https://github.com/pypa/setuptools/issues/new?template=distutils-deprecation.yml
  warnings.warn(
[2025-04-14 11:26:03,553] [ WARNING] - The paddlenlp_ops package is not installed. you can read the docs and install it by hand, you can refer to: https://github.com/PaddlePaddle/PaddleNLP/blob/develop/csrc/README.md
[2025-04-14 11:26:03,558] [ WARNING] - paddlenlp_ops does not exist, please install paddlenlp_ops.

查看这个是因为没有安装推理加速, 但是按照文档说明, 不安装只要不设置的对应参数即可, 推理还是可以继续完成的, 正常是应该有output.json文件的, 但是现在找不到是什么原因

Chinesejunzai avatar Apr 14 '25 03:04 Chinesejunzai

对应的环境为: ○ python 3.10.16 ○ paddlenlp=3.0.0b4.post20250405 ○ paddlepaddle-gpu==3.0.0.dev20250406

Chinesejunzai avatar Apr 14 '25 03:04 Chinesejunzai

你好,GPU有在运行吗?

ZHUI avatar Apr 15 '25 03:04 ZHUI

嗯嗯, 不使用GPU, 需要手动设置 --inference_model False --quant_type None 才能运行, 直接删除不写不行, 我看咱们文件中有默认值, 是不起作用么

Chinesejunzai avatar Apr 16 '25 07:04 Chinesejunzai

This issue is stale because it has been open for 60 days with no activity. 当前issue 60天内无活动,被标记为stale。

github-actions[bot] avatar Jun 16 '25 00:06 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale. 当前issue 被标记为stale已有14天,即将关闭。

github-actions[bot] avatar Jun 30 '25 00:06 github-actions[bot]

请提出你的问题

步骤链接: https://github.com/PaddlePaddle/PaddleNLP/tree/develop/llm/application/information_extraction 根据链接训练之后, 使用命令:

python predict/predictor.py
--model_name_or_path ./checkpoints/ie_ckpts
--dtype float16
--data_file ./application/information_extraction/data/test.json
--output_file ./application/information_extraction/data/output.json
--src_length 512
--max_length 1024
--batch_size 4
进行推理, 但是在对应的文件夹下找不到推理结果, 即output.json文件, 但是在推理过程中报:

/home/algo/miniconda3/envs/paddle_3/lib/python3.10/site-packages/paddle/utils/cpp_extension/extension_utils.py:711: UserWarning: No ccache found. Please be aware that recompiling all source files may be required. You can download and install ccache from: https://github.com/ccache/ccache/blob/master/doc/INSTALL.md warnings.warn(warning_message) /home/algo/miniconda3/envs/paddle_3/lib/python3.10/site-packages/_distutils_hack/init.py:30: UserWarning: Setuptools is replacing distutils. Support for replacing an already imported distutils is deprecated. In the future, this condition will fail. Register concerns at https://github.com/pypa/setuptools/issues/new?template=distutils-deprecation.yml warnings.warn( [2025-04-14 11:26:03,553] [ WARNING] - The paddlenlp_ops package is not installed. you can read the docs and install it by hand, you can refer to: https://github.com/PaddlePaddle/PaddleNLP/blob/develop/csrc/README.md [2025-04-14 11:26:03,558] [ WARNING] - paddlenlp_ops does not exist, please install paddlenlp_ops. 查看这个是因为没有安装推理加速, 但是按照文档说明, 不安装只要不设置的对应参数即可, 推理还是可以继续完成的, 正常是应该有output.json文件的, 但是现在找不到是什么原因

遇到了同样的问题,请问如何解决?

Vivi529 avatar Oct 18 '25 03:10 Vivi529