Update README.md
Browse files
README.md
CHANGED
@@ -53,11 +53,19 @@ configs:
|
|
53 |
---
|
54 |
```python
|
55 |
import datasets
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
|
57 |
ds = datasets.load_dataset("open-r1/verifiable-coding-problems-python_decontaminated", split="train")
|
58 |
-
|
59 |
|
60 |
-
|
61 |
```
|
62 |
|
63 |
Before:
|
|
|
53 |
---
|
54 |
```python
|
55 |
import datasets
|
56 |
+
import random
|
57 |
+
|
58 |
+
|
59 |
+
def limit_test_cases_uniformly(example, max_test_cases=6):
|
60 |
+
num_test_cases = random.randint(1, max_test_cases)
|
61 |
+
example['verification_info']['test_cases'] = example['verification_info']['test_cases'][:num_test_cases]
|
62 |
+
return example
|
63 |
+
|
64 |
|
65 |
ds = datasets.load_dataset("open-r1/verifiable-coding-problems-python_decontaminated", split="train")
|
66 |
+
ds_filtered = ds.map(limit_test_cases_uniformly, num_proc=10)
|
67 |
|
68 |
+
ds_filtered.push_to_hub("rasdani/verifiable-coding-problems-python_decontaminated_fewer_test_cases")
|
69 |
```
|
70 |
|
71 |
Before:
|