The dataset viewer is not available for this split.
Error code: StreamingRowsError
Exception: ValueError
Message: Expected object or value
Traceback: Traceback (most recent call last):
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 290, in _generate_tables
pa_table = paj.read_json(
io.BytesIO(batch), read_options=paj.ReadOptions(block_size=block_size)
)
File "pyarrow/_json.pyx", line 342, in pyarrow._json.read_json
File "pyarrow/error.pxi", line 155, in pyarrow.lib.pyarrow_internal_check_status
return check_status(status)
File "pyarrow/error.pxi", line 92, in pyarrow.lib.check_status
raise convert_status(status)
pyarrow.lib.ArrowInvalid: JSON parse error: Column() changed from object to number in row 0
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/src/services/worker/src/worker/utils.py", line 147, in get_rows_or_raise
return get_rows(
dataset=dataset,
...<4 lines>...
column_names=column_names,
)
File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
return func(*args, **kwargs)
File "/src/services/worker/src/worker/utils.py", line 127, in get_rows
rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
File "/src/services/worker/src/worker/utils.py", line 483, in safe_iter
yield from ds.decode(False) if ds.features else ds
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2840, in __iter__
for key, example in ex_iterable:
^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 506, in __iter__
yield from self.ex_iterable
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 398, in __iter__
for key, pa_table in self.generate_tables_fn(**gen_kwags):
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 304, in _generate_tables
batch = json_encode_fields_in_json_lines(original_batch, json_field_paths)
File "/usr/local/lib/python3.14/site-packages/datasets/utils/json.py", line 111, in json_encode_fields_in_json_lines
examples = [ujson_loads(line) for line in original_batch.splitlines()]
~~~~~~~~~~~^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/utils/json.py", line 20, in ujson_loads
return pd.io.json.ujson_loads(*args, **kwargs)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
ValueError: Expected object or valueNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
One opencode rollout, as the trainer sees it
The artefact behind the talk Training a coding agent through a harness you did not write (Lisbon AI, September 2026).
An off-the-shelf coding agent, opencode, runs untouched in a remote sandbox. A proxy sits between it and vLLM, speaks the agent's own dialect, and records every model call the agent makes together with the exact token ids and logprobs. That recording is what gets trained on. This repo is one of those recordings, plus the code that produced it.
Nothing here is a transcript. A transcript would be text, and retokenising text gives you different ids than the ones the model actually sampled. That difference is the point.
Files
| File | What it is |
|---|---|
trace.json |
the raw proxy trace: every captured model call, in order, as recorded |
turns.json |
the real agent turns, derived exactly as training derives them (see below) |
task.json |
the instruction the agent was given, and its task id |
visible_tests.txt |
the example cases the agent could see, from the problem statement |
held_out_tests.json |
the tests that produce the reward, which the agent never sees |
summary.json |
reward, turn counts, tool counts, and how many turns training keeps |
capture_trace.py |
drives one session and writes all of the above |
capture_launcher.py |
serves vLLM, opens a tunnel, runs the capture, as one HF Job |
Reading turns.json
Each turn carries what the training path actually uses:
prompt_ids: the conversation sent to the model that turn, re-tokenized with its tools, so the prompt matches what the upstream renderedoutput_ids: the ids the model generated, taken from the capture and not re-encodedper_token_logps: the generator's logprobs for those idstrained: whether the training policy keeps this turn. Here it ishas_tool_call, so turns where the model took an action are kept and pure-text turns are notmask: derived, not recorded.0for the context,1for the tokens the model generated. The proxy never stores a mask, the distinction is structural: onlyoutput_idsget a gradient. It is materialised here because that distinction is the whole reason the artefact is interesting.
Turn count in turns.json is smaller than in trace.json on purpose. opencode fires extra model
calls for its own bookkeeping, a title generator and a context summariser, and those are not the
task. Training them with the rollout's reward would reinforce the wrong thing, so they are filtered
by anchoring on the system prompt of the first tool-enabled turn.
Reproducing it
TASK_INDEX=0 PUSH_TO_DATASET=sergiopaniego/opencode-rollout-trace \
hf jobs uv run --flavor a100-large --secrets HF_TOKEN --timeout 3600s \
"https://huggingface.co/datasets/sergiopaniego/opencode-rollout-trace/resolve/main/capture_launcher.py"
One GPU is enough: this captures, it does not train, so there is no weight sync. The vLLM flags
matter, --return-tokens-as-token-ids is what lets the proxy recover exact ids instead of
re-encoding decoded text.
build_dataset(n_prompts, seed) in the training example is deterministic, so TASK_INDEX selects a
reproducible task. Keep N_PROMPTS equal to what the training run used and the indices line up.
Where this comes from
- Training script, maintained upstream in TRL:
examples/async_grpo_opencode/opencode_hf_sandbox.py - Write-up: Training a coding agent using the OpenCode harness
- Task data: DeepCoder-Preview-Dataset
- Sandbox image:
ghcr.io/huggingface/openenv-opencode-sandbox:latest - The policy trained this way: Qwen3-8B-opencode-deepcoder-grpo
- Downloads last month
- 58