{
  "meta": {
    "pretty_name": "SWE-bench_Pro",
    "dataset_id": "ScaleAI/SWE-bench_Pro",
    "paper_url": null,
    "tags": [
      "Coding"
    ],
    "metrics": [
      "acc"
    ],
    "few_shot_num": 0,
    "eval_split": "test",
    "train_split": "",
    "subset_list": [
      "default"
    ],
    "description": "\n## Overview\n\nSWE-bench_Pro is a challenging benchmark from Scale AI evaluating LLMs/Agents on long-horizon software engineering tasks across multiple programming languages. Given a codebase and an issue, the model must autonomously explore the repository, edit source files, and submit a patch through a multi-turn agent loop inside a per-instance Docker container.\n\n## Task Description\n\n- **Task Type**: Automated Software Engineering / Bug Fixing (Agentic)\n- **Input**: GitHub issue description\n- **Output**: Code patch (diff format) collected after autonomous editing\n- **Languages**: Multiple (`repo_language` field; e.g. JavaScript/TypeScript, Python, Go)\n\n## Key Features\n\n- Multi-turn agent loop with per-instance DockerHub image (`jefzda/sweap-images:{tag}`)\n- Sentinel-based patch submission protocol (`COMPLETE_TASK_AND_SUBMIT_FINAL_OUTPUT`)\n- Container-side evaluation: `git apply` patch, run instance's `run_script.sh`, parse with `parser.py`, then check `(fail_to_pass | pass_to_pass) ⊆ PASSED`\n- Supports both `toolcall` (function-calling) and `backticks` (text-based) action protocols\n\n## Evaluation Notes\n\n- Requires `pip install evalscope[sandbox]` (provides Docker SDK via ms-enclave)\n- Requires the `scaleapi/SWE-bench_Pro-os` repository for per-instance run scripts and Dockerfiles. By default this is auto-cloned to `~/.cache/evalscope/swe_bench_pro/SWE-bench_Pro-os` and pinned to commit `ca10a60`. To use an existing clone, set `extra_params.swe_bench_pro_repo_path`.\n- Both the agent loop and the per-instance evaluation share a single sandbox configuration via `TaskConfig.sandbox.default_config` (passed straight to ms_enclave `DockerSandboxConfig`). Set `memory_limit` / `cpu_limit` there to avoid OOM-Killed test runs (e.g. NodeBB); `platform` defaults to `linux/amd64` so amd64-only sweap-images work on Apple Silicon out of the box.\n\nSee the [user guide](https://evalscope.readthedocs.io/en/latest/third_party/swe_bench_pro.html) for setup, parameters, and troubleshooting.\n",
    "prompt_template": "{question}",
    "system_prompt": "",
    "few_shot_prompt_template": "",
    "aggregation": "mean",
    "extra_params": {
      "swe_bench_pro_repo_path": {
        "type": "str",
        "description": "Local path to a clone of scaleapi/SWE-bench_Pro-os. If empty, auto-cloned to ~/.cache/evalscope/swe_bench_pro/SWE-bench_Pro-os and pinned to commit ca10a60.",
        "value": ""
      },
      "dockerhub_username": {
        "type": "str",
        "description": "DockerHub user/org hosting the sweap-images repository.",
        "value": "jefzda"
      },
      "action_protocol": {
        "type": "str",
        "description": "Agent action protocol: \"toolcall\" (function-calling) or \"backticks\" (text-based fallback for models without function-calling support).",
        "value": "toolcall",
        "choices": [
          "toolcall",
          "backticks"
        ]
      },
      "max_steps": {
        "type": "int",
        "description": "Maximum number of agent steps per sample.",
        "value": 250
      },
      "command_timeout": {
        "type": "float",
        "description": "Default per-bash-command timeout in seconds.",
        "value": 60.0
      },
      "eval_timeout": {
        "type": "int",
        "description": "Per-instance evaluation timeout in seconds.",
        "value": 3600
      }
    },
    "sandbox_config": {},
    "category": "agent"
  },
  "statistics": {
    "total_samples": 731,
    "subset_stats": [
      {
        "name": "default",
        "sample_count": 731,
        "prompt_length_mean": 1297.47,
        "prompt_length_min": 419,
        "prompt_length_max": 8036,
        "prompt_length_std": 581.33,
        "target_length_mean": null
      }
    ],
    "prompt_length": {
      "mean": 1297.47,
      "min": 419,
      "max": 8036,
      "std": 581.33
    },
    "target_length_mean": null,
    "computed_at": "2026-05-19T14:23:03.647499"
  },
  "sample_example": {
    "data": {
      "input": [
        {
          "id": "3874fd29",
          "content": "\"**Title: Email Validation Status Not Handled Correctly in ACP and Confirmation Logic**\\n\\n**Description:**\\n\\nThe Admin Control Panel (ACP) does not accurately reflect the email validation status of users. Also, validation and confirmation p ... [TRUNCATED 846 chars] ... mail validation.\\n\\nThe email status was unclear or incorrect in ACP.\\n\\n\\\"Validate\\\" and \\\"Send validation email\\\" actions failed when the expected data was missing.\\n\\n**Labels:**\\n\\nbug, back-end, authentication, ui/ux, email-confirmation\""
        }
      ],
      "id": 0,
      "group_id": 0,
      "tools": [
        {
          "name": "bash",
          "description": "Execute a bash command inside the sandbox environment. Returns the combined stdout / stderr output of the command.",
          "parameters": {
            "properties": {
              "command": {
                "type": "string",
                "description": "The bash command to execute."
              },
              "timeout": {
                "type": "number",
                "description": "Maximum execution time in seconds (default: 60).",
                "default": 60
              }
            },
            "required": [
              "command"
            ]
          }
        }
      ],
      "metadata": {
        "instance_id": "instance_NodeBB__NodeBB-04998908ba6721d64eba79ae3b65a351dcfbc5b5-vnan",
        "repo": "NodeBB/NodeBB",
        "base_commit": "1e137b07052bc3ea0da44ed201702c94055b8ad2",
        "problem_statement": "\"**Title: Email Validation Status Not Handled Correctly in ACP and Confirmation Logic**\\n\\n**Description:**\\n\\nThe Admin Control Panel (ACP) does not accurately reflect the email validation status of users. Also, validation and confirmation p ... [TRUNCATED 846 chars] ... mail validation.\\n\\nThe email status was unclear or incorrect in ACP.\\n\\n\\\"Validate\\\" and \\\"Send validation email\\\" actions failed when the expected data was missing.\\n\\n**Labels:**\\n\\nbug, back-end, authentication, ui/ux, email-confirmation\"",
        "patch": "diff --git a/public/language/en-GB/admin/manage/users.json b/public/language/en-GB/admin/manage/users.json\nindex 6b668a31ef8e..9486295bc3ef 100644\n--- a/public/language/en-GB/admin/manage/users.json\n+++ b/public/language/en-GB/admin/manage/us ... [TRUNCATED 12136 chars] ... class=\"notvalidated fa fa-check text-muted\" title=\"not validated\"></i>\n+\t\t\t\t\t\t\t\t<i class=\"noemail fa fa-fw fa-ban text-muted\"\"></i>\n \t\t\t\t\t\t\t\t<em class=\"text-muted\">[[admin/manage/users:users.no-email]]</em>\n \t\t\t\t\t\t\t\t{{{ end }}}\n \t\t\t\t\t\t\t</td>\n",
        "test_patch": "diff --git a/test/database/keys.js b/test/database/keys.js\nindex 3941edb65a93..fde4bbc442cf 100644\n--- a/test/database/keys.js\n+++ b/test/database/keys.js\n@@ -35,6 +35,17 @@ describe('Key methods', () => {\n \t\t});\n \t});\n \n+\tit('should return m ... [TRUNCATED 952 chars] ... {uid}`, 1000);\n+\t\t\tconst code = await db.get(`confirm:byUid:${uid}`);\n+\t\t\tawait db.setObjectField(`confirm:${code}`, 'expires', Date.now() + 1000);\n \t\t\tconst ok = await user.email.canSendValidation(uid, email);\n-\n \t\t\tassert(ok);\n \t\t});\n \t});\n",
        "fail_to_pass": "[\"test/database.js | Test database test/database/keys.js::Key methods should return multiple keys and null if key doesn't exist\", 'test/database.js | Test database test/database/keys.js::Key methods should return empty array if keys is empty array or falsy', 'test/user/emails.js | email confirmation (library methods) canSendValidation should return true if it has been long enough to re-send confirmation']",
        "pass_to_pass": "[\"test/database.js | Test database should work\", \"test/database.js | Test database info should return info about database\", \"test/database.js | Test database info should not error and return info if client is falsy\", \"test/database.js | Test  ... [TRUNCATED 45280 chars] ... pending or set\", \"test/user/emails.js | email confirmation (v3 api) should confirm their email (using the pending validation)\", \"test/user/emails.js | email confirmation (v3 api) should still confirm the email (as email is set in user hash)\"]",
        "before_repo_set_cmd": "git reset --hard 1e137b07052bc3ea0da44ed201702c94055b8ad2\ngit clean -fd \ngit checkout 1e137b07052bc3ea0da44ed201702c94055b8ad2 \ngit checkout 04998908ba6721d64eba79ae3b65a351dcfbc5b5 -- test/database/keys.js test/user/emails.js",
        "selected_test_files_to_run": "[\"test/database.js\", \"test/database/keys.js\", \"test/user/emails.js\"]",
        "repo_language": "js",
        "requirements": "\"- The loadUserInfo(callerUid, uids) function should include logic to retrieve and attach `email:pending` and `email:expired` flags to each user object. These flags must be derived by resolving `confirm:byUid:<uid>` keys via the new `getConfi ... [TRUNCATED 3170 chars] ... rval check must compare the stored TTL timestamp if available (or, if TTL is unavailable, use the current time as the baseline) plus the configured interval against the max confirmation period, ensuring the system prevents excessive resends.\"",
        "interface": "\"Type: Method\\n\\nName: db.mget\\n\\nPath: src/database/mongo/main.js, src/database/postgres/main.js, src/database/redis/main.js\\n\\nInput: keys: string[] (An array of database keys to retrieve.)\\n\\nOutput: Promise<(string | null)[]> (A promise t ... [TRUNCATED 487 chars] ...  to the email address string, or `null` if no suitable email is found.)\\n\\nDescription: A utility function that retrieves the most appropriate email address for an administrative action like \\\"force validate\\\" or \\\"resend validation email\\\".\"",
        "issue_specificity": "[\"major_bug\",\"data_bug\",\"ui_ux_bug\"]",
        "issue_categories": "[\"back_end_knowledge\",\"database_knowledge\",\"authentication_authorization_knowledge\",\"ui_ux_knowledge\"]",
        "dockerhub_tag": "nodebb.nodebb-NodeBB__NodeBB-04998908ba6721d64eba79ae3b65a351dcfbc5b5",
        "docker_image": "jefzda/sweap-images:nodebb.nodebb-NodeBB__NodeBB-04998908ba6721d64eba79ae3b65a351dcfbc5b5"
      }
    },
    "subset": "default",
    "truncated": false
  },
  "readme": {
    "en": "# SWE-bench_Pro\n\n\n## Overview\n\nSWE-bench_Pro is a challenging benchmark from Scale AI evaluating LLMs/Agents on long-horizon software engineering tasks across multiple programming languages. Given a codebase and an issue, the model must autonomously explore the repository, edit source files, and submit a patch through a multi-turn agent loop inside a per-instance Docker container.\n\n## Task Description\n\n- **Task Type**: Automated Software Engineering / Bug Fixing (Agentic)\n- **Input**: GitHub issue description\n- **Output**: Code patch (diff format) collected after autonomous editing\n- **Languages**: Multiple (`repo_language` field; e.g. JavaScript/TypeScript, Python, Go)\n\n## Key Features\n\n- Multi-turn agent loop with per-instance DockerHub image (`jefzda/sweap-images:{tag}`)\n- Sentinel-based patch submission protocol (`COMPLETE_TASK_AND_SUBMIT_FINAL_OUTPUT`)\n- Container-side evaluation: `git apply` patch, run instance's `run_script.sh`, parse with `parser.py`, then check `(fail_to_pass | pass_to_pass) ⊆ PASSED`\n- Supports both `toolcall` (function-calling) and `backticks` (text-based) action protocols\n\n## Evaluation Notes\n\n- Requires `pip install evalscope[sandbox]` (provides Docker SDK via ms-enclave)\n- Requires the `scaleapi/SWE-bench_Pro-os` repository for per-instance run scripts and Dockerfiles. By default this is auto-cloned to `~/.cache/evalscope/swe_bench_pro/SWE-bench_Pro-os` and pinned to commit `ca10a60`. To use an existing clone, set `extra_params.swe_bench_pro_repo_path`.\n- Both the agent loop and the per-instance evaluation share a single sandbox configuration via `TaskConfig.sandbox.default_config` (passed straight to ms_enclave `DockerSandboxConfig`). Set `memory_limit` / `cpu_limit` there to avoid OOM-Killed test runs (e.g. NodeBB); `platform` defaults to `linux/amd64` so amd64-only sweap-images work on Apple Silicon out of the box.\n\nSee the [user guide](https://evalscope.readthedocs.io/en/latest/third_party/swe_bench_pro.html) for setup, parameters, and troubleshooting.\n\n\n## Properties\n\n| Property | Value |\n|----------|-------|\n| **Benchmark Name** | `swe_bench_pro` |\n| **Dataset ID** | [ScaleAI/SWE-bench_Pro](https://modelscope.cn/datasets/ScaleAI/SWE-bench_Pro/summary) |\n| **Paper** | N/A |\n| **Tags** | `Coding` |\n| **Metrics** | `acc` |\n| **Default Shots** | 0-shot |\n| **Evaluation Split** | `test` |\n\n\n## Data Statistics\n\n| Metric | Value |\n|--------|-------|\n| Total Samples | 731 |\n| Prompt Length (Mean) | 1297.47 chars |\n| Prompt Length (Min/Max) | 419 / 8036 chars |\n\n## Sample Example\n\n**Subset**: `default`\n\n```json\n{\n  \"input\": [\n    {\n      \"id\": \"3874fd29\",\n      \"content\": \"\\\"**Title: Email Validation Status Not Handled Correctly in ACP and Confirmation Logic**\\\\n\\\\n**Description:**\\\\n\\\\nThe Admin Control Panel (ACP) does not accurately reflect the email validation status of users. Also, validation and confirmation p ... [TRUNCATED 846 chars] ... mail validation.\\\\n\\\\nThe email status was unclear or incorrect in ACP.\\\\n\\\\n\\\\\\\"Validate\\\\\\\" and \\\\\\\"Send validation email\\\\\\\" actions failed when the expected data was missing.\\\\n\\\\n**Labels:**\\\\n\\\\nbug, back-end, authentication, ui/ux, email-confirmation\\\"\"\n    }\n  ],\n  \"id\": 0,\n  \"group_id\": 0,\n  \"tools\": [\n    {\n      \"name\": \"bash\",\n      \"description\": \"Execute a bash command inside the sandbox environment. Returns the combined stdout / stderr output of the command.\",\n      \"parameters\": {\n        \"properties\": {\n          \"command\": {\n            \"type\": \"string\",\n            \"description\": \"The bash command to execute.\"\n          },\n          \"timeout\": {\n            \"type\": \"number\",\n            \"description\": \"Maximum execution time in seconds (default: 60).\",\n            \"default\": 60\n          }\n        },\n        \"required\": [\n          \"command\"\n        ]\n      }\n    }\n  ],\n  \"metadata\": {\n    \"instance_id\": \"instance_NodeBB__NodeBB-04998908ba6721d64eba79ae3b65a351dcfbc5b5-vnan\",\n    \"repo\": \"NodeBB/NodeBB\",\n    \"base_commit\": \"1e137b07052bc3ea0da44ed201702c94055b8ad2\",\n    \"problem_statement\": \"\\\"**Title: Email Validation Status Not Handled Correctly in ACP and Confirmation Logic**\\\\n\\\\n**Description:**\\\\n\\\\nThe Admin Control Panel (ACP) does not accurately reflect the email validation status of users. Also, validation and confirmation p ... [TRUNCATED 846 chars] ... mail validation.\\\\n\\\\nThe email status was unclear or incorrect in ACP.\\\\n\\\\n\\\\\\\"Validate\\\\\\\" and \\\\\\\"Send validation email\\\\\\\" actions failed when the expected data was missing.\\\\n\\\\n**Labels:**\\\\n\\\\nbug, back-end, authentication, ui/ux, email-confirmation\\\"\",\n    \"patch\": \"diff --git a/public/language/en-GB/admin/manage/users.json b/public/language/en-GB/admin/manage/users.json\\nindex 6b668a31ef8e..9486295bc3ef 100644\\n--- a/public/language/en-GB/admin/manage/users.json\\n+++ b/public/language/en-GB/admin/manage/us ... [TRUNCATED 12136 chars] ... class=\\\"notvalidated fa fa-check text-muted\\\" title=\\\"not validated\\\"></i>\\n+\\t\\t\\t\\t\\t\\t\\t\\t<i class=\\\"noemail fa fa-fw fa-ban text-muted\\\"\\\"></i>\\n \\t\\t\\t\\t\\t\\t\\t\\t<em class=\\\"text-muted\\\">[[admin/manage/users:users.no-email]]</em>\\n \\t\\t\\t\\t\\t\\t\\t\\t{{{ end }}}\\n \\t\\t\\t\\t\\t\\t\\t</td>\\n\",\n    \"test_patch\": \"diff --git a/test/database/keys.js b/test/database/keys.js\\nindex 3941edb65a93..fde4bbc442cf 100644\\n--- a/test/database/keys.js\\n+++ b/test/database/keys.js\\n@@ -35,6 +35,17 @@ describe('Key methods', () => {\\n \\t\\t});\\n \\t});\\n \\n+\\tit('should return m ... [TRUNCATED 952 chars] ... {uid}`, 1000);\\n+\\t\\t\\tconst code = await db.get(`confirm:byUid:${uid}`);\\n+\\t\\t\\tawait db.setObjectField(`confirm:${code}`, 'expires', Date.now() + 1000);\\n \\t\\t\\tconst ok = await user.email.canSendValidation(uid, email);\\n-\\n \\t\\t\\tassert(ok);\\n \\t\\t});\\n \\t});\\n\",\n    \"fail_to_pass\": \"[\\\"test/database.js | Test database test/database/keys.js::Key methods should return multiple keys and null if key doesn't exist\\\", 'test/database.js | Test database test/database/keys.js::Key methods should return empty array if keys is empty array or falsy', 'test/user/emails.js | email confirmation (library methods) canSendValidation should return true if it has been long enough to re-send confirmation']\",\n    \"pass_to_pass\": \"[\\\"test/database.js | Test database should work\\\", \\\"test/database.js | Test database info should return info about database\\\", \\\"test/database.js | Test database info should not error and return info if client is falsy\\\", \\\"test/database.js | Test  ... [TRUNCATED 45280 chars] ... pending or set\\\", \\\"test/user/emails.js | email confirmation (v3 api) should confirm their email (using the pending validation)\\\", \\\"test/user/emails.js | email confirmation (v3 api) should still confirm the email (as email is set in user hash)\\\"]\",\n    \"before_repo_set_cmd\": \"git reset --hard 1e137b07052bc3ea0da44ed201702c94055b8ad2\\ngit clean -fd \\ngit checkout 1e137b07052bc3ea0da44ed201702c94055b8ad2 \\ngit checkout 04998908ba6721d64eba79ae3b65a351dcfbc5b5 -- test/database/keys.js test/user/emails.js\",\n    \"selected_test_files_to_run\": \"[\\\"test/database.js\\\", \\\"test/database/keys.js\\\", \\\"test/user/emails.js\\\"]\",\n    \"repo_language\": \"js\",\n    \"requirements\": \"\\\"- The loadUserInfo(callerUid, uids) function should include logic to retrieve and attach `email:pending` and `email:expired` flags to each user object. These flags must be derived by resolving `confirm:byUid:<uid>` keys via the new `getConfi ... [TRUNCATED 3170 chars] ... rval check must compare the stored TTL timestamp if available (or, if TTL is unavailable, use the current time as the baseline) plus the configured interval against the max confirmation period, ensuring the system prevents excessive resends.\\\"\",\n    \"interface\": \"\\\"Type: Method\\\\n\\\\nName: db.mget\\\\n\\\\nPath: src/database/mongo/main.js, src/database/postgres/main.js, src/database/redis/main.js\\\\n\\\\nInput: keys: string[] (An array of database keys to retrieve.)\\\\n\\\\nOutput: Promise<(string | null)[]> (A promise t ... [TRUNCATED 487 chars] ...  to the email address string, or `null` if no suitable email is found.)\\\\n\\\\nDescription: A utility function that retrieves the most appropriate email address for an administrative action like \\\\\\\"force validate\\\\\\\" or \\\\\\\"resend validation email\\\\\\\".\\\"\",\n    \"issue_specificity\": \"[\\\"major_bug\\\",\\\"data_bug\\\",\\\"ui_ux_bug\\\"]\",\n    \"issue_categories\": \"[\\\"back_end_knowledge\\\",\\\"database_knowledge\\\",\\\"authentication_authorization_knowledge\\\",\\\"ui_ux_knowledge\\\"]\",\n    \"dockerhub_tag\": \"nodebb.nodebb-NodeBB__NodeBB-04998908ba6721d64eba79ae3b65a351dcfbc5b5\",\n    \"docker_image\": \"jefzda/sweap-images:nodebb.nodebb-NodeBB__NodeBB-04998908ba6721d64eba79ae3b65a351dcfbc5b5\"\n  }\n}\n```\n\n## Prompt Template\n\n**Prompt Template:**\n```text\n{question}\n```\n\n## Extra Parameters\n\n| Parameter | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `swe_bench_pro_repo_path` | `str` | `` | Local path to a clone of scaleapi/SWE-bench_Pro-os. If empty, auto-cloned to ~/.cache/evalscope/swe_bench_pro/SWE-bench_Pro-os and pinned to commit ca10a60. |\n| `dockerhub_username` | `str` | `jefzda` | DockerHub user/org hosting the sweap-images repository. |\n| `action_protocol` | `str` | `toolcall` | Agent action protocol: \"toolcall\" (function-calling) or \"backticks\" (text-based fallback for models without function-calling support). Choices: ['toolcall', 'backticks'] |\n| `max_steps` | `int` | `250` | Maximum number of agent steps per sample. |\n| `command_timeout` | `float` | `60.0` | Default per-bash-command timeout in seconds. |\n| `eval_timeout` | `int` | `3600` | Per-instance evaluation timeout in seconds. |\n\n## Usage\n\n### Using CLI\n\n```bash\nevalscope eval \\\n    --model YOUR_MODEL \\\n    --api-url OPENAI_API_COMPAT_URL \\\n    --api-key EMPTY_TOKEN \\\n    --datasets swe_bench_pro \\\n    --limit 10  # Remove this line for formal evaluation\n```\n\n### Using Python\n\n```python\nfrom evalscope import run_task\nfrom evalscope.config import TaskConfig\n\ntask_cfg = TaskConfig(\n    model='YOUR_MODEL',\n    api_url='OPENAI_API_COMPAT_URL',\n    api_key='EMPTY_TOKEN',\n    datasets=['swe_bench_pro'],\n    dataset_args={\n        'swe_bench_pro': {\n            # extra_params: {}  # uses default extra parameters\n        }\n    },\n    limit=10,  # Remove this line for formal evaluation\n)\n\nrun_task(task_cfg=task_cfg)\n```\n\n\n",
    "zh": "# SWE-bench_Pro\n\n\n## 概述\n\nSWE-bench_Pro 是由 Scale AI 提供的一项具有挑战性的基准测试，用于评估大语言模型（LLM）或智能体在多种编程语言环境下执行长周期软件工程任务的能力。给定一个代码库和一个问题描述，模型必须在每个实例专属的 Docker 容器内，通过多轮智能体交互循环，自主探索代码仓库、编辑源文件，并最终提交补丁。\n\n## 任务描述\n\n- **任务类型**：自动化软件工程 / 缺陷修复（智能体驱动）\n- **输入**：GitHub issue 描述\n- **输出**：自主编辑后收集的代码补丁（diff 格式）\n- **支持语言**：多种（由 `repo_language` 字段指定；例如 JavaScript/TypeScript、Python、Go）\n\n## 核心特性\n\n- 基于每实例 DockerHub 镜像（`jefzda/sweap-images:{tag}`）的多轮智能体交互循环\n- 基于哨兵（sentinel）的补丁提交协议（`COMPLETE_TASK_AND_SUBMIT_FINAL_OUTPUT`）\n- 容器端评估流程：应用 `git apply` 打补丁，运行实例对应的 `run_script.sh` 脚本，通过 `parser.py` 解析结果，并验证 `(fail_to_pass | pass_to_pass) ⊆ PASSED`\n- 同时支持 `toolcall`（函数调用）和 `backticks`（基于文本）两种动作协议\n\n## 评估说明\n\n- 需要安装 `pip install evalscope[sandbox]`（通过 ms-enclave 提供 Docker SDK）\n- 需要 `scaleapi/SWE-bench_Pro-os` 仓库以获取每实例的运行脚本和 Dockerfile。默认情况下，该仓库会自动克隆至 `~/.cache/evalscope/swe_bench_pro/SWE-bench_Pro-os` 并固定到 commit `ca10a60`。若要使用已有克隆，请设置 `extra_params.swe_bench_pro_repo_path`。\n- 智能体循环与每实例评估共享同一个沙箱配置（通过 `TaskConfig.sandbox.default_config` 直接传递给 ms_enclave 的 `DockerSandboxConfig`）。建议在此处设置 `memory_limit` / `cpu_limit`，以避免因内存不足导致测试被终止（例如 NodeBB 实例）；`platform` 默认为 `linux/amd64`，因此仅支持 amd64 的 sweap-images 可在 Apple Silicon 设备上开箱即用。\n\n有关环境设置、参数配置及故障排查，请参阅[用户指南](https://evalscope.readthedocs.io/zh-cn/latest/third_party/swe_bench_pro.html)。\n\n## 属性\n\n| 属性 | 值 |\n|----------|-------|\n| **基准测试名称** | `swe_bench_pro` |\n| **数据集ID** | [ScaleAI/SWE-bench_Pro](https://modelscope.cn/datasets/ScaleAI/SWE-bench_Pro/summary) |\n| **论文** | N/A |\n| **标签** | `Coding` |\n| **指标** | `acc` |\n| **默认示例数** | 0-shot |\n| **评估划分** | `test` |\n\n\n## 数据统计\n\n| 指标 | 值 |\n|--------|-------|\n| 总样本数 | 731 |\n| 提示词长度（平均） | 1297.47 字符 |\n| 提示词长度（最小/最大） | 419 / 8036 字符 |\n\n## 样例示例\n\n**子集**: `default`\n\n```json\n{\n  \"input\": [\n    {\n      \"id\": \"3874fd29\",\n      \"content\": \"\\\"**Title: Email Validation Status Not Handled Correctly in ACP and Confirmation Logic**\\\\n\\\\n**Description:**\\\\n\\\\nThe Admin Control Panel (ACP) does not accurately reflect the email validation status of users. Also, validation and confirmation p ... [TRUNCATED 846 chars] ... mail validation.\\\\n\\\\nThe email status was unclear or incorrect in ACP.\\\\n\\\\n\\\\\\\"Validate\\\\\\\" and \\\\\\\"Send validation email\\\\\\\" actions failed when the expected data was missing.\\\\n\\\\n**Labels:**\\\\n\\\\nbug, back-end, authentication, ui/ux, email-confirmation\\\"\"\n    }\n  ],\n  \"id\": 0,\n  \"group_id\": 0,\n  \"tools\": [\n    {\n      \"name\": \"bash\",\n      \"description\": \"Execute a bash command inside the sandbox environment. Returns the combined stdout / stderr output of the command.\",\n      \"parameters\": {\n        \"properties\": {\n          \"command\": {\n            \"type\": \"string\",\n            \"description\": \"The bash command to execute.\"\n          },\n          \"timeout\": {\n            \"type\": \"number\",\n            \"description\": \"Maximum execution time in seconds (default: 60).\",\n            \"default\": 60\n          }\n        },\n        \"required\": [\n          \"command\"\n        ]\n      }\n    }\n  ],\n  \"metadata\": {\n    \"instance_id\": \"instance_NodeBB__NodeBB-04998908ba6721d64eba79ae3b65a351dcfbc5b5-vnan\",\n    \"repo\": \"NodeBB/NodeBB\",\n    \"base_commit\": \"1e137b07052bc3ea0da44ed201702c94055b8ad2\",\n    \"problem_statement\": \"\\\"**Title: Email Validation Status Not Handled Correctly in ACP and Confirmation Logic**\\\\n\\\\n**Description:**\\\\n\\\\nThe Admin Control Panel (ACP) does not accurately reflect the email validation status of users. Also, validation and confirmation p ... [TRUNCATED 846 chars] ... mail validation.\\\\n\\\\nThe email status was unclear or incorrect in ACP.\\\\n\\\\n\\\\\\\"Validate\\\\\\\" and \\\\\\\"Send validation email\\\\\\\" actions failed when the expected data was missing.\\\\n\\\\n**Labels:**\\\\n\\\\nbug, back-end, authentication, ui/ux, email-confirmation\\\"\",\n    \"patch\": \"diff --git a/public/language/en-GB/admin/manage/users.json b/public/language/en-GB/admin/manage/users.json\\nindex 6b668a31ef8e..9486295bc3ef 100644\\n--- a/public/language/en-GB/admin/manage/users.json\\n+++ b/public/language/en-GB/admin/manage/us ... [TRUNCATED 12136 chars] ... class=\\\"notvalidated fa fa-check text-muted\\\" title=\\\"not validated\\\"></i>\\n+\\t\\t\\t\\t\\t\\t\\t\\t<i class=\\\"noemail fa fa-fw fa-ban text-muted\\\"\\\"></i>\\n \\t\\t\\t\\t\\t\\t\\t\\t<em class=\\\"text-muted\\\">[[admin/manage/users:users.no-email]]</em>\\n \\t\\t\\t\\t\\t\\t\\t\\t{{{ end }}}\\n \\t\\t\\t\\t\\t\\t\\t</td>\\n\",\n    \"test_patch\": \"diff --git a/test/database/keys.js b/test/database/keys.js\\nindex 3941edb65a93..fde4bbc442cf 100644\\n--- a/test/database/keys.js\\n+++ b/test/database/keys.js\\n@@ -35,6 +35,17 @@ describe('Key methods', () => {\\n \\t\\t});\\n \\t});\\n \\n+\\tit('should return m ... [TRUNCATED 952 chars] ... {uid}`, 1000);\\n+\\t\\t\\tconst code = await db.get(`confirm:byUid:${uid}`);\\n+\\t\\t\\tawait db.setObjectField(`confirm:${code}`, 'expires', Date.now() + 1000);\\n \\t\\t\\tconst ok = await user.email.canSendValidation(uid, email);\\n-\\n \\t\\t\\tassert(ok);\\n \\t\\t});\\n \\t});\\n\",\n    \"fail_to_pass\": \"[\\\"test/database.js | Test database test/database/keys.js::Key methods should return multiple keys and null if key doesn't exist\\\", 'test/database.js | Test database test/database/keys.js::Key methods should return empty array if keys is empty array or falsy', 'test/user/emails.js | email confirmation (library methods) canSendValidation should return true if it has been long enough to re-send confirmation']\",\n    \"pass_to_pass\": \"[\\\"test/database.js | Test database should work\\\", \\\"test/database.js | Test database info should return info about database\\\", \\\"test/database.js | Test database info should not error and return info if client is falsy\\\", \\\"test/database.js | Test  ... [TRUNCATED 45280 chars] ... pending or set\\\", \\\"test/user/emails.js | email confirmation (v3 api) should confirm their email (using the pending validation)\\\", \\\"test/user/emails.js | email confirmation (v3 api) should still confirm the email (as email is set in user hash)\\\"]\",\n    \"before_repo_set_cmd\": \"git reset --hard 1e137b07052bc3ea0da44ed201702c94055b8ad2\\ngit clean -fd \\ngit checkout 1e137b07052bc3ea0da44ed201702c94055b8ad2 \\ngit checkout 04998908ba6721d64eba79ae3b65a351dcfbc5b5 -- test/database/keys.js test/user/emails.js\",\n    \"selected_test_files_to_run\": \"[\\\"test/database.js\\\", \\\"test/database/keys.js\\\", \\\"test/user/emails.js\\\"]\",\n    \"repo_language\": \"js\",\n    \"requirements\": \"\\\"- The loadUserInfo(callerUid, uids) function should include logic to retrieve and attach `email:pending` and `email:expired` flags to each user object. These flags must be derived by resolving `confirm:byUid:<uid>` keys via the new `getConfi ... [TRUNCATED 3170 chars] ... rval check must compare the stored TTL timestamp if available (or, if TTL is unavailable, use the current time as the baseline) plus the configured interval against the max confirmation period, ensuring the system prevents excessive resends.\\\"\",\n    \"interface\": \"\\\"Type: Method\\\\n\\\\nName: db.mget\\\\n\\\\nPath: src/database/mongo/main.js, src/database/postgres/main.js, src/database/redis/main.js\\\\n\\\\nInput: keys: string[] (An array of database keys to retrieve.)\\\\n\\\\nOutput: Promise<(string | null)[]> (A promise t ... [TRUNCATED 487 chars] ...  to the email address string, or `null` if no suitable email is found.)\\\\n\\\\nDescription: A utility function that retrieves the most appropriate email address for an administrative action like \\\\\\\"force validate\\\\\\\" or \\\\\\\"resend validation email\\\\\\\".\\\"\",\n    \"issue_specificity\": \"[\\\"major_bug\\\",\\\"data_bug\\\",\\\"ui_ux_bug\\\"]\",\n    \"issue_categories\": \"[\\\"back_end_knowledge\\\",\\\"database_knowledge\\\",\\\"authentication_authorization_knowledge\\\",\\\"ui_ux_knowledge\\\"]\",\n    \"dockerhub_tag\": \"nodebb.nodebb-NodeBB__NodeBB-04998908ba6721d64eba79ae3b65a351dcfbc5b5\",\n    \"docker_image\": \"jefzda/sweap-images:nodebb.nodebb-NodeBB__NodeBB-04998908ba6721d64eba79ae3b65a351dcfbc5b5\"\n  }\n}\n```\n\n## 提示模板\n\n**提示模板：**\n```text\n{question}\n```\n\n## 额外参数\n\n| 参数 | 类型 | 默认值 | 描述 |\n|-----------|------|---------|-------------|\n| `swe_bench_pro_repo_path` | `str` | `` | 指向 `scaleapi/SWE-bench_Pro-os` 本地克隆路径。若为空，则自动克隆至 `~/.cache/evalscope/swe_bench_pro/SWE-bench_Pro-os` 并固定到 commit `ca10a60`。 |\n| `dockerhub_username` | `str` | `jefzda` | 托管 sweap-images 仓库的 DockerHub 用户或组织名。 |\n| `action_protocol` | `str` | `toolcall` | 智能体动作协议：\"toolcall\"（函数调用）或 \"backticks\"（针对不支持函数调用模型的文本回退方案）。可选值：['toolcall', 'backticks'] |\n| `max_steps` | `int` | `250` | 每个样本允许的最大智能体步数。 |\n| `command_timeout` | `float` | `60.0` | 每条 bash 命令的默认超时时间（秒）。 |\n| `eval_timeout` | `int` | `3600` | 每实例评估的超时时间（秒）。 |\n\n## 使用方法\n\n### 使用 CLI\n\n```bash\nevalscope eval \\\n    --model YOUR_MODEL \\\n    --api-url OPENAI_API_COMPAT_URL \\\n    --api-key EMPTY_TOKEN \\\n    --datasets swe_bench_pro \\\n    --limit 10  # 正式评估时请删除此行\n```\n\n### 使用 Python\n\n```python\nfrom evalscope import run_task\nfrom evalscope.config import TaskConfig\n\ntask_cfg = TaskConfig(\n    model='YOUR_MODEL',\n    api_url='OPENAI_API_COMPAT_URL',\n    api_key='EMPTY_TOKEN',\n    datasets=['swe_bench_pro'],\n    dataset_args={\n        'swe_bench_pro': {\n            # extra_params: {}  # 使用默认额外参数\n        }\n    },\n    limit=10,  # 正式评估时请删除此行\n)\n\nrun_task(task_cfg=task_cfg)\n```",
    "content_hash": "40d924022cb9c4b94ecc6976a770ef10",
    "needs_translation": false
  },
  "updated_at": "2026-05-19T19:45:51.156530",
  "translation_updated_at": "2026-05-19T19:45:55"
}