Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,96 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: mit
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
task_categories:
|
| 4 |
+
- text-generation
|
| 5 |
+
tags:
|
| 6 |
+
- code
|
| 7 |
+
- dataset
|
| 8 |
+
size_categories:
|
| 9 |
+
- n<1K
|
| 10 |
+
language:
|
| 11 |
+
- en
|
| 12 |
+
pretty_name: CodeEval
|
| 13 |
+
---
|
| 14 |
+
license: apache-2.0
|
| 15 |
+
---
|
| 16 |
+
# Dataset Card for Object-Oriented Programming
|
| 17 |
+
|
| 18 |
+
## Dataset Description
|
| 19 |
+
|
| 20 |
+
- **Repository:** [GitHub Repository](https://github.com/alphadl/OOP-eval)
|
| 21 |
+
- **Paper:** [Object-Oriented Programming Evaluation Benchmark for LLMs](https://arxiv.org/abs/2401.06628)
|
| 22 |
+
|
| 23 |
+
### Dataset Summary
|
| 24 |
+
|
| 25 |
+
The OOP benchmark consists of 431 instances, and contains three difficulty levels: Simple-level OOP, Moderate-level OOP, and Difficult-level OOP.
|
| 26 |
+
|
| 27 |
+
### Supported Tasks and Leaderboards
|
| 28 |
+
|
| 29 |
+
### Languages
|
| 30 |
+
|
| 31 |
+
The Object-Oriented Programming problems are written in Python and contain English natural text in comments and docstrings.
|
| 32 |
+
|
| 33 |
+
## Dataset Structure
|
| 34 |
+
|
| 35 |
+
```python
|
| 36 |
+
from datasets import load_dataset
|
| 37 |
+
load_dataset("oop")
|
| 38 |
+
|
| 39 |
+
DatasetDict({
|
| 40 |
+
test: Dataset({
|
| 41 |
+
features: ['task_id', 'question', 'canonical_solution', 'test_list', 'test_function', 'entry_point', 'test_matching', 'test_match_function'],
|
| 42 |
+
num_rows: 431
|
| 43 |
+
})
|
| 44 |
+
})
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
### Data Instances
|
| 48 |
+
|
| 49 |
+
#### OOP benchmark
|
| 50 |
+
```
|
| 51 |
+
{
|
| 52 |
+
'task_id': 'OOP/0',
|
| 53 |
+
'question': 'First, write a **WDS** class using the Python language. Then, within the WDS class, create a public function called **without_duplicates** to implement finding the length of the longest substring in a given string **s** that does not contain any duplicate characters.',
|
| 54 |
+
'test_function': 'def test_run(content1):\n return WDS().without_duplicates(content1)',
|
| 55 |
+
'test_list': [
|
| 56 |
+
'assert candidate("abcabcbb")==3',
|
| 57 |
+
'assert candidate("bbbbb")==1',
|
| 58 |
+
'assert candidate("pwwkew")==3'],
|
| 59 |
+
'entry_point': 'test_run',
|
| 60 |
+
'test_matching': 'assert candidate([["class WDS", "def without_duplicates"]]) == True',
|
| 61 |
+
'test_match_function': 'def matching_function(content):\n def run_match(text):\n for task in text:\n if task not in str_content:\n return False\n return True\n len_cont = len(content)\n if len_cont==1 and run_match(content[0]) == True:\n return True\n elif (len_cont==2 and run_match(content[0]) == True) or (len_cont==2 and run_match(content[1]) == True):\n return True\n else:\n return False'
|
| 62 |
+
}
|
| 63 |
+
```
|
| 64 |
+
|
| 65 |
+
### Data Fields
|
| 66 |
+
|
| 67 |
+
- `task_id`: identifier for the data sample
|
| 68 |
+
- `question`: description of programming task
|
| 69 |
+
- `test_function`: run function for the test
|
| 70 |
+
- 'test_list': list of tests to verify solution
|
| 71 |
+
- `entry_point`: entry point for test
|
| 72 |
+
- 'test_matching': list of tests to verify solution
|
| 73 |
+
- 'test_match_function': matching function for the test
|
| 74 |
+
|
| 75 |
+
### Data Splits
|
| 76 |
+
|
| 77 |
+
The OOP dataset only consists of a test split with 431 samples.
|
| 78 |
+
|
| 79 |
+
## Dataset Creation
|
| 80 |
+
|
| 81 |
+
See section 3.2 of original [paper](https://arxiv.org/abs/2401.06628).
|
| 82 |
+
|
| 83 |
+
### Citation Information
|
| 84 |
+
```
|
| 85 |
+
@inproceedings{wang2024oop,
|
| 86 |
+
title={OOP: Object-Oriented Programming Evaluation Benchmark for Large Language Models},
|
| 87 |
+
author={Shuai Wang and Liang Ding and Li Shen and Yong Luo and Bo Du and Dacheng Tao},
|
| 88 |
+
year={2024},
|
| 89 |
+
booktitle={Findings of the Association for Computational Linguistics: ACL 2023},
|
| 90 |
+
url={https://arxiv.org/abs/2401.06628},
|
| 91 |
+
}
|
| 92 |
+
```
|
| 93 |
+
|
| 94 |
+
### Contributions
|
| 95 |
+
|
| 96 |
+
Thanks to [@lvwerra](https://github.com/lvwerra) for adding this dataset.
|