← 全部数据产品

通用 AI 与专业任务 · 任务环境与轨迹

软件工程与终端任务评测基准

问题修复、终端操作、仓库生成、多轮工具对话等可执行判分的任务,兼容主流评测框架格式。

公开与许可标注与衍生可定制

这是什么

每道题是一个可执行、可自动判分的任务包:任务说明、可重建的运行环境定义、测试脚本和一份任务配置。任务类型包括问题修复、终端操作、仓库生成、科学计算终端任务,以及多轮工具与业务流程;格式兼容主流评测框架。

问题修复类任务取自真实开源项目的已解决问题。环境固定到具体的基础镜像摘要和代码基线提交。测试脚本先把测试文件重置到基线,再应用测试补丁,运行指定测试,通过记 1、不通过记 0。任务配置写明来源仓库、问题与合并请求、许可协议、难度、专家与初级人员的预估用时,以及应由失败转为通过、需保持通过的测试数。

判分完全由脚本完成,不依赖人工阅读答案。

长什么样

样本取自一个 MIT 许可的开源 Python 依赖分析项目,问题是工具未能识别包之间的循环依赖。样本包含任务说明、环境定义文件、测试脚本和任务配置四件。配置中标明难度中等,专家预估 30 分钟、初级人员 90 分钟,1 个测试应由失败转为通过,8 个回归测试需保持通过,校验超时 900 秒。

看数据

任务说明

markdown

You are working in a Python 3.10 project checked out at `/workspace/pipdeptree`. All dependencies are already installed and the repository is a clean git checkout.

The following issue was reported against this repository:

---
Doesn't detect dependency cycles
I created a dep cycle on test.pypi.org:  jd_circular_a -> jd_circular_b -> jd_circular_c -> jd_circular_a

```
$ pip install -q --index-url=https://test.pypi.org/simple jd_circular_a
$ pip freeze
jd_circular_a==0.1.2
jd_circular_b==0.1.2
jd_circular_c==0.1.2
pipdeptree==2.3.3
```

pipdeptree recognises the packages are installed, but fails to detect the cyclic dependency.

```
>>> import pipdeptree
>>> pkgs = pipdeptree.get_installed_distributions()
>>> tree = pipdeptree.PackageDAG.from_pkgs(pkgs)
>>> for node in tree:
...     print(node)
... 
<DistPackage("wheel")>
<DistPackage("setuptools")>
<DistPackage("pipdeptree")>
<DistPackage("pip")>
<DistPackage("jd-circular-c")>
<DistPackage("jd-circular-b")>
<DistPackage("jd-circular-a")>
>>> pipdeptree.cyclic_deps(tree)
[]
```

moreover it doesn't render them at all by default:

```
$ pipdeptree
pip==22.3.1
pipdeptree==2.3.3
setuptools==66.0.0
wheel==0.38.4
```
---

Fix the issue by changing the project's source code so the reported behaviour is corrected without breaking existing functionality. Do not modify or delete existing tests. Your changes will be validated by running the project's test suite.

You have 1800 seconds to complete this task. Do not cheat by using online solutions or hints specific to this task.

Dockerfile

dockerfile

FROM python:3.10-slim-bookworm@sha256:5be5aaecb962a41567bc8041f1e9e3432cb085b037fe057f9a562630b2e4b370
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 PIP_DISABLE_PIP_VERSION_CHECK=1 PIP_ROOT_USER_ACTION=ignore DEBIAN_FRONTEND=noninteractive
RUN apt-get update -q && apt-get install -y -q --no-install-recommends git build-essential curl ca-certificates pkg-config libffi-dev libssl-dev && rm -rf /var/lib/apt/lists/*
RUN pip install -q pytest
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 PIP_DISABLE_PIP_VERSION_CHECK=1 PIP_NO_CACHE_DIR=1 PIP_ROOT_USER_ACTION=ignore
COPY repo/ /workspace/pipdeptree/
RUN cd /workspace/pipdeptree && pip install -q -e .[test]
WORKDIR /workspace/pipdeptree
CMD ["/bin/bash"]

测试脚本

bash

set -uo pipefail
mkdir -p /logs/verifier
cd /workspace/pipdeptree
git config --global --add safe.directory '*' >/dev/null 2>&1
# test files are authoritative: reset them to base, then apply the test patch
for f in $(grep '^+++ b/' /tests/test.patch | sed 's#^+++ b/##'); do git checkout -q -- "$f" 2>/dev/null || true; done
if ! git apply --whitespace=nowarn /tests/test.patch; then
  echo "test patch failed to apply" > /logs/verifier/error.txt
  echo 0 > /logs/verifier/reward.txt
  exit 0
fi
mapfile -t SEL < /tests/test_selector.txt
python -m pytest --no-header -rA --tb=line --color=no -p no:cacheprovider "${SEL[@]}" > /logs/verifier/pytest.txt 2>&1
code=$?
tail -n 3 /logs/verifier/pytest.txt
if [ "$code" -eq 0 ]; then echo 1 > /logs/verifier/reward.txt; else echo 0 > /logs/verifier/reward.txt; fi

task.toml

toml

schema_version = "1.4"
artifacts = []

[task]
version = "1.0.0"
description = "Doesn't detect dependency cycles"
authors = []
keywords = ["swe", "bug_fix", "python", "pytest"]

[metadata]
difficulty = "medium"
category = "software_engineering"
tags = ["swe-bench-style", "issue-fix", "python"]
expert_time_estimate_min = 30.0
junior_time_estimate_min = 90.0
source_repo = "tox-dev/pipdeptree"
source_issue = "https://github.com/tox-dev/pipdeptree/issues/191"
source_pr = "https://github.com/tox-dev/pipdeptree/pull/274"
base_commit = "616618fd7d35a417ff052de69472f2dc6e523986"
source_license = "MIT"
source_dataset = "nebius/SWE-rebench-V2 (CC-BY-4.0)"
python_version = "3.10"
fail_to_pass_count = 1
pass_to_pass_count = 8

[verifier]
timeout_sec = 900.0
collect = []

[verifier.env]

[agent]
timeout_sec = 1800.0

[environment]
network_mode = "public"
build_timeout_sec = 1800.0
os = "linux"
mcp_servers = []

[environment.env]

[solution.env]

开源项目 tox-dev/pipdeptree(MIT)· 数据集 nebius/SWE-rebench-V2(CC BY 4.0)

内容与字段

领域
通用 AI 与专业任务
形态
基准(题集与环境)
样本获取
可提供

页内展示的是样本预览;完整样本按“样本获取”一栏的方式提供。

任务类型

当前 5 个

  • 问题修复
  • 终端操作
  • 仓库生成
  • 科学计算终端任务
  • 多轮工具与业务流程

持续增加

使用与获取

状态
可定制
带着这一产品联系 →
  1. 01

    说明工作目标

    提供任务或研究问题、所需资料、使用阶段与预期交付格式。

  2. 02

    核对样本与条件

    确认来源、使用范围、内容覆盖、版本与缺失,区分已有材料和需加工的部分。

  3. 03

    约定试制与接收

    按项目确认批次、质量检查、验收方式与交付安排。