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

【大模型_03】对LLM模型进行fine-tune实现外卖评价情感分类运行预测项目时报错 #70040

Open
xdguo86 opened this issue Dec 8, 2024 · 4 comments
Assignees

Comments

@xdguo86
Copy link

xdguo86 commented Dec 8, 2024

bug描述 Describe the Bug

【大模型_03】对LLM模型进行fine-tune实现外卖评价情感分类项目
此项目是公开的,应该可以稳定复现bug
运行时选择的是基础版
环境配置详情
GPU /
Video Mem /
CPU 2 Cores
RAM 8GB
Disk 100GB
基础版 Quota
不限时
当运行步骤至:

预测, 预测过程中的日志自动保存在/home/aistudio/output/predict_result_finetune.txt文件中。

%cd /home/aistudio/ERNIE/applications/tasks/text_classification
!python run_infer.py --param_path /home/aistudio/config/cls_ernie_fc_ch_infer_finetune.json

尾部就要报错信息:
WARNING: 12-08 11:27:38: register.py:25 * 140469666375424 Key WordsegTokenizer already in registry tokenizer.
INFO: 12-08 11:27:38: params.py:43 * 140469666375424 /home/aistudio/ERNIE/applications/tasks/text_classification/output/cls_ernie_3.0_base_fc_ch_dy/save_inference_model/inference_step_901/infer_data_params.json
Traceback (most recent call last):
File "run_infer.py", line 71, in
inference = build_inference(inference_params_dict, dataset_reader, parse_predict_result)
File "run_infer.py", line 30, in build_inference
inference = inference_class(params=params_dict, data_set_reader=dataset_reader, parser_handler=parser_handler)
File "/home/aistudio/ERNIE/applications/tasks/text_classification/inference/custom_inference.py", line 24, in init
BaseInference.init(self, params, data_set_reader, parser_handler)
File "../../../erniekit/controller/inference.py", line 38, in init
self.parser_input_keys()
File "../../../erniekit/controller/inference.py", line 106, in parser_input_keys
param_dict = params.from_file(data_params_path)
File "../../../erniekit/utils/params.py", line 50, in from_file
json_file = json.loads(evaluate_file(filename), strict=False)
File "../../../erniekit/utils/params.py", line 44, in evaluate_file
with open(filename, "r") as evaluation_file:
FileNotFoundError: [Errno 2] No such file or directory: '/home/aistudio/ERNIE/applications/tasks/text_classification/output/cls_ernie_3.0_base_fc_ch_dy/save_inference_model/inference_step_901/infer_data_params.json'

请问这个报错是什么原因呢?

其他补充信息 Additional Supplementary Information

No response

@luyao-cv
Copy link

luyao-cv commented Dec 9, 2024

报错文件未找到错误。请检查下:

  1. 模型训练过程可能没有正确完成或中断,导致没有生成必要的推理参数文件(infer_data_params.json)。先确认训练是否成功完成,检查训练日志。
  2. 配置文件中指定的模型保存路径可能有误。需要检查看是否有问题。

@xdguo86
Copy link
Author

xdguo86 commented Dec 9, 2024 via email

@xdguo86
Copy link
Author

xdguo86 commented Dec 11, 2024

报错文件未找到错误。请检查下:

模型训练过程可能没有正确完成或中断,导致没有生成必要的推理参数文件(infer_data_params.json)。先确认训练是否成功完成,检查训练日志。-----------应该没有异常中断,本地稳定重现,请问训练日志哪里查看呢?
配置文件中指定的模型保存路径可能有误。需要检查看是否有问题。----------没有修改此项目任何代码。

@xdguo86
Copy link
Author

xdguo86 commented Dec 11, 2024

https://aistudio.baidu.com/projectdetail/8654879?forkThirdPart=1
如果只看最后的运行结果,我这边也是可以看到饼图的,但是中间4.2最后这个部分的执行结果,需要下拉灰色部分到底部。
Traceback (most recent call last):
File "run_trainer.py", line 129, in
paddle.set_device(trainer_params.get("PADDLE_PLACE_TYPE", "cpu"))
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/device/init.py", line 313, in set_device
place = _convert_to_place(device)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/device/init.py", line 202, in _convert_to_place
raise ValueError("The device should not be 'gpu', "
ValueError: The device should not be 'gpu', since PaddlePaddle is not compiled with

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

No branches or pull requests

2 participants