Description
Reminder
- I have read the README and searched the existing issues.
System Info
llamafactory
version: 0.8.3.dev0- Platform: Linux-3.10.0-1160.el7.x86_64-x86_64-with-glibc2.17
- Python version: 3.11.9
- PyTorch version: 2.3.0+cu121 (GPU)
- Transformers version: 4.44.2
- Datasets version: 2.21.0
- Accelerate version: 0.33.0
- PEFT version: 0.12.0
- TRL version: 0.9.6
- GPU type: NVIDIA A40
- DeepSpeed version: 0.15.0
- vLLM version: 0.4.3
Reproduction
API_PORT=6623 llamafactory-cli api --model_name_or_path: xxxxx --template: intern2 --stage: rm
服务正常启动后运行
curl http://xxxx:6623/v1/score/evaluation
-H "Content-Type: application/json"
-d '{
"model": xxxx,
"messages": ["xxxxx"]
}'
后返回报错
Internal Server Error
具体错误为
File "/LLaMA-Factory/src/llamafactory/api/chat.py", line 237, in create_score_evaluation_response
return ScoreEvaluationResponse(id='test',model=request.model, scores=scores)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/anaconda/envs/llamafcvllm/lib/python3.11/site-packages/pydantic/main.py", line 193, in init
self.pydantic_validator.validate_python(data, self_instance=self)
pydantic_core._pydantic_core.ValidationError: 1 validation error for ScoreEvaluationResponse
id
Field required [type=missing, input_value={'model': '/ssd11/other/s...[0.87109375, 0.8828125]}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.8/v/missing
src/llamafactory/api/chat.py中
ScoreEvaluationResponse缺少id字段?
Expected behavior
No response
Others
No response
Activity