mradermacher/CaPtain-4B-GGUF
Reinforcement Learning • 5B • Updated • 572 • 1
Error code: StreamingRowsError
Exception: TypeError
Message: Couldn't cast array of type
struct<object: string, offset_m: list<item: double>, operation: string, placement_rule: string, preserve_initial_z: bool, relative_to: string, support_entity: string>
to
{'distractor_count': Value('int64'), 'operation': Value('string'), 'placements': List({'object': Value('string'), 'offset_m': List(Value('float64')), 'preserve_initial_z': Value('bool'), 'relative_to': Value('string'), 'support_entity': Value('string')})}
Traceback: Traceback (most recent call last):
File "/src/services/worker/src/worker/utils.py", line 149, 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 129, 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 544, 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 3052, in __iter__
for key, example in ex_iterable:
^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2559, in __iter__
for key, pa_table in self._iter_arrow():
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2584, in _iter_arrow
for key, pa_table in self.ex_iterable._iter_arrow():
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 558, in _iter_arrow
for key, pa_table in iterator:
^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 440, in _iter_arrow
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 361, in _generate_tables
self._cast_table(pa_table, json_field_paths=json_field_paths),
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
pa_table = table_cast(pa_table, self.info.features.arrow_schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2381, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2315, in cast_table_to_schema
cast_array_to_feature(
~~~~~~~~~~~~~~~~~~~~~^
table[name] if name in table_column_names else pa.array([None] * len(table), type=schema.field(name).type),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
feature,
^^^^^^^^
)
^
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 1861, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2071, in cast_array_to_feature
_c(children[name] if name in array_fields else null_array, subfeature)
~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 1863, in wrapper
return func(array, *args, **kwargs)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2161, in cast_array_to_feature
raise TypeError(f"Couldn't cast array of type\n{_short_str(array.type)}\nto\n{_short_str(feature)}")
TypeError: Couldn't cast array of type
struct<object: string, offset_m: list<item: double>, operation: string, placement_rule: string, preserve_initial_z: bool, relative_to: string, support_entity: string>
to
{'distractor_count': Value('int64'), 'operation': Value('string'), 'placements': List({'object': Value('string'), 'offset_m': List(Value('float64')), 'preserve_initial_z': Value('bool'), 'relative_to': Value('string'), 'support_entity': Value('string')})}Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
This repository holds the small artifacts of CaPtain: A Pipeline for Post-Training Code-as-Policy Robot Agents. Besides the code and the two models, they are what you need to reproduce the RL run and the paper's evaluations:
In total there are 1,002 files (about 24 MB). The SFT data are a separate dataset,
YijiaFan/CaPtain-SFT-Data.
| Pipeline code (SFT, RL) | https://github.com/waltstephen/CaPtain |
| Harness | https://github.com/waltstephen/CaPtain-Harness |
| Models | YijiaFan/CaPtain-4B, YijiaFan/CaPtain-4B-SFT |
| Path | Files | What it is |
|---|---|---|
critic/warm_start/ |
5 | Warm start of the simulator critic. See Simulator critic below. |
starts/libero_fresh_init_rl/{libero_spatial,libero_object,libero_goal,libero_10}/ |
80 | RL start states of CaPtain-4B, for 40 LIBERO tasks. Each task has a <task>.fresh_init state file and a <task>.fresh_init.json sidecar. See Start states. |
configs/rl/ |
7 | The RL configuration. See RL configuration. These are the same files as rl/configs/ in the CaPtain repository. |
configs/sft/captain-4b-sft.yaml |
1 | The full SFT configuration of CaPtain-4B-SFT. |
eval/tasks/ |
4 | The task lists of the paper's evaluations. See Evaluation task lists. They are the same files as eval/tasks/ in CaPtain-Harness. |
eval/libero_pro_postask/ |
801 | Frozen, validated LIBERO-PRO Pos+Task initial states. See LIBERO-PRO Pos+Task states. |
eval/libero_max_cases/ |
80 | The 80 LIBERO-MAX case files used in the paper (<suite>-t<id>-<perturbation>-d<level>-p195.json), copied from the frozen LIBERO-MAX release. |
examples/captain-4b_libero_official/ |
23 | Three scrubbed CaPtain-4B evaluation episodes on LIBERO official held-out states. See Example episodes. |
critic/warm_start/)
critic_default.pt: the checkpoint the RL configuration loads (critic_dir);critic_split.pt: the train/val/test-split variant used for the reported metrics;feature_spec.json: the feature order, standardisation and advantage rule;metrics_sameT.json: the test metrics;SHA256SUMS.starts/libero_fresh_init_rl/)
visual in the sidecars);data/libero_fresh_init of the harness. rl/scripts/prepare_starts.sh then rebuilds the start bank with
the reference sha256 df69fab6… (7,360 states); see rl/README.md.configs/rl/)
captain-4b.json is the 16-GPU configuration of CaPtain-4B; captain-4b.8gpu.json is an 8-GPU layout.staged-reward-spec.json: the staged-reward spec.act-ref.json: the action references.start-exclude-thin-basket.json: the start exclusions.start-pool.reference.json: the reference start-pool manifest.official-heldout-states.json: the official held-out state indices. RL never uses these states.eval/tasks/)
| File | Episodes |
|---|---|
libero_official_240.tsv |
4 suites × 10 tasks × held-out states 11–16 = 240 |
libero_pro_postask_800.tsv |
LIBERO-PRO Pos+Task, 8 cells × 100 |
libero_plus700_pro160.tsv |
LIBERO-Plus 700, plus LIBERO-PRO 4-category 160 |
libero_max_160.tsv |
LIBERO-MAX, 80 cases × 2 arms (Dynamic, Base) |
eval/libero_pro_postask/)
.npy files, <suite>_<swap|task>/<task_id>_s<seed>.npy: 8 cells × 100 states.manifest.json gives the sha256 of every state and the validity rule (penetration, drift, tilt and drop thresholds). Five
invalid starts were replaced by states 17–19.--artifacts <this repo>/eval in the harness's eval/run_jobs.py.examples/captain-4b_libero_official/)
| Episode | Outcome |
|---|---|
libero_spatial_0_seed-14 |
success |
libero_10_7_seed-12 |
long-horizon success |
libero_10_8_seed-12 |
failure at the request cap |
Each episode directory holds:
driver/transcript.jsonl: the model's requests and replies;calls.jsonl: every robot call with its receipt;capability_manifest.json;finish_attempts.jsonl, and completion_gate.jsonl when the gate was used;episode_result.json;workspace/TASK.md and workspace/NOTES.md.Camera images were not retained, and local paths are replaced by placeholders.
hf download YijiaFan/CaPtain-artifacts --repo-type dataset --local-dir captain-artifacts
# RL start states for the harness:
cp -r captain-artifacts/starts/libero_fresh_init_rl <CaPtain-Harness>/data/libero_fresh_init
# LIBERO-PRO Pos+Task evaluation with the frozen states:
python3 eval/run_jobs.py eval/tasks/libero_pro_postask_800.tsv --artifacts captain-artifacts/eval --out runs/pro --parallel 8
The CaPtain repository's rl/README.md and the harness README.md describe each step.
eval/libero_max_cases/.@article{fan2026captain,
title = {CaPtain: A Pipeline for Post-Training Code-as-Policy Robot Agents},
author = {Fan, Yijia and He, Xilin and Jiang, Yilei and Wu, Dongming and Wang, Jiaxu and Yue, Xiangyu},
journal = {arXiv preprint},
year = {2026}
}