Datasets:

Modalities:
Text
Formats:
parquet
Size:
< 1K
ArXiv:
DOI:
Libraries:
Datasets
Dask
License:
jenyag commited on
Commit
4287e99
Β·
verified Β·
1 Parent(s): 9764f31

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +59 -43
README.md CHANGED
@@ -47,22 +47,6 @@ dataset_info:
47
  - name: other
48
  sequence: int64
49
  configs:
50
- - config_name: large_context
51
- data_files:
52
- - split: test
53
- path: data/large_context/*
54
- - config_name: medium_context
55
- data_files:
56
- - split: test
57
- path: data/medium_context/*
58
- - config_name: small_context
59
- data_files:
60
- - split: test
61
- path: data/small_context/*
62
- - config_name: huge_context
63
- data_files:
64
- - split: test
65
- path: data/huge_context/*
66
  - config_name: large_context
67
  data_files:
68
  - split: test
@@ -87,7 +71,14 @@ configs:
87
  ```
88
  from datasets import load_dataset
89
 
90
- ds = load_dataset('JetBrains-Research/lca-codegen-huge', split='test')
 
 
 
 
 
 
 
91
  ```
92
  ## Data Point Structure
93
 
@@ -97,12 +88,12 @@ ds = load_dataset('JetBrains-Research/lca-codegen-huge', split='test')
97
  * `filename` – filepath to the completion file
98
  * `content` – content of the completion file
99
  * `completion_lines` – dictionary where keys are classes of lines and values are a list of integers (numbers of lines to complete). The classes are:
100
- * `committed` – line contains at least one function or class that was declared in the committed files from `commit_hash`
101
- * `inproject` – line contains at least one function or class that was declared in the project (excluding previous)
102
- * `infile` – line contains at least one function or class that was declared in the completion file (excluding previous)
103
- * `common` – line contains at least one function or class that was classified to be common, e.g., `main`, `get`, etc (excluding previous)
104
- * `non_informative` – line that was classified to be non-informative, e.g. too short, contains comments, etc
105
- * `random` – randomly sampled from the rest of the lines
106
  * `repo_snapshot` – dictionary with a snapshot of the repository before the commit. Has the same structure as `completion_file`, but filenames and contents are orginized as lists.
107
  * `completion_lines_raw` – the same as `completion_lines`, but before sampling.
108
 
@@ -112,33 +103,58 @@ To collect the data, we cloned repositories from GitHub where the main language
112
  The completion file for each data point is a `.py` file that was added to the repository in a commit.
113
  The state of the repository before this commit is the repo snapshot.
114
 
115
- Huge dataset is defined by number of characters in `.py` files from the repository snapshot. This number larger then 768K.
 
 
 
 
 
 
116
 
117
- ## Dataset Stats
 
 
 
 
 
118
 
119
- * Number of datapoints: 296
120
- * Number of repositories: 75
121
- * Number of commits: 252
122
 
123
  ### Completion File
124
- * Number of lines, median: 313.5
125
- * Number of lines, min: 200
126
- * Number of lines, max: 1877
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
127
 
128
- ### Repository Snapshot
129
- * `.py` files: <u>median 261</u>, from 47 to 5227
130
- * non `.py` files: <u>median 262</u>, from 24 to 7687
131
- * `.py` lines: <u>median 49811</u>
132
- * non `.py` lines: <u>median 60163</u>
133
 
134
  ### Line Counts:
135
- * infile: 2608
136
- * inproject: 2901
137
- * common: 692
138
- * committed: 1019
139
- * non-informative: 1164
140
- * random: 1426
141
- * **total**: 9810
142
 
143
  ## Scores
144
  [HF Space](https://huggingface.co/spaces/JetBrains-Research/long-code-arena)
 
47
  - name: other
48
  sequence: int64
49
  configs:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  - config_name: large_context
51
  data_files:
52
  - split: test
 
71
  ```
72
  from datasets import load_dataset
73
 
74
+ config_names = [
75
+ 'small_context',
76
+ 'medium_context',
77
+ 'large_context',
78
+ 'huge_context'
79
+ ]
80
+
81
+ ds = load_dataset('JetBrains-Research/lca-code-completion', config_name, split='test')
82
  ```
83
  ## Data Point Structure
84
 
 
88
  * `filename` – filepath to the completion file
89
  * `content` – content of the completion file
90
  * `completion_lines` – dictionary where keys are classes of lines and values are a list of integers (numbers of lines to complete). The classes are:
91
+ * `committed` – line contains at least one function or class that was declared in the committed files from `commit_hash`
92
+ * `inproject` – line contains at least one function or class that was declared in the project (excluding previous)
93
+ * `infile` – line contains at least one function or class that was declared in the completion file (excluding previous)
94
+ * `common` – line contains at least one function or class that was classified to be common, e.g., `main`, `get`, etc (excluding previous)
95
+ * `non_informative` – line that was classified to be non-informative, e.g. too short, contains comments, etc
96
+ * `random` – randomly sampled from the rest of the lines
97
  * `repo_snapshot` – dictionary with a snapshot of the repository before the commit. Has the same structure as `completion_file`, but filenames and contents are orginized as lists.
98
  * `completion_lines_raw` – the same as `completion_lines`, but before sampling.
99
 
 
103
  The completion file for each data point is a `.py` file that was added to the repository in a commit.
104
  The state of the repository before this commit is the repo snapshot.
105
 
106
+ The dataset configurations are based on the number of characters in `.py` files from the repository snapshot:
107
+ - `small_context` – less than 48K characters;
108
+ - `medium_context` – from 48K to 192K characters;
109
+ - `large_context` – from 192K to 768K characters;
110
+ - `huge_context` – more than 768K characters.
111
+
112
+ ## Datasets Stats
113
 
114
+ | Dataset | Number of datapoints | Number of repositories | Number of commits |
115
+ |:-----------------:|:--------------------:|:----------------------:|:-----------------:|
116
+ | `small_context` | 144 | 46 | 63 |
117
+ | `medium_context` | 224 | 80 | 175 |
118
+ | `large_context` | 270 | 75 | 219 |
119
+ | `huge_context` | 296 | 75 | 252 |
120
 
 
 
 
121
 
122
  ### Completion File
123
+ | Dataset | Completion file lines, min | Completion file lines, max | Completion file lines, median |
124
+ |:------------------:|:--------------------------:|:--------------------------:|:------------------------------:|
125
+ | `small_context` | 201 | 1916 | 310.5 |
126
+ | `medium_context` | 200 | 1648 | 310.0 |
127
+ | `large_context` | 200 | 1694 | 278.0 |
128
+ | `huge_context` | 200 | 1877 | 313.5 |
129
+
130
+
131
+
132
+ ### Repository Snapshot `.py` files
133
+ | Dataset | Context py files number, min | Context py files number, max | Context py files number, median | Context py lines, median |
134
+ |:------------------:|:----------------------------:|:----------------------------:|:--------------------------------:|:-------------------------:|
135
+ | `small_context` | 0 | 52 | 4.0 | 128.0 |
136
+ | `medium_context` | 3 | 117 | 34.0 | 3786.0 |
137
+ | `large_context` | 3 | 255 | 84.0 | 15466.5 |
138
+ | `huge_context` | 47 | 5227 | 261.0 | 49811.0 |
139
+
140
+
141
+ ### Repository Snapshot non `.py` files
142
+ | Dataset | Context non-py files number, min | Context non-py files number, max | Context non-py files number, median | Context non-py lines, median |
143
+ |:------------------:|:---------------------------------:|:---------------------------------:|:-----------------------------------:|:-----------------------------:|
144
+ | `small_context` | 1 | 1044 | 19.5 | 1227.0 |
145
+ | `medium_context` | 3 | 3977 | 64.5 | 9735.0 |
146
+ | `large_context` | 8 | 2174 | 155.0 | 18759.0 |
147
+ | `huge_context` | 24 | 7687 | 262.0 | 60163.0 |
148
 
 
 
 
 
 
149
 
150
  ### Line Counts:
151
+ | Dataset | *infile* | *inproject* | *common* | *commited* | *non-informative* | *random* | **all** |
152
+ |:------------------:|:--------:|:-----------:|:--------:|:----------:|:-----------------:|:--------:|:-----:|
153
+ | `small_context` | 1430 | 95 | 500 | 1426 | 532 | 703 | **4686** |
154
+ | `medium_context` | 2224 | 2236 | 779 | 1495 | 858 | 1084 | **8676** |
155
+ | `large_context` | 2691 | 2595 | 693 | 1322 | 1019 | 1311 | **9631** |
156
+ | `huge_context` | 2608 | 2901 | 692 | 1019 | 1164 | 1426 | **9810** |
157
+
158
 
159
  ## Scores
160
  [HF Space](https://huggingface.co/spaces/JetBrains-Research/long-code-arena)