Update README.md
Browse files
README.md
CHANGED
|
@@ -69,3 +69,55 @@ configs:
|
|
| 69 |
- split: test
|
| 70 |
path: data/test-*
|
| 71 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
- split: test
|
| 70 |
path: data/test-*
|
| 71 |
---
|
| 72 |
+
|
| 73 |
+
# ClassEval-LineInfilling
|
| 74 |
+
|
| 75 |
+
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.
|
| 76 |
+
|
| 77 |
+
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.
|
| 78 |
+
|
| 79 |
+
## Dataset Construction
|
| 80 |
+
|
| 81 |
+
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:
|
| 82 |
+
|
| 83 |
+
* `prefix`: code before the target line;
|
| 84 |
+
* `solution`: the target line to be predicted;
|
| 85 |
+
* `suffix`: code after the target line.
|
| 86 |
+
|
| 87 |
+
This construction preserves the original class-level semantic context while changing the prediction granularity from whole-class generation to localized line-level infilling.
|
| 88 |
+
|
| 89 |
+
## Dataset Fields
|
| 90 |
+
|
| 91 |
+
Each example includes the original ClassEval metadata and the fields introduced for the infilling formulation. The main fields for evaluation are:
|
| 92 |
+
|
| 93 |
+
* `task_id`: the original ClassEval task identifier;
|
| 94 |
+
* `new_task_id`: the derived infilling instance identifier;
|
| 95 |
+
* `class_name`: the class name;
|
| 96 |
+
* `method_name`: the method from which the target line is removed;
|
| 97 |
+
* `method_signature`: the signature of the target method;
|
| 98 |
+
* `line_index`: the index of the removed line;
|
| 99 |
+
* `prefix`: code before the missing line;
|
| 100 |
+
* `solution`: the target line to be predicted;
|
| 101 |
+
* `suffix`: code after the missing line;
|
| 102 |
+
* `test`: unit tests inherited from the original ClassEval instance.
|
| 103 |
+
|
| 104 |
+
## Intended Use
|
| 105 |
+
|
| 106 |
+
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.
|
| 107 |
+
|
| 108 |
+
## Source and Attribution
|
| 109 |
+
|
| 110 |
+
This dataset is derived from FudanSELab/ClassEval.
|
| 111 |
+
|
| 112 |
+
Please cite the original ClassEval paper when using this derived dataset:
|
| 113 |
+
|
| 114 |
+
> ClassEval: A Manually-Crafted Benchmark for Evaluating LLMs on Class-level Code Generation.
|
| 115 |
+
|
| 116 |
+
## License
|
| 117 |
+
|
| 118 |
+
The original ClassEval data is distributed under CC BY-NC 4.0. This derived dataset follows the same data license.
|
| 119 |
+
|
| 120 |
+
## Notes
|
| 121 |
+
|
| 122 |
+
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.
|
| 123 |
+
|