tianyang commited on
Commit
55a872c
1 Parent(s): bb75bc1

upload README

Browse files
Files changed (1) hide show
  1. README.md +100 -1
README.md CHANGED
@@ -1,3 +1,102 @@
1
  ---
2
- license: cc-by-nc-nd-4.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language_creators:
3
+ - found
4
+ language:
5
+ - code
6
+ license:
7
+ - cc-by-nc-nd-4.0
8
+ multilinguality:
9
+ - multilingual
10
+ pretty_name: RepoBench-Completion
11
+ source_datasets:
12
+ - original
13
+ task_categories:
14
+ - text-retrieval
15
+ task_ids:
16
+ - document-retrieval
17
  ---
18
+
19
+ # Dataset Card for RepoBench-R
20
+
21
+ ## Dataset Description
22
+
23
+ - **Homepage:** https://github.com/Leolty/repobench
24
+ - **Paper:** https://arxiv.org/abs/2306.03091
25
+
26
+ ## Dataset Summary
27
+
28
+ RepoBench-P is a subtask of [RepoBench](https://github.com/Leolty/repobench), 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.
29
+
30
+ ## Settings
31
+
32
+ - `cff`: short for cross_file_first, indicating the cross-file module in next line is first used in the current file.
33
+
34
+ - `cfr`: short for cross_file_random, indicating the cross-file module in next line is not first used in the current file.
35
+
36
+ - `if`: short for in_file, indicating the next line does not contain any cross-file module.
37
+
38
+ ## Supported Languages
39
+
40
+ - `python` and `java`
41
+
42
+ ## Loading Data
43
+
44
+ For example, to load the `python` dataset, and you can provide the `split` argument to choose the specific setting.
45
+
46
+ ```python
47
+ from datasets import load_dataset
48
+
49
+ dataset = load_dataset("tianyang/repobench-c", "python", split="cff")
50
+ ```
51
+
52
+ > Note: The `split` argument is optional. If not provided, the entire dataset will be loaded.
53
+
54
+ ## Dataset Structure
55
+
56
+ ```json
57
+ {
58
+ "repo_name": "repository name of the data point",
59
+ "file_path": "path/to/current_file",
60
+ "context": [
61
+ {
62
+ "path": "path/to/cross_file_1",
63
+ "identifier": "identifier of the cross-file module",
64
+ "snippet": "the code snippet of the cross-file module",
65
+ "tokenized_snippet": "tokenized code snippet of the cross-file module"
66
+ },
67
+ // ...
68
+ {
69
+ "path": "path/to/cross_file_k",
70
+ "identifier": "identifier of the cross-file module",
71
+ "snippet": "the code snippet of the cross-file module",
72
+ "tokenized_snippet": "tokenized code snippet of the cross-file module"
73
+ },
74
+ ],
75
+ "import_statement": "all import statements in current file",
76
+ "code": "the code for next-line prediction",
77
+ "next_line": "the next line of the code",
78
+ "gold_snippet_index": 2 // NOTE: Only for "cross_file_first" and "cross_file_random" settings, for "in_file" setting, we set it to -1.
79
+
80
+ }
81
+ ```
82
+
83
+ ## Licensing Information
84
+
85
+ CC BY-NC-ND 4.0
86
+
87
+ ## Citation Information
88
+
89
+ ```bibtex
90
+ @misc{liu2023repobench,
91
+ title={RepoBench: Benchmarking Repository-Level Code Auto-Completion Systems},
92
+ author={Tianyang Liu and Canwen Xu and Julian McAuley},
93
+ year={2023},
94
+ eprint={2306.03091},
95
+ archivePrefix={arXiv},
96
+ primaryClass={cs.CL}
97
+ }
98
+ ```
99
+
100
+ ## Contributions
101
+
102
+ Thanks to [@Leolty](https://github.com/Leolty) for adding this dataset.