Datasets:
The viewer is disabled because this dataset repo requires arbitrary Python code execution. Please consider
removing the
loading script
and relying on
automated data support
(you can use
convert_to_parquet
from the datasets
library). If this is not possible, please
open a discussion
for direct help.
Dataset Card for RepoBench-P
Dataset Summary
RepoBench-P (Pipeline) is a subtask of RepoBench(GitHub, arXiv), combinig the retrieval and code completion tasks. Specifically, the retrieval task is used to retrieve the most relevant code snippet first, and then do the code completion task with retrieved code snippet as cross-file context for next-line prediction, which mirrors complex real-world scenarios that a practical auto-completion system would face.
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 Languages
python
andjava
Loading Data
For example, to load the python
dataset, and you can provide the split
argument to choose the specific setting.
from datasets import load_dataset
dataset = load_dataset("tianyang/repobench-p", "python", split="cff")
Note: The
split
argument is optional. If not provided, the entire dataset will be loaded.
Dataset Structure
{
"repo_name": "repository name of the data point",
"file_path": "path/to/current_file",
"context": [
{
"path": "path/to/cross_file_1",
"identifier": "identifier of the cross-file module",
"snippet": "the code snippet of the cross-file module",
"tokenized_snippet": "tokenized code snippet of the cross-file module"
},
// ...
{
"path": "path/to/cross_file_k",
"identifier": "identifier of the cross-file module",
"snippet": "the code snippet of the cross-file module",
"tokenized_snippet": "tokenized code snippet of the cross-file module"
},
],
"import_statement": "all import statements in current file",
"code": "the code for next-line prediction",
"next_line": "the next line of the code",
"gold_snippet_index": 2 // NOTE: Only for "cross_file_first" and "cross_file_random" settings, for "in_file" setting, we set it to -1.
}
Licensing Information
CC BY-NC-ND 4.0
Citation Information
@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 for adding this dataset.
- Downloads last month
- 50