Update README.md
Browse files
README.md
CHANGED
|
@@ -58,5 +58,66 @@ configs:
|
|
| 58 |
path: data/test-*
|
| 59 |
---
|
| 60 |
|
| 61 |
-
|
| 62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
path: data/test-*
|
| 59 |
---
|
| 60 |
|
| 61 |
+
# LCA Project Level Code Completion
|
| 62 |
|
| 63 |
+
## How to load the dataset
|
| 64 |
+
|
| 65 |
+
```
|
| 66 |
+
from datasets import load_dataset
|
| 67 |
+
|
| 68 |
+
ds = load_dataset('JetBrains-Research/lca-codegen-small', split='test')
|
| 69 |
+
```
|
| 70 |
+
|
| 71 |
+
## Data Point Structure
|
| 72 |
+
|
| 73 |
+
* `repo` – repository name in format `{GitHub_user_name}__{repository_name}`
|
| 74 |
+
* `commit_hash` – commit hash
|
| 75 |
+
* `completion_file` – dictionary with the completion file content in the following format:
|
| 76 |
+
* `filename` – filepath to the completion file
|
| 77 |
+
* `content` – content of the completion file
|
| 78 |
+
* `completion_lines` – dictionary where keys are classes of lines and values are a list of integers (numbers of lines to complete). The classes are:
|
| 79 |
+
* `committed` – line contains at least one function or class that was declared in the committed files from `commit_hash`
|
| 80 |
+
* `inproject` – line contains at least one function or class that was declared in the project (excluding previous)
|
| 81 |
+
* `infile` – line contains at least one function or class that was declared in the completion file (excluding previous)
|
| 82 |
+
* `common` – line contains at least one function or class that was classified to be common, e.g., `main`, `get`, etc (excluding previous)
|
| 83 |
+
* `non_informative` – line that was classified to be non-informative, e.g. too short, contains comments, etc
|
| 84 |
+
* `random` – randomly sampled from the rest of the lines
|
| 85 |
+
* `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.
|
| 86 |
+
* `completion_lines_raw` – the same as `completion_lines`, but before sampling.
|
| 87 |
+
|
| 88 |
+
## How we collected the data
|
| 89 |
+
|
| 90 |
+
To collect the data, we cloned repositories from GitHub where the main language is Python.
|
| 91 |
+
The completion file for each data point is a `.py` file that was added to the repository in a commit.
|
| 92 |
+
The state of the repository before this commit is the repo snapshot.
|
| 93 |
+
|
| 94 |
+
Small dataset is defined by number of characters in `.py` files from the repository snapshot. This number is less than 48K.
|
| 95 |
+
|
| 96 |
+
## Dataset Stats
|
| 97 |
+
|
| 98 |
+
* Number of datapoints: 144
|
| 99 |
+
* Number of repositories: 46
|
| 100 |
+
* Number of commits: 63
|
| 101 |
+
|
| 102 |
+
### Completion File
|
| 103 |
+
* Number of lines, median: 310.5
|
| 104 |
+
* Number of lines, min: 201
|
| 105 |
+
* Number of lines, max: 1916
|
| 106 |
+
|
| 107 |
+
### Repository Snapshot
|
| 108 |
+
* `.py` files: <u>median 4</u>, from 0 to 52
|
| 109 |
+
* non `.py` files: <u>median 19.5</u>, from 1 to 1044
|
| 110 |
+
* `.py` lines: <u>median 128</u>
|
| 111 |
+
* non `.py` lines: <u>median 1227</u>
|
| 112 |
+
|
| 113 |
+
### Line Counts:
|
| 114 |
+
* infile: 1430
|
| 115 |
+
* inproject: 95
|
| 116 |
+
* common: 500
|
| 117 |
+
* committed: 1426
|
| 118 |
+
* non-informative: 532
|
| 119 |
+
* random: 703
|
| 120 |
+
* **total**: 4686
|
| 121 |
+
|
| 122 |
+
## Scores
|
| 123 |
+
[HF Space](https://huggingface.co/spaces/JetBrains-Research/long-code-arena)
|