File size: 6,896 Bytes
01a492e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7bc6da4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
01a492e
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
---
license: other
task_categories:
- text-generation
- reinforcement-learning
language:
- en
tags:
- code-generation
- reinforcement-learning
- agentic-rl
- polar
- slime
- harnessmix
pretty_name: HarnessMix Codegen RL Data
size_categories:
- 1K<n<10K
---

# HarnessMix Codegen RL Data

This repository contains the current HarnessMix no-Docker code-generation training and held-out evaluation data prepared from a local Harness-RL workspace.

The rows are Slime/Polar JSONL examples. Each row has a chat-style `prompt`, an empty `label`, and `metadata` for benchmark provenance, source/test assets, evaluator command, and contamination controls.

## Files

- `data/train.jsonl`: 3992 training rows.
- `data/train_manifest.jsonl`: audit manifest for the training rows.
- `data/eval.jsonl`: 559 held-out evaluation rows, combining EvalPlus, OJBench, and the current LiveCodeBench smoke row.
- `data/eval_manifest.jsonl`: audit manifest for all evaluation rows.
- `data/eval_evalplus_ojbench.jsonl`: 558 EvalPlus + OJBench held-out rows.
- `data/eval_livecodebench_smoke.jsonl`: 1 LiveCodeBench smoke row.
- `assets/`: source and test files referenced by the JSONL metadata.
- `raw/ojbench_testdata/`: selected OJBench raw prompt/testdata files needed by the current OJBench subset.
- `metadata/`: generation and filtering reports.

## Training Split

All training rows have `metadata.split = "train"`, `metadata.scenario = "code_generation"`, and `metadata.contamination.heldout = false`.

| Benchmark | Rows | Upstream/source |
|---|---:|---|
| DeepCoder PrimeIntellect | 1150 | `agentica-org/DeepCoder-Preview-Dataset:primeintellect:train` |
| LeetCodeDataset train | 979 | `newfacade/LeetCodeDataset:train` |
| CodeContests Plus | 912 | `ByteDance-Seed/Code-Contests-Plus:1x:train` |
| CodeContests-O | 660 | `OctoReasoner/Code-Contests-O:train` |
| AutoCodeBenchmark Python | 177 | `tencent/AutoCodeBenchmark:autocodebench:train:python_only` |
| MBPP sanitized train | 114 | `google-research-datasets/mbpp:sanitized:train` |
| **Total** | **3992** |  |

This training mix was produced by the HarnessMix quality/diversity filter. It excludes EvalPlus, LiveCodeBench, OJBench, raw APPS/TACO/deepmind CodeContests, and other explicitly held-out evaluation sources.

## Held-Out Evaluation Split

All evaluation rows have `metadata.split = "eval"`, `metadata.contamination.heldout = true`, and `metadata.contamination.exclude_from_training = true`.

| Benchmark | Rows | Upstream/source | Notes |
|---|---:|---|---|
| EvalPlus HumanEval+ | 164 | `evalplus/humanevalplus` | Functional Python code-generation eval. |
| EvalPlus MBPP+ | 378 | `evalplus/mbppplus` | Functional Python code-generation eval. |
| OJBench Python | 16 | `He-Ren/OJBench_testdata:prompts/full.jsonl` | Competition-style Python subset; requires OJBench/DMOJ runtime for execution. |
| LiveCodeBench code generation | 1 | `livecodebench/code_generation:test` | Smoke row only; larger streaming runs were blocked by the large official JSONL and slow remote reads. |
| **Total** | **559** |  |  |

## Schema

Each JSONL row has this shape:

```json
{
  "prompt": [{"role": "user", "content": "..."}],
  "label": "",
  "metadata": {
    "benchmark": "...",
    "split": "train|eval",
    "scenario": "code_generation",
    "example_id": "...",
    "dataset_id": "...",
    "source_path": "assets/.../solution.py",
    "test_path": "assets/.../test_solution.py",
    "prepare_actions": [{"type": "upload_file", "source": "assets/...", "target": "/polar/session/workspace/..."}],
    "evaluator_command": "python3 test_solution.py",
    "expected_output_json": {"...": "PASSED"},
    "contamination": {
      "heldout": false,
      "exclude_from_training": false,
      "do_not_mix_with_eval_benchmarks": ["EvalPlus", "LiveCodeBench", "OJBench"]
    }
  }
}
```

Paths in this repository are relative to the dataset repository root. If you run the rows from a different working directory, either run from the downloaded dataset root or rewrite `metadata.source_path`, `metadata.test_path`, and `metadata.prepare_actions[].source` accordingly.

## Evaluation Runtime Notes

EvalPlus and LiveCodeBench rows use local Python test files under `assets/` and `python3 test_solution.py` as the evaluator command.

OJBench rows call the official `ojbench`/DMOJ judge from their generated `test_solution.py`. To execute OJBench rows, install the OJBench package and its runtime dependencies (`DMOJ`, `pypy3`, and a C++17 compiler such as `g++`). The selected testdata is included under `raw/ojbench_testdata/`.

## Training-Time Eval Example

In Harness-RL, the no-Docker launcher can pass held-out data to Slime eval with name/path pairs:

```bash
PROMPT_DATA=data/train.jsonl PROMPT_MANIFEST=data/train_manifest.jsonl EVAL_PROMPT_DATA="heldout data/eval.jsonl" EVAL_INTERVAL=5 N_SAMPLES_PER_EVAL_PROMPT=1 EVAL_MAX_RESPONSE_LEN=4096 bash examples/harnessmix/no_docker_smoke/run_train.sh
```

## ProRL-Agent-Server / Polar Slime Usage

The ProRL `codegen` branch should track code, configs, and documentation only. It should not duplicate this dataset in Git. From a ProRL-Agent-Server checkout, download the dataset into the codegen example directory before running smoke tests or GRPO training:

```bash
export HF_TOKEN=<your-huggingface-token>  # only needed if this dataset is private
python - <<'PY_INNER'
import os
from huggingface_hub import snapshot_download

snapshot_download(
    repo_id="Xnhyacinth/codegen",
    repo_type="dataset",
    local_dir="examples/codegen_slime_grpo",
    token=os.environ.get("HF_TOKEN"),
    allow_patterns=["data/**", "assets/**", "metadata/**", "raw/**"],
)
PY_INNER
```

After download, the ProRL codegen example expects these local paths:

- `examples/codegen_slime_grpo/data/train.jsonl`
- `examples/codegen_slime_grpo/data/eval.jsonl`
- `examples/codegen_slime_grpo/assets/`
- `examples/codegen_slime_grpo/metadata/`
- `examples/codegen_slime_grpo/raw/ojbench_testdata/` for the current OJBench subset

Minimal ProRL smoke command:

```bash
RUN_ID=codegen-smoke PROMPT_DATA=examples/codegen_slime_grpo/data/train_smoke.jsonl REF_LOAD=/path/to/Qwen3.5-4B_torch_dist WANDB_MODE=offline CUDA_VISIBLE_DEVICES=0,1,2,3 bash examples/codegen_slime_grpo/run.sh
```

For full training, use `PROMPT_DATA=data/train.jsonl` and `EVAL_PROMPT_DATA=data/eval.jsonl` through the ProRL codegen launcher. Keep W&B logs, checkpoints, Ray temp files, and downloaded dataset files outside Git.

## Provenance and Licensing

This dataset is a processed mix of multiple upstream public datasets and benchmarks. Users are responsible for complying with each upstream dataset's license and usage terms. This repository does not claim a single unified license over upstream content.

The included data is intended for code-generation RL training/evaluation research and contamination-controlled held-out measurement.