Datasets:

Modalities:
Text
Formats:
parquet
Size:
< 1K
ArXiv:
Libraries:
Datasets
pandas
nmuendler commited on
Commit
7bd012c
·
verified ·
1 Parent(s): b2d4397

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +36 -0
README.md CHANGED
@@ -27,3 +27,39 @@ configs:
27
  - split: test
28
  path: data/test-*
29
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  - split: test
28
  path: data/test-*
29
  ---
30
+
31
+ ## HumanEval/MRI/C++
32
+
33
+ This is a multi-region infilling version of the [C++ translation of HumanEval](https://huggingface.co/datasets/zai-org/humaneval-x). It was generated by randomly removing between 1 and 3 spans from the canonical solution in the dataset.
34
+
35
+ This dataset was used for evaluation in the paper [Constrained Decoding of Diffusion LLMs for Context-Free Grammars](https://github.com/eth-sri/constrained-diffusion).
36
+
37
+ ### Example Usage
38
+
39
+ ```python
40
+ from datasets import load_dataset
41
+ import json
42
+
43
+ dataset = load_dataset('nmuendler/HumanEval-MRI-Cpp')
44
+ for instance in dataset['test']:
45
+ print(json.dumps(instance, indent=2))
46
+ break
47
+ ```
48
+
49
+ ### Example Instance
50
+ ```json
51
+ {
52
+ "instance_id": "CPP/0_spans_1",
53
+ "number_spans": 1,
54
+ "prompt": "/*\nCheck if in given vector of numbers, are any two numbers closer to each other than\ngiven threshold.\n>>> has_close_elements({1.0, 2.0, 3.0}, 0.5)\nfalse\n>>> has_close_elements({1.0, 2.8, 3.0, 4.0, 5.0, 2.0}, 0.3)\ntrue\n*/\n#include<stdio.h>\n#include<vector>\n#include<math.h>\nusing namespace std;\nbool has_close_elements(vector<float> numbers, float threshold){\n",
55
+ "declaration": "#include<stdio.h>\n#include<vector>\n#include<math.h>\nusing namespace std;\n#include<algorithm>\n#include<stdlib.h>\nbool has_close_elements(vector<float> numbers, float threshold){\n",
56
+ "splits": [
57
+ " int i,j;\n \n for (i=0;i<numbers.size();i++)\n for (j=i+1;j<numbers.size();j++)\n if ",
58
+ ";\n\n return false;\n}\n\n"
59
+ ],
60
+ "removed_spans": [
61
+ "(abs(numbers[i]-numbers[j])<threshold)\n return true"
62
+ ],
63
+ "canonical_solution": " int i,j;\n \n for (i=0;i<numbers.size();i++)\n for (j=i+1;j<numbers.size();j++)\n if (abs(numbers[i]-numbers[j])<threshold)\n return true;\n\n return false;\n}\n\n"
64
+ }
65
+ ```