Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
dataset_info:
|
| 3 |
features:
|
|
@@ -27,3 +58,5 @@ configs:
|
|
| 27 |
- split: train
|
| 28 |
path: data/train-*
|
| 29 |
---
|
|
|
|
|
|
|
|
|
| 1 |
+
# Stack-Smol-Docstrings
|
| 2 |
+
|
| 3 |
+
This dataset contains Python functions extracted from The Stack (small) dataset,
|
| 4 |
+
selected for their high-quality docstrings and implementations. Each sample includes
|
| 5 |
+
the function's docstring, implementation, and a masked version of the code where the
|
| 6 |
+
function is replaced with a comment.
|
| 7 |
+
|
| 8 |
+
The dataset is designed for code completion tasks where a model needs to restore a
|
| 9 |
+
function that has been replaced with a comment. The model is provided with:
|
| 10 |
+
1. The full file context with the function replaced by a comment
|
| 11 |
+
2. The docstring of the function
|
| 12 |
+
3. The function name
|
| 13 |
+
|
| 14 |
+
The model's task is to generate code that replaces the comment with a proper implementation
|
| 15 |
+
of the function based on the docstring and surrounding context.
|
| 16 |
+
|
| 17 |
+
## Dataset Structure
|
| 18 |
+
Each sample contains:
|
| 19 |
+
- `function_name`: Name of the function
|
| 20 |
+
- `docstring`: The function's docstring
|
| 21 |
+
- `masked_code`: The full file with the function replaced by a comment
|
| 22 |
+
- `implementation`: The original function implementation
|
| 23 |
+
- `start_line`: The starting line number of the function in the original file
|
| 24 |
+
- `end_line`: The ending line number of the function in the original file
|
| 25 |
+
- `file_content`: The full original file content
|
| 26 |
+
|
| 27 |
+
## Quality Filtering
|
| 28 |
+
Functions are filtered based on:
|
| 29 |
+
- Docstring quality (length, structure, descriptiveness)
|
| 30 |
+
- Implementation quality (no SQL strings, reasonable number of variables, sufficient complexity)
|
| 31 |
+
|
| 32 |
---
|
| 33 |
dataset_info:
|
| 34 |
features:
|
|
|
|
| 58 |
- split: train
|
| 59 |
path: data/train-*
|
| 60 |
---
|
| 61 |
+
|
| 62 |
+
|