Repository: modelscope/evalscope
Issue: run_task 函数不可用
Root cause: External Dependency Breakage



## 问题描述

shell脚本方式可以正常评测，run_task函数模式失败

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

## 使用的工具
- [x] Native / 原生框架

## 执行的代码或指令

from evalscope.run import run_task
from evalscope.config import TaskConfig

task_cfg = TaskConfig(
    model='Qwen/Qwen2.5-0.5B-Instruct',
    datasets=['gsm8k', 'arc'],
    limit=5
)

run_task(task_cfg=task_cfg)

## 错误日志

2025-07-17 18:06:37,744 - evalscope - INFO - Args: Task config is provided with TaskConfig type.
2025-07-17 18:06:37,746 - evalscope - INFO - Loading model Qwen/Qwen2.5-0.5B-Instruct ...
Downloading Model from https://www.modelscope.cn/ to directory: /root/.cache/modelscope/hub/models/Qwen/Qwen2.5-0.5B-Instruct
Downloading Model from https://www.modelscope.cn/ to directory: /root/.cache/modelscope/hub/models/Qwen/Qwen2.5-0.5B-Instruct
Downloading Model from https://www.modelscope.cn/ to directory: /root/.cache/modelscope/hub/models/Qwen/Qwen2.5-0.5B-Instruct
2025-07-17 18:06:40,446 - evalscope - INFO - Updating generation config ...
Downloading Model from https://www.modelscope.cn/ to directory: /root/.cache/modelscope/hub/models/Qwen/Qwen2.5-0.5B-Instruct
2025-07-17 18:06:41,275 - evalscope - INFO - Updating generation config ...
2025-07-17 18:06:41,321 - evalscope - INFO - Dump task config to ./outputs/20250717_180637/configs/task_config_07e034.yaml
2025-07-17 18:06:41,324 - evalscope - INFO - {
    "model": "Qwen/Qwen2.5-0.5B-Instruct",
    "model_id": "Qwen2.5-0.5B-Instruct",
    "model_args": {
        "revision": "master",
        "precision": "torch.float16"
    },
    "model_task": "text_generation",
    "template_type": null,
    "chat_template": null,
    "datasets": [
        "gsm8k",
        "arc"
    ],
    "dataset_args": {
        "gsm8k": {
            "name": "gsm8k",
            "dataset_id": "modelscope/gsm8k",
            "model_adapter": "generation",
            "output_types": [
                "generation"
            ],
            "subset_list": [
                "main"
            ],
            "metric_list": [
                "AverageAccuracy"
            ],
            "few_shot_num": 0,
            "few_shot_random": false,
            "train_split": null,
            "eval_split": "test",
            "prompt_template": "Question: {query}\nLet's think step by step\nAnswer:",
            "system_prompt": null,
            "query_template": null,
            "pretty_name": "GSM8K",
            "description": "GSM8K (Grade School Math 8K) is a dataset of grade school math problems, designed to evaluate the mathematical reasoning abilities of AI models.",
            "tags": [
                "Mathematics"
            ],
            "filters": null,
            "extra_params": {}
        },
        "arc": {
            "name": "arc",
            "dataset_id": "modelscope/ai2_arc",
            "model_adapter": "generation",
            "output_types": [
                "multiple_choice_logits",
                "generation"
            ],
            "subset_list": [
                "ARC-Easy",
                "ARC-Challenge"
            ],
            "metric_list": [
                "AverageAccuracy"
            ],
            "few_shot_num": 0,
            "few_shot_random": false,
            "train_split": "train",
            "eval_split": "test",
            "prompt_template": "Given the following question and four candidate answers (A, B, C and D), choose the best answer.\n{query}\nYour response should end with \"The best answer is [the_answer_letter]\" where the [the_answer_letter] is one of A, B, C or D.",
            "system_prompt": null,
            "query_template": null,
            "pretty_name": "ARC",
            "description": "The ARC (AI2 Reasoning Challenge) benchmark is designed to evaluate the reasoning capabilities of AI models through multiple-choice questions derived from science exams. It includes two subsets: ARC-Easy and ARC-Challenge, which vary in difficulty.",
            "tags": [
                "Reasoning",
                "MCQ"
            ],
            "filters": null,
            "extra_params": {}
        }
    },
    "dataset_dir": "/root/.cache/modelscope/hub/datasets",
    "dataset_hub": "modelscope",
    "generation_config": {
        "max_length": 2048,
        "max_new_tokens": 512,
        "do_sample": false,
        "top_k": 50,
        "top_p": 1.0,
        "temperature": 1.0
    },
    "eval_type": "checkpoint",
    "eval_backend": "Native",
    "eval_config": null,
    "stage": "all",
    "limit": 5,
    "eval_batch_size": 1,
    "mem_cache": false,
    "use_cache": null,
    "work_dir": "./outputs/20250717_180637",
    "outputs": null,
    "ignore_errors": false,
    "debug": false,
    "dry_run": false,
    "seed": 42,
    "api_url": null,
    "api_key": "EMPTY",
    "timeout": null,
    "stream": false,
    "judge_strategy": "auto",
    "judge_worker_num": 1,
    "judge_model_args": {},
    "analysis_report": false
}
2025-07-17 18:06:41,324 - evalscope - INFO - Start evaluating on dataset modelscope/gsm8k
2025-07-17 18:06:41,324 - evalscope - INFO - Loading dataset from hub: gsm8k
2025-07-17 18:06:41,325 - evalscope - INFO - Loading dataset: dataset_name: gsm8k > subsets: ['main']
ValueError: BuilderConfig Gsm8kConfig(name='main', version=1.1.0, data_dir=None, data_files=None, description='\nIt is segmented into 7.5K training problems and 1K test problems.\nThese problems take between 2 and 8 steps to solve, and solutions\nprimarily involve performing a sequence of elementary calculations\nusing basic arithmetic operations (+ - / *) to reach the final\nanswer. A bright middle school student should be able to solve\nevery problem.\n') doesn't have a 'dataset_args' key.

## 运行环境

- 操作系统：Ubuntu
- Python版本：Python 3.12.10



使用datasts=3.2.0版本试试，我这边无法复现这个问题

升级了版本没问题了👌