rerun-lerobot
できること
このスキルは、Hugging FaceのLeRobotデータセットをRerunツールに取り込む方法を説明します。ロボット学習のデータを扱い、見たり変換したりしたい人向けです。
使う場面
- ✓LeRobotのデータセットのフォルダーをRerunで開き、動画と関節のデータを見たいとき。
- ✓LeRobotのデータセットを、エピソードごとに別のRerunのファイルに分けたいとき。
- ✓最初の数エピソードなど、LeRobotのデータセットの一部だけをダウンロードしたいとき。
スキルのリンク
https://github.com/rerun-io/rerun/blob/main/skills/rerun-lerobot/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“このHugging FaceのLeRobotデータセットをRerunに読み込んで、エピソードを見られるようにしてもらえますか。”
毎週5つの新しいスキル。1分で読めます。
仕組み
このスキルは、どの方法が合うかをエージェントに示します。見るには組み込みの取り込み機能、変換するにはエピソードごとの読み取り機能を使います。また、部分ダウンロードが可能かを、データセットのバージョンで確認します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Rerun LeRobot ingestion
There are two ways in, and which one you want depends on whether you are viewing or converting.
- Just viewing? Rerun has a built-in LeRobot importer: point
log_file_from_path(or the viewer, orrerun <dir>on the CLI) at the dataset directory and it ingests episodes, camera videos, and state/action tables with no conversion code. - Converting?
rr.experimental.LeRobotReaderreads the dataset one episode at a time as a lazy chunk stream, which is what you want for per-episode RRDs and for lenses.
The download step needs huggingface_hub.
Step 0: pick a dataset and check the HF token
Both scripts below live in scripts/ next to this file, and run standalone through uv — they declare huggingface_hub inline, so there is no environment to set up.
Two facts decide what a dataset costs to fetch, and the Hub search results show neither. Get both, for every candidate, in one call:
uv run scripts/find_lerobot_dataset.py <query> --robot-type <robot> --want 5
codebase_version decides whether a partial download is possible at all.
- v2.1 and earlier store one parquet and one mp4 per episode (
video_pathends inepisode_{episode_index:06d}.mp4), so "just the first N episodes" downloads only those episodes. - v3.0 concatenates every episode into a few large files (
video_pathends infile-{file_index:03d}.mp4), so any subset costs the whole download. If the user asked for a few episodes, prefer a v2.1 dataset — for the download only.LeRobotReaderreads a single episode out of either version once the files are local.
How camera frames are stored decides the size, and it varies by two orders of magnitude.
The frames and MB/ep columns report it:
mp4: avideo-dtype feature, one file per episode beside the parquet.inline: animage-dtype feature, raw frames inside the episode parquet, which is far larger for the same footage.
Both scripts report the actual size for the dataset in hand, so use that number rather than guessing.
Tell the user the size before you start the download, and prefer mp4 unless they asked for something only the other set has.
HF_TOKEN is not required for public datasets, but without it the Hub rate-limits and throttles downloads.
If it is unset, say so and point the user at https://huggingface.co/settings/tokens to create a read token, then export HF_TOKEN=hf_… (or hf auth login).
Do not block on it — carry on unauthenticated and let the user decide.
[ -n "$HF_TOKEN" ] || echo "HF_TOKEN unset — downloads will be throttled"
Step 1: dataset -> one combined RRD
Only needed if you want every episode in one file — to hand someone a single RRD, or to reprocess data you cannot re-read from the dataset directory.
For per-episode segments, skip to Step 2 and let LeRobotReader read the dataset directly.
from huggingface_hub import snapshot_download
import rerun as rr
dataset_dir = snapshot_download(repo_id=repo_id, repo_type="dataset", local_dir=dest)
with rr.RecordingStream("rerun_example_lerobot") as rec:
rec.save(str(combined_rrd))
rec.log_file_from_path(str(dataset_dir)) # the built-in importer
The importer emits one recording per episode (recording ids like episode_1), plus a metadata-only root recording, all into the single RRD.
rr.RecordingStream + log_file_from_path here is the importer bootstrap — the one place RecordingStream is correct in an ingestion pipeline (it drives the built-in importer, not per-message logging). Do not generalize it to rr.log-per-message loops; for everything after import, reprocess with a reader + lenses (see rerun-chunk-processing: Chunk API vs logging API).
Downloading only the first few episodes
uv run scripts/fetch_lerobot_episodes.py <repo_id> --episodes 5 # prints the dataset directory
It reports the download size before starting, downloads meta/* plus the wanted episode_%06d files, trims meta/ to match, verifies that exactly the requested episodes landed, and prints what it got.
Its last line is the dataset directory; do not follow it with find or du.
Do the equivalent by hand and three things bite:
- The importer iterates the episode list in
meta/, so an untrimmedmeta/warns once per absent episode. snapshot_downloadwrites into an existing directory, so episodes left by an earlier run with a different N survive and inflate the result.- Bot
よくある質問
Hugging Faceのトークンが必要ですか?
ダウンロードの手順にはhuggingface_hubライブラリとHugging Faceのトークンが必要で、このスキルはまずトークンを確認します。
見ることと変換することの違いは何ですか?
見るにはデータセットのフォルダーに対して、Rerunの組み込みの取り込み機能を使います。変換では、エピソードを一つずつ読み、それぞれを別々に保存します。
最初の数エピソードだけをダウンロードできますか?
バージョン2.1以前では、多くの場合できます。それらは1エピソードにつき1ファイルを保存しているためです。バージョン3.0はエピソードをいくつかの大きなファイルにまとめるため、難しくなります。
詳細
作者による元の説明
Ingest a LeRobot (HuggingFace) dataset into Rerun. Read when converting a LeRobot dataset to RRDs, splitting it into per-episode segments, or registering it on a Rerun catalog. Covers the built-in directory importer (log_file_from_path), the per-episode LeRobotReader, and when to drop to ParquetReader for custom control.
repo: rerun-io/rerun
人気
- GitHubのスター
- 12k
- ランキング
- #11554
- ライセンス
- Apache-2.0
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
investigate-puffin
12kPuffinプロファイラーの記録(.puffinファイル)を調べ、遅いコード箇所を見つけ、変更前後のトレースを比較するようエージェントを支援します。
rerun-blueprint
12kブループリントを書いてRerunビューアーの見た目を変える方法を、レイアウト、ビュー、非表示の列を含めてエージェントに教えます。
rerun-catalog-queries
12k往復回数、データ量、遅いデータセットの読み取りに関するヒントを使い、PythonからRerunカタログへのクエリを速くするようエージェントを支援します。
rerun-chunk-processing
12kreaderとlensを使ってMCAP、Parquet、動画、RRDのファイルを録画に変換するRerunのデータパイプラインを作る方法をエージェントに教えます。
似ているスキル
gitcrawl
394k保存されたGitHubのイシューとプルリクエストのアーカイブを検索し、重複をまとめ、GitHub上の現在の状態を確認するようエージェントを支援します。
slacrawl
394kローカルのSlackアーカイブ内のメッセージを検索して件数を数え、アーカイブの新しさを確認し、必要に応じて更新するようエージェントを支援します。
goplaces
394kGoogle Placesを使って、場所を検索し、詳細や口コミを取得し、場所の名前を解決するようエージェントを支援します。スクリプト用にJSON出力もできます。