Jasaxion commited on
Commit
1efe9af
·
verified ·
1 Parent(s): bd39cac

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +44 -162
README.md CHANGED
@@ -31,200 +31,82 @@ configs:
31
  # MM-IssueLoc Bench
32
 
33
  > **MM-IssueLoc: A Controlled Benchmark for Evaluating Visual Evidence in Multimodal Repository-Level Issue Localization**
 
34
 
35
- A repository-level, multimodal **issue → source-code localization** benchmark. Given a GitHub issue (title + body + screenshots / diagrams) and a target repository, the task is to retrieve the **file(s)** (and **function(s)**) that must be edited to resolve the issue. This is the first benchmark that pairs real multimodal issues with repository-scoped gold edits at two granularities.
36
 
37
- | # | Task | Input | Output | # Instances |
38
- |---|---|---|---|---|
39
- | 1 | File-level localization | Issue text + images + repository tree / contents | Ranked list of files to edit | 652 |
40
- | 2 | Function-level localization | Issue text + images + repository | Ranked list of `file:function` identifiers | 343 |
41
 
42
- ---
43
 
44
- ## Dataset at a glance
45
 
46
- - **652 canonical instances** (450 human-annotated + 202 AI-augmented).
47
- - **23 programming languages** — TypeScript 151, Python 126, JavaScript 120, C++ 45, Java 44, Go 33, C# 33, Rust 27, C 21, PHP 20, remainder < 15 each.
48
  - **7 image categories** — `ui_screenshot` 177, `behavior_demo` 99, `error_message` 92, `rendering_result` 85, `code_screenshot` 84, `log_output` 66, `data_visualization` 50.
49
- - **3 difficulty buckets** (by `changed_files`) — easy 214 (1 file), medium 263 (2–3 files), hard 176 (≥ 4 files).
50
- - **1050 issue screenshots embedded** in the canonical config (bytes, no external paths required).
51
- - **Two-granularity gold labels** — `edit_files` (file level, 652/652 non-empty) and `edit_functions` (function level, 343/343 in the `function_level` config).
52
-
53
- ---
54
-
55
- ## Repository
56
-
57
- Start at `examples/preview/` for a zero-install skim of what an instance looks like; use `examples/load_dataset.py` for the full Parquet-backed workflow, and `scripts/download_repos.py` once you need repository snapshots at `base_commit`.
58
-
59
- ---
60
 
61
- ## Configs
62
-
63
- Two configs are shipped as separate Parquet files; every config contains a single `test` split (this is a pure evaluation benchmark).
64
-
65
- ### `canonical` — 652 rows
66
-
67
- The full benchmark. Every instance has non-empty `edit_files`, so this config serves both the **file-level evaluation** directly and is the superset from which `function_level` is derived.
68
 
69
  ```python
70
  from datasets import load_dataset
71
 
72
- ds = load_dataset("<hub-id>/MM-IssueLoc-Bench", name="canonical", split="test")
73
  row = ds[0]
74
- row["images"][0] # PIL.Image — first screenshot attached to the issue
75
- row["edit_files"] # list[str] — gold-standard files to edit
76
- ```
77
 
78
- ### `function_level` 343 rows
79
-
80
- Subset of `canonical` where `supports_function_level == True` **and** `edit_functions` is non-empty. Identifiers follow the `path/to/file.py:Class.method` / `path/to/file.py:top_level_fn` convention. Use this config for function-level metrics.
81
-
82
- ```python
83
- ds = load_dataset("<hub-id>/MM-IssueLoc-Bench", name="function_level", split="test")
84
- row = ds[0]
85
- row["edit_functions"] # list[str] — gold-standard functions to edit
86
- row["added_functions"] # list[str] — functions created by the patch (exclude at eval time)
87
  ```
88
 
89
- ## Schema
 
 
90
 
91
- ### `canonical` & `function_level`
92
 
93
  | Field | Type | Description |
94
  |---|---|---|
95
- | `instance_id` | `string` | Unique key, format `<owner>__<repo>__<issue_id>`. |
96
  | `annotation_by` | `string` | `"human"` or `"ai"`. |
97
  | `repo_full_name` | `string` | GitHub `owner/repo`. |
98
- | `repo_language` | `string` | Primary language reported by GitHub. |
99
- | `language` | `string` | Primary language of the actually edited files (lowercase). |
100
- | `language_category` | `string` | Coarse bucket: `frontend` / `backend` / `systems` / `data_science` / |
101
- | `base_commit` | `string` | PR base commit SHA checkout the repo here before evaluation. |
102
- | `issue_title` | `string` | Issue title. |
103
- | `issue_body` | `string` | Issue body in original markdown (images are referenced as markdown; see `images`). |
104
- | `images` | `Sequence[Image]` | Issue screenshots, decoded as `PIL.Image` when loaded with 🤗 `datasets`. |
105
- | `image_paths` | `Sequence[string]` | Original filenames (`issue_<issue_id>_<idx>.<ext>`), aligned with `images`. |
106
- | `image_alts` | `Sequence[string]` | Markdown `alt` text per image. |
107
- | `image_sources` | `Sequence[string]` | Per-image provenance tag (`body`, `comment`, ). |
108
- | `image_category` | `string` | One of the 7 image categories. |
109
- | `relevance_score` | `int32` | Annotator score for image–issue relevance. |
110
- | `difficulty` | `string` | `easy` / `medium` / `hard` bucketed by `changed_files` (see below). |
111
- | `diff` | `string` | Full unified diff of the resolving PR. |
112
- | `diff_files` | `Sequence[string]` | Files touched by `diff`. |
113
- | `diff_status` | `string` | Diff-extraction status flag (e.g. `"ok"`). |
114
- | `edit_files` | `Sequence[string]` | **Gold standard** for file-level evaluation. |
115
- | `edit_functions` | `Sequence[string]` | **Gold standard** for function-level evaluation (may be empty in `canonical`). |
116
  | `added_functions` | `Sequence[string]` | Functions introduced by the patch — exclude at function-level eval time. |
117
- | `supports_function_level` | `bool` | Whether function-level evaluation is supported for this instance. |
118
- | `additions` | `int32` | Lines added in the diff. |
119
- | `deletions` | `int32` | Lines deleted in the diff. |
120
- | `changed_files` | `int32` | Number of files touched. |
121
- | `patch_count` | `int32` | Number of patches in the PR. |
122
- | `repo_stars` | `int32` | Star count at collection time. |
123
- | `repo_license` | `string` | Source repository license (SPDX-style where available). |
124
 
125
- ### `vce_plus_cache` (preview only — see `examples/preview/vce_plus_preview.jsonl`)
126
 
127
- | Field | Type | Description |
128
- |---|---|---|
129
- | `instance_id` | `string` | Foreign key to `canonical.instance_id`. |
130
- | `category` | `string` | Image category (redundant with `canonical.image_category`). |
131
- | `records` | `List[Struct]` | One entry per screenshot; see below. |
132
-
133
- Per-record struct:
134
-
135
- | Field | Type | Description |
136
- |---|---|---|
137
- | `ocr_text` | `string` | OCR result. |
138
- | `error_signal` | `struct` | `{kind, type, message, stack_hint[]}` — extracted error semantics. |
139
- | `ui_elements` | `Sequence[string]` | Detected UI widgets. |
140
- | `user_action` | `string` | Inferred user intent / action. |
141
- | `code_hint` | `struct` | `{function_names[], file_patterns[], frameworks[]}` ,code-side hooks. |
142
- | `visual_saliency` | `string` | Free-text description of the salient region. |
143
- | `confidence` | `float32` | Extractor confidence ∈ [0, 1]. |
144
- | `notes` | `string` | Extractor-side remarks. |
145
-
146
- ### `difficulty` bucketing
147
-
148
- Bucketed on `changed_files` of the resolving PR. Rule is 100 % consistent with the 402 human-labelled difficulty fields in the original annotation pass (audited); the remaining 251 AI-augmented rows were back-filled with the same rule.
149
-
150
- | Bucket | Rule | Count | Median `additions` | Median `deletions` |
151
- |---|---|---:|---:|---:|
152
- | `easy` | `changed_files == 1` | 214 | 6 | 2 |
153
- | `medium` | `changed_files ∈ {2, 3}` | 263 | 28 | 6 |
154
- | `hard` | `changed_files ≥ 4` | 176 | 59 | 16 |
155
-
156
- ---
157
-
158
- ## Evaluation protocol
159
-
160
- ### Repository snapshot
161
-
162
- Every instance is evaluated against the repository state at its `base_commit`. The companion file `commit_cache.json` (at the root of this dataset) maps `instance_id → {repo, sha, dir_name}` and is consumed by the bundled download script.
163
-
164
- **Recommended — use the bundled downloader.** Handles rate-limit-aware concurrent fetching, atomic extraction, and resumable retries out of the box:
165
 
166
  ```bash
167
  export GITHUB_TOKEN=ghp_xxx
168
- python3 scripts/download_repos.py
169
- python3 scripts/download_repos.py --workers 8 # faster with more parallelism
170
- python3 scripts/download_repos.py --retry-failed # after an interruption
171
  ```
172
 
173
- The script uses the GitHub REST tarball API (`GET /repos/{owner}/{repo}/tarball/{sha}`), so a **personal access token with the `public_repo` scope is strongly recommended** (generate at <https://github.com/settings/tokens>; no elevated permissions needed for public repositories). Without a token, you are throttled to 60 requests/hour, which makes the full 653-repo download take ~11 hours instead of ~10 minutes.
174
-
175
- On success you get:
176
-
177
- ```
178
- repos/
179
- ├── fbaligand__kibana-enhanced-table__569e9d9ee2fb/
180
- ├── presscustomizr__hueman__0f3aeb3c5b2a/
181
- └── ... (653 total; naming = <owner>__<repo>__<sha12>, no .git)
182
- ```
183
-
184
- Failed downloads (archived / deleted / moved repos) are logged to `download_failures.json` for targeted re-runs.
185
-
186
- Repository tarballs are **not** shipped here (they total several GB and individual repos have heterogeneous licenses); users fetch them from GitHub on demand using the script or the cache above.
187
-
188
- ### Metrics
189
-
190
- File-level and function-level evaluation are tracked independently using the same family of ranking metrics at `K ∈ {1, 3, 5, 10}
191
-
192
- - **Acc@K** — set-based hit rates.
193
- - Other metrics avaliable:
194
- - **MRR** — Mean Reciprocal Rank of the first hit.
195
- - **Recall@K**, **Hit@K** — set-based hit rates.
196
- - **MAP@K**, **NDCG@K** — order-sensitive metrics.
197
-
198
-
199
- Recommended normalisation at scoring time:
200
-
201
- 1. Path normalisation — strip `./`, collapse separators, lowercase drive letters on Windows.
202
- 2. Function ID matching — accept `file:func` ≡ `file:Class.func` (relaxed class-qualifier match).
203
 
204
  ## Intended use & limitations
205
 
206
- **Intended uses.**
207
-
208
- - Benchmarking repository-level issue localization models, with or without multimodal inputs.
209
- - Ablating the contribution of screenshots vs. text to localization accuracy.
210
- - Studying how different image categories (UI screenshots vs. error messages vs. log output) help or hurt retrieval.
211
-
212
- **Out-of-scope uses.**
213
-
214
- - Patch generation / code repair — this dataset ships gold edits but is evaluated on localization, not synthesis. The `diff` field is provided for offline analysis but is not a supervised target.
215
- - Training large-scale multimodal models end-to-end — the instance count (652) is deliberately sized for evaluation, not pre-training.
216
- - **Commercial use**
217
-
218
- **Known limitations.**
219
-
220
- - Language skew towards web-ecosystem repos (TypeScript / Python / JavaScript together cover ~60 %).
221
- - Repositories are real open-source projects; code licensing varies per row (`repo_license`).
222
-
223
- ## Ethics & privacy
224
-
225
- All issues are drawn from public GitHub repositories. Screenshots occasionally contain user-visible strings from demo data (e.g., placeholder usernames, example URLs). We reviewed the top-frequency tokens in image OCR output and found no personally identifying information beyond public GitHub author handles already visible in `instance_id` / `repo_full_name`. No private data, no scraped user content outside the public issue tracker, no model-generated synthetic faces or identifiers.
226
-
227
- ---
228
 
229
  ## Citation
230
 
 
31
  # MM-IssueLoc Bench
32
 
33
  > **MM-IssueLoc: A Controlled Benchmark for Evaluating Visual Evidence in Multimodal Repository-Level Issue Localization**
34
+ > [📄 arXiv](https://arxiv.org/abs/2607.15205) · [💻 Evaluation toolkit](https://github.com/Jasaxion/MM-IssueLoc-Bench)
35
 
36
+ Repository-level, multimodal **issue → source-code localization**. Given a GitHub issue (title + body + screenshots) and a target repository, retrieve the **file(s)** and **function(s)** that must be edited to resolve it with visual evidence treated as an explicit input, decoupled from patch synthesis.
37
 
38
+ | Config | Task | Output | Instances |
39
+ |---|---|---|---|
40
+ | `canonical` | File-level localization | Ranked files to edit | 652 |
41
+ | `function_level` | Function-level localization | Ranked `file:function` ids | 343 |
42
 
43
+ Both configs ship a single `test` split (pure evaluation benchmark).
44
 
45
+ ## At a glance
46
 
47
+ - **652 instances** (450 human-annotated + 202 AI-augmented), **1050 screenshots** embedded as bytes.
48
+ - **23 languages** — TypeScript 151, Python 126, JavaScript 120, C++ 45, Java 44, Go 33, C# 33, Rust 27, C 21, PHP 20, rest < 15.
49
  - **7 image categories** — `ui_screenshot` 177, `behavior_demo` 99, `error_message` 92, `rendering_result` 85, `code_screenshot` 84, `log_output` 66, `data_visualization` 50.
50
+ - **3 difficulty buckets** (by `changed_files`) — easy 214 (1), medium 263 (2–3), hard 176 (≥4).
51
+ - **Two-granularity gold** `edit_files` (all 652) and `edit_functions` (343, in `function_level`).
 
 
 
 
 
 
 
 
 
52
 
53
+ ## Usage
 
 
 
 
 
 
54
 
55
  ```python
56
  from datasets import load_dataset
57
 
58
+ ds = load_dataset("Jasaxion/MM-IssueLocBench", name="canonical", split="test")
59
  row = ds[0]
60
+ row["images"][0] # PIL.Image — first issue screenshot
61
+ row["edit_files"] # list[str] — gold files to edit
 
62
 
63
+ fn = load_dataset("Jasaxion/MM-IssueLocBench", name="function_level", split="test")
64
+ fn[0]["edit_functions"] # list[str] — gold `path/to/file.py:Class.method` ids
 
 
 
 
 
 
 
65
  ```
66
 
67
+ `function_level` is the subset of `canonical` where `supports_function_level` is
68
+ true and `edit_functions` is non-empty. For scoring, the
69
+ [evaluation toolkit](https://github.com/Jasaxion/MM-IssueLoc-Bench) provides the loader, metrics (Acc@K, MRR, Recall@K, Hit@K, MAP@K, NDCG@K), and CLIs.
70
 
71
+ ## Schema
72
 
73
  | Field | Type | Description |
74
  |---|---|---|
75
+ | `instance_id` | `string` | Unique key `<owner>__<repo>__<issue_id>`. |
76
  | `annotation_by` | `string` | `"human"` or `"ai"`. |
77
  | `repo_full_name` | `string` | GitHub `owner/repo`. |
78
+ | `repo_language` / `language` | `string` | GitHub primary language / language of edited files. |
79
+ | `language_category` | `string` | `frontend` / `backend` / `systems` / `data_science` / |
80
+ | `base_commit` | `string` | PR base commit SHA check out the repo here before evaluation. |
81
+ | `issue_title` / `issue_body` | `string` | Issue text (body in original markdown). |
82
+ | `images` | `Sequence[Image]` | Screenshots, decoded as `PIL.Image`. |
83
+ | `image_paths` / `image_alts` / `image_sources` | `Sequence[string]` | Per-image filename, alt text, provenance (`body` / `comment` / …), aligned with `images`. |
84
+ | `image_category` | `string` | One of the 7 categories. |
85
+ | `relevance_score` | `int32` | Annotator image–issue relevance score. |
86
+ | `difficulty` | `string` | `easy` / `medium` / `hard`, bucketed by `changed_files`. |
87
+ | `diff` | `string` | Full unified diff of the resolving PR (offline analysis only). |
88
+ | `diff_files` / `diff_status` | `Sequence[string]` / `string` | Files touched by `diff` / extraction status. |
89
+ | `edit_files` | `Sequence[string]` | **Gold** for file-level evaluation. |
90
+ | `edit_functions` | `Sequence[string]` | **Gold** for function-level evaluation (may be empty in `canonical`). |
 
 
 
 
 
91
  | `added_functions` | `Sequence[string]` | Functions introduced by the patch — exclude at function-level eval time. |
92
+ | `supports_function_level` | `bool` | Whether function-level evaluation applies. |
93
+ | `additions` / `deletions` / `changed_files` / `patch_count` | `int32` | Diff size statistics. |
94
+ | `repo_stars` / `repo_license` | `int32` / `string` | Repo stars at collection / SPDX license. |
 
 
 
 
95
 
96
+ ## Repository snapshots
97
 
98
+ Evaluation runs against each repo at its `base_commit`; tarballs are **not** shipped (several GB, heterogeneous licenses). `commit_cache.json` maps `instance_id → {repo, sha, dir_name}`, and `scripts/download_repos.py` fetches them from the GitHub tarball API (a `public_repo`-scoped `GITHUB_TOKEN` is strongly recommended to avoid the 60 req/hour limit):
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
99
 
100
  ```bash
101
  export GITHUB_TOKEN=ghp_xxx
102
+ python3 scripts/download_repos.py --workers 8 # --retry-failed to resume
 
 
103
  ```
104
 
105
+ Snapshots land under `repos/<owner>__<repo>__<sha12>/`; failures are logged to `download_failures.json`. See `examples/preview/` for a zero-install skim of the data and `examples/load_dataset.py` for the full workflow.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
 
107
  ## Intended use & limitations
108
 
109
+ For benchmarking repository-level issue localization. **Out of scope:** patch generation, end-to-end training (652 instances is an evaluation set), and commercial use (CC BY-NC 4.0). Content skews toward web-ecosystem repos (TS/Py/JS ≈ 60%); per-row code licenses vary (`repo_license`). All data is from public GitHub issues and contains no PII beyond already-public author handles.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
110
 
111
  ## Citation
112