Knonik Export
Export is the reverse of ingest: it reads data already in Knonik format — packed KHLP shards or pre-pack episode directories (both auto-detected) — and writes it back out in a format other tools can read. Use it to hand a dataset to software that does not speak Knonik, or to round-trip between formats.
Export ships in the same wheel as ingest and the dataloader (see
Ingest → Install), and it is gated by the same
ingest entitlement — if you can ingest, you can export, with no separate login:
knonik login --product ingest
Supported Targets
| Format | --format | Notes |
|---|---|---|
| Zarr | zarr | |
| NumPy | npy | |
| HDF5 | hdf5 | |
| LeRobot v2 / v3 | lerobot_v2 / lerobot_v3 | |
| ROS bag / MCAP | rosbag / mcap | ROS1 .bag / ROS2 .mcap. |
| RLDS / TFRecord | rlds / tfrecord | Needs TensorFlow installed. |
| D3IL | d3il |
From The Terminal
knonik export \
--input /home/me/data/out/knonik_thread_velcro \
--output /home/me/data/exported/thread_velcro_hdf5 \
--format hdf5
- ▸
--inputis a Knonik-format path: a packed KHLP file/dir (containinghlp_manifest.json) or an episode directory produced by ingest. The input type is auto-detected; force it with--source khlpor--source episode_dir. - ▸
--outputis the destination directory. - ▸
--formatis the target from the table above. It overridesformatin a--configfile, if you pass one.
From Python
Use the public wrapper knonik.export.run, the mirror of knonik.ingest.run. It
returns the list of written output paths.
from knonik.export import run
paths = run(
input="/home/me/data/out/knonik_thread_velcro",
output="/home/me/data/exported/thread_velcro_hdf5",
format="hdf5",
)
print(paths)
You can also drive it from a config dict, with any per-exporter settings under
options:
from knonik.export import run
run(config={
"format": "lerobot_v3",
"input": "/home/me/data/out/knonik_thread_velcro",
"output": "/home/me/data/exported/thread_velcro_lerobot",
"options": {}, # per-exporter settings, when a target supports them
})