Repository: modelscope/evalscope
Issue: vllm服务+toolbench报错maximum recursion depth exceeded in comparison
Root cause: External Dependency Breakage

## 问题描述

-[前置问题，环境与脚本一致](https://github.com/modelscope/evalscope/issues/586)
-启动后顺利执行，但是在最后几个样例报错

## EvalScope 版本（必填）
v0.16.0

## 使用的工具
Toolbench

## 执行的代码或指令
from evalscope import TaskConfig, run_task
from evalscope import TaskConfig, run_task
from evalscope.constants import EvalType, JudgeStrategy
task_cfg = TaskConfig(
model='Qwen3-14B',
datasets=['tool_bench'],
dataset_args={
'tool_bench': {
"local_path": "/mnt/workspace/00_NLPTeam_space/hqy_workspace/EvalScope/dataset/ToolBench-Static", # 自定义数据集路径
"subset_list": [
"in_domain" ,
"out_of_domain"# 评测数据集名称，上述subset_name
]
}
},
eval_batch_size=5,
api_url='http://0.0.0.0:8000/v1',
api_key='EMPTY',
eval_type=EvalType.SERVICE,
generation_config={
'max_new_tokens': 8192, # 最大生成token数，建议设置为较大值避免输出截断
'temperature': 0, # 采样温度 (qwen 报告推荐值)
'top_p': 0.8, # top-p采样 (qwen 报告推荐值)
'top_k': 20, # top-k采样 (qwen 报告推荐值)
'chat_template_kwargs': {'enable_thinking': False}# 关闭思考模式
}
)

run_task(task_cfg=task_cfg)


## 错误日志

Predicting(in_domain): 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1588/1588 [30:00<00:00,  1.13s/it]
2025-05-26 10:00:15,349 - evalscope - INFO - Dump predictions to ./outputs/20250526_092957/predictions/Qwen3-14B/tool_bench_in_domain.jsonl.
Reviewing(in_domain): 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1588/1588 [00:06<00:00, 256.06it/s]
Predicting(out_of_domain): 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 781/781 [18:11<00:00,  1.40s/it]
2025-05-26 10:18:32,891 - evalscope - INFO - Dump predictions to ./outputs/20250526_092957/predictions/Qwen3-14B/tool_bench_out_of_domain.jsonl.
Reviewing(out_of_domain): 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▎| 779/781 [00:03<00:00, 216.94it/s]
Traceback (most recent call last):
  File "/mnt/workspace/00_NLPTeam_space/hqy_workspace/EvalScope/sh/toolbench.py", line 32, in <module>
    run_task(task_cfg=task_cfg)
  File "/mnt/data/miniconda3/envs/evalscope/lib/python3.10/site-packages/evalscope/run.py", line 31, in run_task
    return run_single_task(task_cfg, run_time)
  File "/mnt/data/miniconda3/envs/evalscope/lib/python3.10/site-packages/evalscope/run.py", line 44, in run_single_task
    result = evaluate_model(task_cfg, outputs)
  File "/mnt/data/miniconda3/envs/evalscope/lib/python3.10/site-packages/evalscope/run.py", line 130, in evaluate_model
    res_dict = evaluator.eval()
  File "/mnt/data/miniconda3/envs/evalscope/lib/python3.10/site-packages/evalscope/evaluator/evaluator.py", line 452, in eval
    reviews_list: list = self.get_reviews(subset_name=subset_name, answers_list=answers_list, **kwargs)
  File "/mnt/data/miniconda3/envs/evalscope/lib/python3.10/site-packages/evalscope/evaluator/evaluator.py", line 320, in get_reviews
    review_d = future.result()
  File "/mnt/data/miniconda3/envs/evalscope/lib/python3.10/concurrent/futures/_base.py", line 451, in result
    return self.__get_result()
  File "/mnt/data/miniconda3/envs/evalscope/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
    raise self._exception
  File "/mnt/data/miniconda3/envs/evalscope/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/mnt/data/miniconda3/envs/evalscope/lib/python3.10/site-packages/evalscope/evaluator/evaluator.py", line 310, in process_single_review
    review_d = self._get_review(answer_d=answer_d, review_id=review_id, reviewer_spec=reviewer_spec)
  File "/mnt/data/miniconda3/envs/evalscope/lib/python3.10/site-packages/evalscope/evaluator/evaluator.py", line 240, in _get_review
    review_result = self.data_adapter.match(gold_content, pred_content)
  File "/mnt/data/miniconda3/envs/evalscope/lib/python3.10/site-packages/evalscope/benchmarks/tool_bench/tool_bench_adapter.py", line 63, in match
    metrics = calculate_metrics(data)
  File "/mnt/data/miniconda3/envs/evalscope/lib/python3.10/site-packages/evalscope/benchmarks/tool_bench/utils.py", line 190, in calculate_metrics
    rouge = evaluate_rougel(answer_pred, answer_ref)
  File "/mnt/data/miniconda3/envs/evalscope/lib/python3.10/site-packages/evalscope/benchmarks/tool_bench/utils.py", line 9, in evaluate_rougel
    rouge_score = rouge.get_scores(hyps=cand_list, refs=ref_list, avg=True)
  File "/mnt/data/miniconda3/envs/evalscope/lib/python3.10/site-packages/rouge/rouge.py", line 108, in get_scores
    return self._get_avg_scores(hyps, refs)
  File "/mnt/data/miniconda3/envs/evalscope/lib/python3.10/site-packages/rouge/rouge.py", line 148, in _get_avg_scores
    sc = fn(hyp, ref, exclusive=self.exclusive)
  File "/mnt/data/miniconda3/envs/evalscope/lib/python3.10/site-packages/rouge/rouge.py", line 59, in <lambda>
    rouge_score.rouge_l_summary_level(hyp, ref, **k),
  File "/mnt/data/miniconda3/envs/evalscope/lib/python3.10/site-packages/rouge/rouge_score.py", line 389, in rouge_l_summary_level
    lcs_count, union = _union_lcs(evaluated_sentences,
  File "/mnt/data/miniconda3/envs/evalscope/lib/python3.10/site-packages/rouge/rouge_score.py", line 333, in _union_lcs
    lcs = _recon_lcs(reference_words, evaluated_words, exclusive=exclusive)
  File "/mnt/data/miniconda3/envs/evalscope/lib/python3.10/site-packages/rouge/rouge_score.py", line 190, in _recon_lcs
    recon_list = list(map(lambda x: x[0], _recon(i, j)))
  File "/mnt/data/miniconda3/envs/evalscope/lib/python3.10/site-packages/rouge/rouge_score.py", line 188, in _recon
    return _recon(i, j - 1)
  File "/mnt/data/miniconda3/envs/evalscope/lib/python3.10/site-packages/rouge/rouge_score.py", line 188, in _recon
    return _recon(i, j - 1)
  File "/mnt/data/miniconda3/envs/evalscope/lib/python3.10/site-packages/rouge/rouge_score.py", line 188, in _recon
    return _recon(i, j - 1)
  [Previous line repeated 979 more times]
  File "/mnt/data/miniconda3/envs/evalscope/lib/python3.10/site-packages/rouge/rouge_score.py", line 185, in _recon
    elif table[i - 1, j] > table[i, j - 1]:
RecursionError: maximum recursion depth exceeded in comparison

## 运行环境

操作系统：Linux
Python版本：3.10
Name: openai Version: 1.72.0
vllm==0.8.5


main分支已修复该问题，请更新代码使用

> 感谢你的反馈！我们将关闭此问题。如果您有任何疑问，请随时重新打开它。如果EvalScope对您有所帮助，欢迎给我们点个STAR以示支持，谢谢！