penfever's picture
Initial upload — Harbor-format conversion of nvidia/Nemotron-RL-coding-competitive_coding via OpenThoughts-Agent's data/nemotron_gym adapter
e4a7202 verified
|
Raw
History Blame
3.01 kB
---
license: cc-by-4.0
task_categories:
- reinforcement-learning
language:
- en
tags:
- harbor
- nemotron-gym
- rl
- verifiable-rewards
size_categories:
- 10K<n<100K
---
# laion/nemotron-gym-competitive-coding
Harbor-format conversion of [nvidia/Nemotron-RL-coding-competitive_coding](https://huggingface.co/datasets/nvidia/Nemotron-RL-coding-competitive_coding).
Each row contains:
| column | type | description |
| --- | --- | --- |
| `path` | string | Deterministic short ID (`<family>-<sha256[:12]>.tar.gz`) |
| `task_binary` | binary | Gzipped tar containing the full Harbor task |
The tarball contents follow Harbor's task layout:
```
instruction.md # Prompt shown to the agent
environment/Dockerfile # python:3.11-slim-bookworm base + task-specific pip deps
tests/test.sh # Verifier entrypoint (writes /logs/verifier/reward.txt)
tests/verifier.py # Verifier implementation (embedded, deterministic)
tests/verifier_data.json # Per-task verifier inputs (JSON, no code interpolation)
metadata.json # Provenance: source_dataset, row_index, family, ...
task.toml # Standard Harbor task config (cpu/memory/timeout defaults)
```
## Conversion details
Generated by the `data/nemotron_gym` adapter in
[OpenThoughts-Agent](https://github.com/open-thoughts/OpenThoughts-Agent).
Conversion is **secure-by-construction**:
- Dataset content is never interpolated into shell, Python, or Dockerfile source.
All values flow through `tests/verifier_data.json` (JSON, parsed at runtime).
- Base image is name-pinned (`python:3.11-slim-bookworm`); pip specs validated
against a strict allowlist regex.
- Text fields stripped of C0/C1 control characters; lengths capped; tarball
paths validated against traversal / NUL / absolute-path attacks.
- Tarballs are deterministic (sorted entries, `mtime=0`, `uid/gid=0`) →
reproducible bytes.
## Verifier family
`stdio_diff (run /app/solution.py against hidden stdin/stdout test cases)` — see the source converter for full details.
## Usage with Harbor
```python
from datasets import load_dataset
ds = load_dataset("laion/nemotron-gym-competitive-coding", split="train")
print(ds[0]["path"], len(ds[0]["task_binary"]))
```
To run a single task with Harbor:
```bash
# Extract one task to a directory and point Harbor at it
python - <<'PY'
import gzip, io, tarfile
from datasets import load_dataset
ds = load_dataset("laion/nemotron-gym-competitive-coding", split="train")
row = ds[0]
with tarfile.open(fileobj=io.BytesIO(row["task_binary"]), mode="r:gz") as tar:
tar.extractall("/tmp/competitive-coding-task")
PY
harbor run -t /tmp/competitive-coding-task -e daytona # or -e docker
```
## Source
This dataset is a derivative of
[nvidia/Nemotron-RL-coding-competitive_coding](https://huggingface.co/datasets/nvidia/Nemotron-RL-coding-competitive_coding), part of NVIDIA's
[NeMo-Gym collection](https://huggingface.co/collections/nvidia/nemo-gym).