rasdani/verifiable-coding-problems-python_decontaminated_fewer_test_cases
import datasets import random def limit_test_cases_uniformly(example, max_test_cases=6): num_test_cases = random.randint(1, max_test_cases) example['verification_info']['test_cases'] = example['verification_info']['test_cases'][:num_test_cases] return example ds = datasets.load_dataset("open-r1/verifiable-coding-problems-python_decontaminated", split="train") ds_filtered = ds.map(limit_test_cases_uniformly, num_proc=10)… See the full description on the dataset page: https://huggingface.co/datasets/rasdani/verifiable-coding-problems-python_decontaminated_fewer_test_cases.
045
1---2dataset_info:3 features:4 - name: source5 dtype: string6 - name: task_type7 dtype: string8 - name: in_source_id9 dtype: string10 - name: problem11 dtype: string12 - name: gold_standard_solution13 dtype: string14 - name: problem_id15 dtype: string16 - name: metadata17 struct:18 - name: difficulty19 dtype: string20 - name: memory_limit21 dtype: string22 - name: memory_limit_bytes23 dtype: int6424 - name: problem_url25 dtype: string26 - name: time_limit27 dtype: string28 - name: verification_info29 struct:30 - name: language31 dtype: string32 - name: test_cases33 list:34 - name: fn_name35 dtype: string36 - name: input37 dtype: string38 - name: output39 dtype: string40 - name: type41 dtype: string42 splits:43 - name: train44 num_bytes: 38593075445 num_examples: 2783946 download_size: 23524600047 dataset_size: 38593075448configs:49- config_name: default50 data_files:51 - split: train52 path: data/train-*53---54```python55import datasets56import random57 58 59def 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 example63 64 65ds = datasets.load_dataset("open-r1/verifiable-coding-problems-python_decontaminated", split="train")66ds_filtered = ds.map(limit_test_cases_uniformly, num_proc=10)67 68ds_filtered.push_to_hub("rasdani/verifiable-coding-problems-python_decontaminated_fewer_test_cases")69```70 71Before:72<img src="before.png" alt="before.png" style="width: 400px; height: auto;">73 74After:75<img src="after.png" alt="after.png" style="width: 400px; height: auto;">76 