Updated README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,127 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
dataset_info:
|
| 4 |
+
features:
|
| 5 |
+
- name: repo
|
| 6 |
+
dtype: string
|
| 7 |
+
- name: commit_hash
|
| 8 |
+
dtype: string
|
| 9 |
+
- name: completion_file
|
| 10 |
+
struct:
|
| 11 |
+
- name: filename
|
| 12 |
+
dtype: string
|
| 13 |
+
- name: content
|
| 14 |
+
dtype: string
|
| 15 |
+
- name: completion_lines
|
| 16 |
+
struct:
|
| 17 |
+
- name: infile
|
| 18 |
+
sequence: int32
|
| 19 |
+
- name: inproject
|
| 20 |
+
sequence: int32
|
| 21 |
+
- name: common
|
| 22 |
+
sequence: int32
|
| 23 |
+
- name: commited
|
| 24 |
+
sequence: int32
|
| 25 |
+
- name: non_informative
|
| 26 |
+
sequence: int32
|
| 27 |
+
- name: random
|
| 28 |
+
sequence: int32
|
| 29 |
+
- name: repo_snapshot
|
| 30 |
+
sequence:
|
| 31 |
+
- name: filename
|
| 32 |
+
dtype: string
|
| 33 |
+
- name: content
|
| 34 |
+
dtype: string
|
| 35 |
+
- name: completion_lines_raw
|
| 36 |
+
struct:
|
| 37 |
+
- name: commited
|
| 38 |
+
sequence: int64
|
| 39 |
+
- name: common
|
| 40 |
+
sequence: int64
|
| 41 |
+
- name: infile
|
| 42 |
+
sequence: int64
|
| 43 |
+
- name: inproject
|
| 44 |
+
sequence: int64
|
| 45 |
+
- name: non_informative
|
| 46 |
+
sequence: int64
|
| 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 |
+
---
|
| 67 |
+
|
| 68 |
+
# LCA Project Level Code Completion
|
| 69 |
+
## How to load the dataset
|
| 70 |
+
```
|
| 71 |
+
from datasets import load_dataset
|
| 72 |
+
|
| 73 |
+
ds = load_dataset('JetBrains-Research/lca-codegen-huge', split='test')
|
| 74 |
+
```
|
| 75 |
+
## Data Point Structure
|
| 76 |
+
|
| 77 |
+
* `repo` β repository name in format `{GitHub_user_name}__{repository_name}`
|
| 78 |
+
* `commit_hash` β commit hash
|
| 79 |
+
* `completion_file` β dictionary with the completion file content in the following format:
|
| 80 |
+
* `filename` β filepath to the completion file
|
| 81 |
+
* `content` β content of the completion file
|
| 82 |
+
* `completion_lines` β dictionary where keys are classes of lines and values are a list of integers (numbers of lines to complete). The classes are:
|
| 83 |
+
* `committed` β line contains at least one function or class that was declared in the committed files from `commit_hash`
|
| 84 |
+
* `inproject` β line contains at least one function or class that was declared in the project (excluding previous)
|
| 85 |
+
* `infile` β line contains at least one function or class that was declared in the completion file (excluding previous)
|
| 86 |
+
* `common` β line contains at least one function or class that was classified to be common, e.g., `main`, `get`, etc (excluding previous)
|
| 87 |
+
* `non_informative` β line that was classified to be non-informative, e.g. too short, contains comments, etc
|
| 88 |
+
* `random` β randomly sampled from the rest of the lines
|
| 89 |
+
* `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.
|
| 90 |
+
* `completion_lines_raw` β the same as `completion_lines`, but before sampling.
|
| 91 |
+
|
| 92 |
+
## How we collected the data
|
| 93 |
+
|
| 94 |
+
To collect the data, we cloned repositories from GitHub where the main language is Python.
|
| 95 |
+
The completion file for each data point is a `.py` file that was added to the repository in a commit.
|
| 96 |
+
The state of the repository before this commit is the repo snapshot.
|
| 97 |
+
|
| 98 |
+
Huge dataset is defined by number of characters in `.py` files from the repository snapshot. This number larger then 768K.
|
| 99 |
+
|
| 100 |
+
## Dataset Stats
|
| 101 |
+
|
| 102 |
+
* Number of datapoints: 296
|
| 103 |
+
* Number of repositories: 75
|
| 104 |
+
* Number of commits: 252
|
| 105 |
+
|
| 106 |
+
### Completion File
|
| 107 |
+
* Number of lines, median: 313.5
|
| 108 |
+
* Number of lines, min: 200
|
| 109 |
+
* Number of lines, max: 1877
|
| 110 |
+
|
| 111 |
+
### Repository Snapshot
|
| 112 |
+
* `.py` files: <u>median 261</u>, from 47 to 5227
|
| 113 |
+
* non `.py` files: <u>median 262</u>, from 24 to 7687
|
| 114 |
+
* `.py` lines: <u>median 49811</u>
|
| 115 |
+
* non `.py` lines: <u>median 60163</u>
|
| 116 |
+
|
| 117 |
+
### Line Counts:
|
| 118 |
+
* infile: 2608
|
| 119 |
+
* inproject: 2901
|
| 120 |
+
* common: 692
|
| 121 |
+
* committed: 1019
|
| 122 |
+
* non-informative: 1164
|
| 123 |
+
* random: 1426
|
| 124 |
+
* **total**: 9810
|
| 125 |
+
|
| 126 |
+
## Scores
|
| 127 |
+
[HF Space](https://huggingface.co/spaces/JetBrains-Research/long-code-arena)
|