|
Download README.md from annachaaang/ClassEval-LineInfilling: direct link, hf CLI and curl.
- Browser
- Download file 4.34 kB
-
https://huggingface.co/datasets/annachaaang/ClassEval-LineInfilling/resolve/main/README.md
- Command line
-
hf download hf://datasets/annachaaang/ClassEval-LineInfilling/README.md
-
curl -L -o README.md https://huggingface.co/datasets/annachaaang/ClassEval-LineInfilling/resolve/main/README.md
4.34 kB
| 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. | |