rearrange dataset and add files for another context strategy
Browse files- README.md +44 -6
- retrieval/bm25_16k.jsonl → context/files/files_16k.parquet +2 -2
- retrieval/bm25_32k.jsonl → context/files/files_4k.parquet +2 -2
- retrieval/bm25_64k.jsonl → context/files/files_8k.parquet +2 -2
- context/files/files_full.parquet +3 -0
- {retrieval → context/retrieval}/bm25_16k.parquet +0 -0
- {retrieval → context/retrieval}/bm25_32k.parquet +0 -0
- {retrieval → context/retrieval}/bm25_4k.parquet +0 -0
- {retrieval → context/retrieval}/bm25_64k.parquet +0 -0
- {retrieval → context/retrieval}/bm25_8k.parquet +0 -0
README.md
CHANGED
@@ -68,18 +68,28 @@ configs:
|
|
68 |
data_files:
|
69 |
- split: test
|
70 |
path: commitchronicle-py-long-labels/test-*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
- config_name: retrieval_bm25
|
72 |
data_files:
|
73 |
- split: 4k
|
74 |
-
path: retrieval/bm25_4k.parquet
|
75 |
- split: 8k
|
76 |
-
path: retrieval/bm25_8k.parquet
|
77 |
- split: 16k
|
78 |
-
path: retrieval/bm25_16k.parquet
|
79 |
- split: 32k
|
80 |
-
path: retrieval/bm25_32k.parquet
|
81 |
- split: 64k
|
82 |
-
path: retrieval/bm25_64k.parquet
|
83 |
license: apache-2.0
|
84 |
---
|
85 |
|
@@ -183,7 +193,35 @@ For convenience, we also provide a full list of files in [`paths.json`](https://
|
|
183 |
|
184 |
After you download and extract the repositories, you can work with each repository either via Git or via Python libraries like [GitPython](https://github.com/gitpython-developers/GitPython) or [PyDriller](https://github.com/ishepard/pydriller).
|
185 |
|
186 |
-
# Extra:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
187 |
|
188 |
To facilitate further research, we additionally provide context for each commit as retrieved by BM25 retriever in `retrieval_bm25` dataset config. For each commit, we run BM25 over all `.py` files in the corresponding repository
|
189 |
at the state before the commit (excluding the files that were changed in this commit). We retrieve up to 50 files most relevant to the commit diff, and then, given the maximum allowed number of tokens n, we add files until the total context length (including diff)
|
|
|
68 |
data_files:
|
69 |
- split: test
|
70 |
path: commitchronicle-py-long-labels/test-*
|
71 |
+
- config_name: full_files
|
72 |
+
data_files:
|
73 |
+
- split: 4k
|
74 |
+
path: context/files/files_4k.parquet
|
75 |
+
- split: 8k
|
76 |
+
path: context/files/files_8k.parquet
|
77 |
+
- split: 16k
|
78 |
+
path: context/files/files_16k.parquet
|
79 |
+
- split: full
|
80 |
+
path: context/files/files_full.parquet
|
81 |
- config_name: retrieval_bm25
|
82 |
data_files:
|
83 |
- split: 4k
|
84 |
+
path: context/retrieval/bm25_4k.parquet
|
85 |
- split: 8k
|
86 |
+
path: context/retrieval/bm25_8k.parquet
|
87 |
- split: 16k
|
88 |
+
path: context/retrieval/bm25_16k.parquet
|
89 |
- split: 32k
|
90 |
+
path: context/retrieval/bm25_32k.parquet
|
91 |
- split: 64k
|
92 |
+
path: context/retrieval/bm25_64k.parquet
|
93 |
license: apache-2.0
|
94 |
---
|
95 |
|
|
|
193 |
|
194 |
After you download and extract the repositories, you can work with each repository either via Git or via Python libraries like [GitPython](https://github.com/gitpython-developers/GitPython) or [PyDriller](https://github.com/ishepard/pydriller).
|
195 |
|
196 |
+
# Extra: longer context
|
197 |
+
|
198 |
+
## Full Files
|
199 |
+
|
200 |
+
To facilitate further research, we additionally provide full contents of modified files before and after each commit in `full_files` dataset config. `full` split provides the whole files, and the remaining splits truncates each file
|
201 |
+
given the maximum allowed number of tokens n. The files are truncated uniformly, essentially, limiting the number of tokens for each file to max_num_tokens // num_files.
|
202 |
+
We use [DeepSeek-V3 tokenizer](https://huggingface.co/deepseek-ai/DeepSeek-V3) to obtain the number of tokens.
|
203 |
+
|
204 |
+
```py
|
205 |
+
from datasets import load_dataset
|
206 |
+
|
207 |
+
dataset = load_dataset("JetBrains-Research/lca-commit-message-generation",
|
208 |
+
"full_files",
|
209 |
+
split="16k" # should be one of: '4k', '8k', '16k', 'full'
|
210 |
+
)
|
211 |
+
```
|
212 |
+
|
213 |
+
Each example has the following fields:
|
214 |
+
|
215 |
+
* `repo`: commit repository
|
216 |
+
* `hash`: commit hash
|
217 |
+
* `mods`: commit modification (combined into a single diff)
|
218 |
+
* `files`: a list of dictionaries, where each corresponds to a specific file changed in the commit and has the following keys:
|
219 |
+
* `old_path`: file path before the commit
|
220 |
+
* `old_contents`: file contents before the commit
|
221 |
+
* `new_path`: file path after the commit
|
222 |
+
* `old_contents`: file contents after the commit
|
223 |
+
|
224 |
+
## Retrieval
|
225 |
|
226 |
To facilitate further research, we additionally provide context for each commit as retrieved by BM25 retriever in `retrieval_bm25` dataset config. For each commit, we run BM25 over all `.py` files in the corresponding repository
|
227 |
at the state before the commit (excluding the files that were changed in this commit). We retrieve up to 50 files most relevant to the commit diff, and then, given the maximum allowed number of tokens n, we add files until the total context length (including diff)
|
retrieval/bm25_16k.jsonl → context/files/files_16k.parquet
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f81f8fcf0f145263af315f2c09ca46b5280b96e080832d4af9b19ab9fac2996d
|
3 |
+
size 2982933
|
retrieval/bm25_32k.jsonl → context/files/files_4k.parquet
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:de0b8a645d25524e5c3a2c77e5884f6a8fa94c7a897370988c9b6f5e1e571873
|
3 |
+
size 920159
|
retrieval/bm25_64k.jsonl → context/files/files_8k.parquet
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9aa6a7752fcbd6dd35a168cc1d4a8df51989790d35c4b94f0d97c3ab7db58c72
|
3 |
+
size 1728753
|
context/files/files_full.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:11e8558406d911a2b5545b697fe87c8d2ecaf2dedf058dfd56470d41a65b05ea
|
3 |
+
size 12078391
|
{retrieval → context/retrieval}/bm25_16k.parquet
RENAMED
File without changes
|
{retrieval → context/retrieval}/bm25_32k.parquet
RENAMED
File without changes
|
{retrieval → context/retrieval}/bm25_4k.parquet
RENAMED
File without changes
|
{retrieval → context/retrieval}/bm25_64k.parquet
RENAMED
File without changes
|
{retrieval → context/retrieval}/bm25_8k.parquet
RENAMED
File without changes
|