Datasets:
Tasks:
Text Generation
Modalities:
Text
Sub-tasks:
document-retrieval
Size:
100K - 1M
ArXiv:
Tags:
code
License:
File size: 2,725 Bytes
2706ded 3e1b8db 2706ded 3e1b8db a53ae08 3e1b8db fb0abdb 3e1b8db 73ebb80 3e1b8db 73ebb80 3e1b8db b700e96 3e1b8db |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
---
language_creators:
- found
language:
- code
license:
- cc-by-nc-nd-4.0
multilinguality:
- multilingual
pretty_name: RepoBench-Completion
source_datasets:
- original
task_categories:
- text-retrieval
task_ids:
- document-retrieval
---
# Dataset Card for RepoBench-C
## Dataset Description
- **Homepage:** https://github.com/Leolty/repobench
- **Paper:** https://arxiv.org/abs/2306.03091
## Dataset Summary
**RepoBench-C (Completion)** is a subtask of **RepoBench**([GitHub](https://github.com/Leolty/repobench), [arXiv](https://arxiv.org/abs/2306.03091)), focuing on the prediction of the next line of code, given in-file context (including several preceding lines and import statements), and cross-file context.
## Settings
- `cff`: short for cross_file_first, indicating the cross-file module in next line is first used in the current file.
- `cfr`: short for cross_file_random, indicating the cross-file module in next line is not first used in the current file.
- `if`: short for in_file, indicating the next line does not contain any cross-file module.
## Supported Tasks
- `python_cff`: python code prediction with cross-file-first setting.
- `python_cfr`: python code prediction with cross-file-random setting.
- `python_if`: python code prediction with in-file setting.
- `java_cff`: java code prediction with cross-file-first setting.
- `java_cfr`: java code prediction with cross-file-random setting.
- `java_if`: java code prediction with in-file setting.
## Loading Data
For example, if you want to load the `test` set to test your model on `Python` code prediction with `cff` setting, you can do the following:
```python
from datasets import load_dataset
dataset = load_dataset("tianyang/repobench-c", "python_cff", split="test")
```
> Note: The `split` argument is optional. If not provided, the entire dataset will be loaded.
## Dataset Structure
```json
{
"repo_name": "repository name of the data point",
"file_path": "path/to/file",
"context": "commented and concatenated cross-file context",
"import_statement": "all import statements in the file",
"code": "the code for next-line prediction",
"prompt": "cross-file context + import statements + in-file code"
"next_line": "the next line of the code"
}
```
## Licensing Information
CC BY-NC-ND 4.0
## Citation Information
```bibtex
@misc{liu2023repobench,
title={RepoBench: Benchmarking Repository-Level Code Auto-Completion Systems},
author={Tianyang Liu and Canwen Xu and Julian McAuley},
year={2023},
eprint={2306.03091},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
```
## Contributions
Thanks to [@Leolty](https://github.com/Leolty) for adding this dataset. |