opencompass icon indicating copy to clipboard operation
opencompass copied to clipboard

[Bug] Deepseek 升级deepseek-v3.1-terminus后,为何调用ksyun的DS API失败

Open hongmingzhang8 opened this issue 2 months ago • 2 comments

Prerequisite

Type

I'm evaluating with the officially supported tasks/models/datasets.

Environment

pip list |grep opencompass
opencompass 0.5.0 /root/opencompass

Reproduces the problem - code/configuration sample

python run.py --models deepseek_remote_api.py --datasets ceval_gen --debug

上周可以执行成功,本周无法执行,如果使用ksyun的demo 可以执行

Reproduces the problem - command or script

from opencompass.models import OpenAISDK

api_meta_template = dict( round=[ dict(role='HUMAN', api_role='HUMAN'), dict(role='BOT', api_role='BOT', generate=True), ], reserved_roles=[dict(role='SYSTEM', api_role='SYSTEM')], )

models = [ dict( abbr='deepseek-v3.1', type= OpenAISDK, key='1ea7b735-6fc9-49ee-a10f-###########', # API key openai_api_base='https://kspmas.ksyun.com/v1/', # 服务IP path='deepseek-v3.1', #请求服务时的 model name meta_template=api_meta_template, # 服务请求模板 query_per_second=10, # 服务请求速率 max_out_len=1024, # 最大输出长度 max_seq_len=4096, # 最大输入长度 temperature=0.01, # 生成温度 batch_size=8, # 批处理大小 retry=3, # 重试次数 ) ]

Reproduces the problem - error message

100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 24/24 [00:00<00:00, 762600.73it/s] [2025-09-23 16:13:29,640] [opencompass.openicl.icl_inferencer.icl_gen_inferencer] [INFO] Starting build dataloader [2025-09-23 16:13:29,641] [opencompass.openicl.icl_inferencer.icl_gen_inferencer] [INFO] Starting inference process... 0%| | 0/3 [00:00<?, ?it/s]09/23 16:13:39 - OpenCompass - ERROR - /root/opencompass/opencompass/models/openai_api.py - _generate - 789 - error occurs at https://kspmas.ksyun.com/v1/?, ?it/s] 09/23 16:13:39 - OpenCompass - ERROR - /root/opencompass/opencompass/models/openai_api.py - _generate - 790 - 'NoneType' object is not subscriptable 09/23 16:13:39 - OpenCompass - ERROR - /root/opencompass/opencompass/models/openai_api.py - _generate - 789 - error occurs at https://kspmas.ksyun.com/v1/ 09/23 16:13:39 - OpenCompass - ERROR - /root/opencompass/opencompass/models/openai_api.py - _generate - 790 - 'NoneType' object is not subscriptable 09/23 16:13:39 - OpenCompass - ERROR - /root/opencompass/opencompass/models/openai_api.py - _generate - 789 - error occurs at https://kspmas.ksyun.com/v1/ 09/23 16:13:39 - OpenCompass - ERROR - /root/opencompass/opencompass/models/openai_api.py - _generate - 790 - 'NoneType' object is not subscriptable 09/23 16:13:39 - OpenCompass - ERROR - /root/opencompass/opencompass/models/openai_api.py - _generate - 789 - error occurs at https://kspmas.ksyun.com/v1/ 09/23 16:13:39 - OpenCompass - ERROR - /root/opencompass/opencompass/models/openai_api.py - _generate - 790 - 'NoneType' object is not subscriptable 09/23 16:13:40 - OpenCompass - ERROR - /root/opencompass/opencompass/models/openai_api.py - _generate - 789 - error occurs at https://kspmas.ksyun.com/v1/ 09/23 16:13:40 - OpenCompass - ERROR - /root/opencompass/opencompass/models/openai_api.py - _generate - 790 - 'NoneType' object is not subscriptable Inferencing: 0%| | 0/8 [00:10<?, ?it/s] 09/23 16:13:42 - OpenCompass - ERROR - /root/opencompass/opencompass/models/openai_api.py - _generate - 789 - error occurs at https://kspmas.ksyun.com/v1/ 09/23 16:13:42 - OpenCompass - ERROR - /root/opencompass/opencompass/models/openai_api.py - _generate - 790 - 'NoneType' object is not subscriptable 0%| | 0/3 [00:12<?, ?it/s] Traceback (most recent call last): File "/root/opencompass/run.py", line 4, in main() File "/root/opencompass/opencompass/cli/main.py", line 354, in main runner(tasks) File "/root/opencompass/opencompass/runners/base.py", line 38, in call status = self.launch(tasks) File "/root/opencompass/opencompass/runners/local.py", line 128, in launch task.run(cur_model=getattr(self, 'cur_model', File "/root/opencompass/opencompass/tasks/openicl_infer.py", line 90, in run self._inference() File "/root/opencompass/opencompass/tasks/openicl_infer.py", line 140, in _inference inferencer.inference(retriever, File "/root/opencompass/opencompass/openicl/icl_inferencer/icl_gen_inferencer.py", line 153, in inference results = self.model.generate_from_template( File "/root/opencompass/opencompass/models/base.py", line 201, in generate_from_template return self.generate(inputs, max_out_len=max_out_len, **kwargs) File "/root/opencompass/opencompass/models/openai_api.py", line 189, in generate results = list( File "/root/anaconda3/envs/open-compass/lib/python3.10/site-packages/tqdm/std.py", line 1181, in iter for obj in iterable: File "/root/anaconda3/envs/open-compass/lib/python3.10/concurrent/futures/_base.py", line 621, in result_iterator yield _result_or_cancel(fs.pop()) File "/root/anaconda3/envs/open-compass/lib/python3.10/concurrent/futures/_base.py", line 319, in _result_or_cancel return fut.result(timeout) File "/root/anaconda3/envs/open-compass/lib/python3.10/concurrent/futures/_base.py", line 458, in result return self.__get_result() File "/root/anaconda3/envs/open-compass/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result raise self._exception File "/root/anaconda3/envs/open-compass/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/root/opencompass/opencompass/models/openai_api.py", line 792, in _generate raise RuntimeError('Calling OpenAI API failed after retrying for ' RuntimeError: Calling OpenAI API failed after retrying for 3 times. Check the logs for details.

Other information

python run.py --models deepseek_remote_api.py --datasets ceval_gen --debug

hongmingzhang8 avatar Sep 23 '25 12:09 hongmingzhang8