CoolFace
Datasetpublic

asaverren/openhands-train-ready

openhands-train-ready SFT-ready normalization of nebius/SWE-rebench-openhands-trajectories — 5,000 resolved OpenHands (v0.54.0) agent trajectories on real GitHub issues, bootstrapped by Qwen/Qwen3-Coder-480B-A35B-Instruct, with tool-call arguments deserialized to objects so chat templates just work. What was fixed The upstream parquet stores tool_call.function.arguments as a serialized JSON string "for storage efficiency" (per the Nebius README). Chat templates… See the full description on the dataset page: https://huggingface.co/datasets/asaverren/openhands-train-ready.

sourceHugging Facecc-by-4.0updated 12d agoView on Hugging Face
0likes64downloads
README.md123 linesDownload Raw Back to root
1---2license: cc-by-4.03task_categories:4  - text-generation5tags:6  - agent-trajectories7  - tool-calling8  - sft9  - openhands10  - swe-bench11  - qwen3-coder12size_categories:13  - 1K<n<10K14configs:15  - config_name: default16    data_files:17      - split: train18        path: data/train-00000-of-00001.parquet19---20 21# openhands-train-ready22 23**SFT-ready normalization** of24[nebius/SWE-rebench-openhands-trajectories](https://huggingface.co/datasets/nebius/SWE-rebench-openhands-trajectories)25— 5,000 resolved OpenHands (v0.54.0) agent trajectories on real GitHub issues,26bootstrapped by `Qwen/Qwen3-Coder-480B-A35B-Instruct`, with **tool-call27arguments deserialized to objects** so chat templates just work.28 29## What was fixed30 31The upstream parquet stores `tool_call.function.arguments` as a serialized32JSON *string* "for storage efficiency" (per the Nebius README). Chat templates33that iterate `arguments|items` — including the Qwen3-Coder family — emit34empty/broken tool calls if you train on the raw rows. Every record here has:35 36- `arguments` deserialized `str → dict` (double-encoded JSON and Python-repr37  dicts handled),38- canonical per-role fields (`system`/`user`/`assistant`/`tool`),39- the per-trajectory `tools` list kept on the record — pass it straight to40  `apply_chat_template`.41 42## Usage43 44```python45from datasets import load_dataset46from transformers import AutoTokenizer47 48ds = load_dataset("asaverren/openhands-train-ready", split="train")49tok = AutoTokenizer.from_pretrained("Qwen/Qwen3-Coder-30B-A3B-Instruct")50 51ex = ds[0]52text = tok.apply_chat_template(ex["messages"], tools=ex["tools"], tokenize=False)53```54 55TRL/axolotl: point your chat-template mapping at the `messages` column;56`tools` is a per-row column for templates that accept it.57 58## Qwen3-Coder tool-call format (verified)59 60- Assistant calls render as `<tool_call><function=NAME><parameter=KEY>VALUE61  </parameter></function></tool_call>` inside the `<|im_start|>assistant` turn.62- `arguments` must be a mapping — the template iterates `arguments|items`.63  (This is the upstream storage bug this dataset fixes.)64- Tool results render as `<tool_response>...</tool_response>` inside a `user`65  turn; `name`/`tool_call_id` are kept for provenance but unused by the template.66 67## Counts (see `meta.json`)68 69| | |70|---|---|71| upstream rows scanned | 67,074 |72| upstream resolved | 32,161 |73| this shard (resolved, seed-0 sample) | 5,000 |74| tool-call arguments deserialized | 295,524 |75| unparseable arguments | 0 |76| unknown tools / missing required params | 0 / 0 |77| trajectories dropped | 0 |78| avg tokens (Qwen3-Coder tokenizer) | ≈ 49k / trajectory |79 80Tool calls validated against upstream `tools.json` (soft; all calls match the815-tool OpenHands v0.54.0 set). All 5,000 records render through the real82Qwen3-Coder chat template with zero errors.83 84## Rebuild / extend85 86`run_normalize.py` (+ the `traj_normalize` package, both in this repo) reproduces this shard and can emit the full 32k resolved87set (or failure trajectories via `--include-failures`):88 89```bash90pip install pyarrow huggingface_hub91python run_normalize.py --input nebius/SWE-rebench-openhands-trajectories \92  --out-dir out --max-success 5000 --seed 0 --shuffle93```94 95`sft_success.jsonl.gz` is the raw tool output; `data/` is the same content as96parquet for `load_dataset` + viewer support.97 98## Honest limitations99 100- `resolved` is upstream's SWE-bench-style judgment — **no re-execution101  verification** was performed downstream.102- Trajectories are long (~49k tokens avg); filter/truncate to your context103  budget.104- Single bootstrap model (Qwen3-Coder-480B) and single scaffold105  (OpenHands v0.54.0) — behavior/diversity is bounded accordingly.106- Same-instance duplicates are possible (upstream samples multiple attempts107  per issue); dedupe on `instance_id` if that matters to you.108 109## Attribution & license110 111Upstream data: [Nebius](https://nebius.com/blog/posts/openhands-trajectories-with-qwen3-coder-480b),112**CC-BY-4.0**. This derivative shard redistributes normalized data under the113same license — please attribute Nebius.114 115```bibtex116@article{trofimova2025openhandstrajs,117  title={OpenHands Trajectories with Qwen3-Coder-480B-A35B-Instruct},118  author={Trofimova, Maria and Shevtsov, Anton and Ibragim, Badertdinov and Pyaev, Konstantin and Karasik, Simon and Golubev, Alexander},119  year={2025},120  journal={Nebius blog},121}122```123