File size: 4,343 Bytes
972acc1 e6cd70f 972acc1 e6cd70f 972acc1 a902789 972acc1 3acaa8a | 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 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | ---
dataset_info:
features:
- name: task_id
dtype: string
- name: skeleton
dtype: string
- name: test
dtype: string
- name: solution_code
dtype: string
- name: import_statement
list: string
- name: class_description
dtype: string
- name: methods_info
list:
- name: dependencies
struct:
- name: Standalone
dtype: bool
- name: field_dependencies
list: string
- name: lib_dependencies
list: string
- name: method_dependencies
list: string
- name: method_description
dtype: string
- name: method_name
dtype: string
- name: solution_code
dtype: string
- name: test_class
dtype: string
- name: test_code
dtype: string
- name: class_name
dtype: string
- name: test_classes
list: string
- name: class_constructor
dtype: string
- name: fields
list: string
- name: new_task_id
dtype: string
- name: line_index
dtype: int64
- name: method_name
dtype: string
- name: method_signature
dtype: string
- name: prefix
dtype: string
- name: solution
dtype: string
- name: suffix
dtype: string
splits:
- name: test
num_bytes: 59676301
num_examples: 2557
download_size: 1017903
dataset_size: 59676301
configs:
- config_name: default
data_files:
- split: test
path: data/test-*
---
# ClassEval-LineInfilling
ClassEval-LineInfilling is a derived fill-in-the-middle benchmark constructed from the original FudanSELab/ClassEval dataset. The original ClassEval benchmark contains human-crafted class-level Python programming tasks with class skeletons, unit tests, ground-truth implementations, and method-level metadata.
This derived dataset reformulates ClassEval into a line-level infilling task. For each non-empty line in the body of every non-constructor method, we construct one infilling instance. Each instance contains a full-file prefix, a target line to be predicted, and a suffix. The model is expected to generate the missing target line given the surrounding class-level context.
## Dataset Construction
Starting from each ClassEval class implementation, we identify non-constructor methods and convert eligible non-empty method-body lines into individual infilling examples. For each target line, we preserve the original class-level context and split the code into:
* `prefix`: code before the target line;
* `solution`: the target line to be predicted;
* `suffix`: code after the target line.
This construction preserves the original class-level semantic context while changing the prediction granularity from whole-class generation to localized line-level infilling.
## Dataset Fields
Each example includes the original ClassEval metadata and the fields introduced for the infilling formulation. The main fields for evaluation are:
* `task_id`: the original ClassEval task identifier;
* `new_task_id`: the derived infilling instance identifier;
* `class_name`: the class name;
* `method_name`: the method from which the target line is removed;
* `method_signature`: the signature of the target method;
* `line_index`: the index of the removed line;
* `prefix`: code before the missing line;
* `solution`: the target line to be predicted;
* `suffix`: code after the missing line;
* `test`: unit tests inherited from the original ClassEval instance.
## Intended Use
This dataset is intended for evaluating fill-in-the-middle code generation models, especially in settings where models must produce concise and context-bounded code insertions. It is used in our study as the ClassEval-LineInfilling benchmark for evaluating Flow-mode code infilling behavior.
## Source and Attribution
This dataset is derived from FudanSELab/ClassEval.
Please cite the original ClassEval paper when using this derived dataset:
> ClassEval: A Manually-Crafted Benchmark for Evaluating LLMs on Class-level Code Generation.
## License
The original ClassEval data is distributed under CC BY-NC 4.0. This derived dataset follows the same data license.
## Notes
This dataset is a derived benchmark and should not be interpreted as a new independently collected dataset. Its purpose is to provide a line-level infilling formulation of ClassEval while preserving the original class-level semantic context.
|