Fix diffs format and update README accordingly
Browse files
README.md
CHANGED
@@ -13,33 +13,18 @@ dataset_info:
|
|
13 |
- name: message
|
14 |
dtype: string
|
15 |
- name: mods
|
16 |
-
|
17 |
-
- name: diff
|
18 |
-
list:
|
19 |
- name: change_type
|
20 |
dtype: string
|
21 |
-
- name: new_path
|
22 |
-
dtype: string
|
23 |
-
- name: old_path
|
24 |
-
dtype: string
|
25 |
-
- name: diff
|
26 |
-
dtype: string
|
27 |
-
- name: file_src
|
28 |
-
struct:
|
29 |
- name: old_path
|
30 |
dtype: string
|
31 |
- name: new_path
|
32 |
dtype: string
|
33 |
-
- name:
|
34 |
-
dtype: string
|
35 |
-
- name: new_contents
|
36 |
dtype: string
|
37 |
splits:
|
38 |
- name: test
|
39 |
-
num_bytes: 1225963
|
40 |
num_examples: 163
|
41 |
-
download_size: 485771
|
42 |
-
dataset_size: 1225963
|
43 |
- config_name: commitchronicle-py-long-labels
|
44 |
features:
|
45 |
- name: hash
|
@@ -60,8 +45,6 @@ dataset_info:
|
|
60 |
- name: test
|
61 |
num_bytes: 272359
|
62 |
num_examples: 858
|
63 |
-
download_size: 155079
|
64 |
-
dataset_size: 272359
|
65 |
configs:
|
66 |
- config_name: commitchronicle-py-long
|
67 |
data_files:
|
@@ -72,22 +55,29 @@ configs:
|
|
72 |
- split: test
|
73 |
path: commitchronicle-py-long-labels/test-*
|
74 |
---
|
|
|
75 |
# ๐๏ธ Long Code Arena (Commit Message Generation)
|
76 |
|
77 |
-
This is the benchmark for Commit Message Generation task as part of
|
|
|
78 |
|
79 |
## How-to
|
80 |
|
81 |
-
|
|
|
|
|
|
|
|
|
|
|
82 |
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
|
87 |
-
|
88 |
-
|
89 |
|
90 |
-
|
|
|
91 |
|
92 |
```
|
93 |
from datasets import load_dataset
|
@@ -96,41 +86,44 @@ This is the benchmark for Commit Message Generation task as part of ๐๏ธ Long
|
|
96 |
dataset = load_dataset("JetBrains-Research/lca-cmg", configuration, split="test")
|
97 |
```
|
98 |
|
99 |
-
|
100 |
|
101 |
-
**Note.** Working with git repositories
|
|
|
|
|
|
|
102 |
|
103 |
## Dataset Structure
|
104 |
|
105 |
-
This dataset contains three kinds of data:
|
|
|
106 |
* *full data* about each commit (including modifications)
|
107 |
* metadata with quality *labels*
|
108 |
* compressed *git repositories*
|
109 |
|
110 |
-
|
111 |
### Full data
|
112 |
|
113 |
This section concerns configuration with *full data* about each commit (no `-labels` suffix).
|
114 |
|
115 |
Each example has the following fields:
|
116 |
|
117 |
-
|
|
118 |
-
|
119 |
-
|
|
120 |
-
|
|
121 |
-
|
|
122 |
-
|
|
123 |
-
|
|
124 |
-
|
|
125 |
-
|
126 |
-
We consider two possible commit modifications formats:
|
127 |
-
* lists of file diffs
|
128 |
-
* full file sources before and after commit
|
129 |
|
|
|
130 |
|
131 |
-
|
132 |
-
|
133 |
-
|
|
|
|
|
|
|
134 |
|
135 |
Data point example:
|
136 |
|
@@ -153,17 +146,18 @@ This section concerns configuration with metadata and *labels* (with `-labels` s
|
|
153 |
|
154 |
Each example has the following fields:
|
155 |
|
156 |
-
|
|
157 |
-
|
158 |
-
|
|
159 |
-
|
|
160 |
-
|
|
161 |
-
|
|
162 |
-
|
|
163 |
-
|
|
164 |
-
|
|
165 |
|
166 |
Labels are in 1-5 scale, where:
|
|
|
167 |
* 1 โ strong no
|
168 |
* 2 โ weak no
|
169 |
* 3 โ unsure
|
@@ -184,4 +178,8 @@ Data point example:
|
|
184 |
|
185 |
### Git Repositories
|
186 |
|
187 |
-
This section concerns [`repos`](https://huggingface.co/datasets/JetBrains-Research/lca-cmg/tree/main/repos) directory,
|
|
|
|
|
|
|
|
|
|
13 |
- name: message
|
14 |
dtype: string
|
15 |
- name: mods
|
16 |
+
list:
|
|
|
|
|
17 |
- name: change_type
|
18 |
dtype: string
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
- name: old_path
|
20 |
dtype: string
|
21 |
- name: new_path
|
22 |
dtype: string
|
23 |
+
- name: diff
|
|
|
|
|
24 |
dtype: string
|
25 |
splits:
|
26 |
- name: test
|
|
|
27 |
num_examples: 163
|
|
|
|
|
28 |
- config_name: commitchronicle-py-long-labels
|
29 |
features:
|
30 |
- name: hash
|
|
|
45 |
- name: test
|
46 |
num_bytes: 272359
|
47 |
num_examples: 858
|
|
|
|
|
48 |
configs:
|
49 |
- config_name: commitchronicle-py-long
|
50 |
data_files:
|
|
|
55 |
- split: test
|
56 |
path: commitchronicle-py-long-labels/test-*
|
57 |
---
|
58 |
+
|
59 |
# ๐๏ธ Long Code Arena (Commit Message Generation)
|
60 |
|
61 |
+
This is the benchmark for Commit Message Generation task as part of
|
62 |
+
๐๏ธ [Long Code Arena benchmark](https://huggingface.co/spaces/JetBrains-Research/long-code-arena).
|
63 |
|
64 |
## How-to
|
65 |
|
66 |
+
> Temporary: While the dataset is private, if you haven't used HF Hub before, add your token via `huggingface-cli`
|
67 |
+
> first:
|
68 |
+
>
|
69 |
+
> ```
|
70 |
+
> huggingface-cli login
|
71 |
+
> ```
|
72 |
|
73 |
+
1. List all the available configs
|
74 |
+
via [`datasets.get_dataset_config_names`](https://huggingface.co/docs/datasets/v2.14.3/en/package_reference/loading_methods#datasets.get_dataset_config_names)
|
75 |
+
and choose an appropriate one.
|
76 |
|
77 |
+
Current configs: `commitchronicle-py-long`, `commitchronicle-py-long-labels`
|
|
|
78 |
|
79 |
+
2. Load the data
|
80 |
+
via [`load_dataset`](https://huggingface.co/docs/datasets/v2.14.3/en/package_reference/loading_methods#datasets.load_dataset):
|
81 |
|
82 |
```
|
83 |
from datasets import load_dataset
|
|
|
86 |
dataset = load_dataset("JetBrains-Research/lca-cmg", configuration, split="test")
|
87 |
```
|
88 |
|
89 |
+
Note that all the data we have is considered to be in the test split.
|
90 |
|
91 |
+
**Note.** Working with git repositories
|
92 |
+
under [`repos`](https://huggingface.co/datasets/JetBrains-Research/lca-cmg/tree/main/repos) directory is not supported
|
93 |
+
via ๐ค Datasets. Download and extract the contents of each repository. We provide a full list of files
|
94 |
+
in [`paths.json`](https://huggingface.co/datasets/JetBrains-Research/lca-cmg/blob/main/paths.json).
|
95 |
|
96 |
## Dataset Structure
|
97 |
|
98 |
+
This dataset contains three kinds of data:
|
99 |
+
|
100 |
* *full data* about each commit (including modifications)
|
101 |
* metadata with quality *labels*
|
102 |
* compressed *git repositories*
|
103 |
|
|
|
104 |
### Full data
|
105 |
|
106 |
This section concerns configuration with *full data* about each commit (no `-labels` suffix).
|
107 |
|
108 |
Each example has the following fields:
|
109 |
|
110 |
+
| **Field** | **Description** |
|
111 |
+
|:---------:|:-----------------------------------------:|
|
112 |
+
| `repo` | Commit repository. |
|
113 |
+
| `hash` | Commit hash. |
|
114 |
+
| `date` | Commit date. |
|
115 |
+
| `license` | Commit repository's license. |
|
116 |
+
| `message` | Commit message. |
|
117 |
+
| `mods` | List of file modifications from a commit. |
|
|
|
|
|
|
|
|
|
118 |
|
119 |
+
Each file modification has the following fields:
|
120 |
|
121 |
+
| **Field** | **Description** |
|
122 |
+
|:-------------:|:-------------------------------------------------------------------------------------------------:|
|
123 |
+
| `change_type` | Type of change to current file. One of: `ADD`, `COPY`, `RENAME`, `DELETE`, `MODIFY` or `UNKNOWN`. |
|
124 |
+
| `old_path` | Path to file before change (might be empty). |
|
125 |
+
| `new_path` | Path to file after change (might be empty). |
|
126 |
+
| `diff` | `git diff` for current file. |
|
127 |
|
128 |
Data point example:
|
129 |
|
|
|
146 |
|
147 |
Each example has the following fields:
|
148 |
|
149 |
+
| **Field** | **Description** |
|
150 |
+
|:---------:|:------------------------------------------------------------------:|
|
151 |
+
| `repo` | Commit repository. |
|
152 |
+
| `hash` | Commit hash. |
|
153 |
+
| `date` | Commit date. |
|
154 |
+
| `license` | Commit repository's license. |
|
155 |
+
| `message` | Commit message. |
|
156 |
+
| `label` | Label of current commit as a target for CMG task. |
|
157 |
+
| `comment` | Comment for a label for current commit (optional, might be empty). |
|
158 |
|
159 |
Labels are in 1-5 scale, where:
|
160 |
+
|
161 |
* 1 โ strong no
|
162 |
* 2 โ weak no
|
163 |
* 3 โ unsure
|
|
|
178 |
|
179 |
### Git Repositories
|
180 |
|
181 |
+
This section concerns [`repos`](https://huggingface.co/datasets/JetBrains-Research/lca-cmg/tree/main/repos) directory,
|
182 |
+
which stores compressed Git repositories for all the commits in this benchmark. After you download and extract it, you
|
183 |
+
can work with each repository either via Git or via Python libraries
|
184 |
+
like [GitPython](https://github.com/gitpython-developers/GitPython)
|
185 |
+
or [PyDriller](https://github.com/ishepard/pydriller).
|
commitchronicle-py-long/test-00000-of-00001-c91b0bca349ab4a3.parquet
CHANGED
@@ -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:4a7e066894e692a1d1e94a5d94676c1c4bd8cab75ac7fa158476eeb51ab413cb
|
3 |
+
size 537336
|