generic-conversion
Explains the reusable BaseAdapter and ConversionTask contract and the safe local or Ray generic LeRobot conversion pipeline when a user is designing, validating, or troubleshooting a dataset adapter.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- generic-conversion
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Explains the reusable BaseAdapter and ConversionTask contract and the safe local or Ray generic LeRobot conversion pipeline when a user is designing, validating, or troubleshooting a dataset adapter.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/api-reference.md8.5 KB
- 参考文档references/pipeline-behavior.md9.5 KB
- 参考文档references/troubleshooting.md9.4 KB
- 脚本scripts/check_generic_contract.py6.3 KB
03 SKILL.md 正文
Generic conversion
Use this route when a source-specific adapter already knows how to discover raw inputs and yield LeRobot-compatible episodes, but needs the shared task orchestration, temporary datasets, aggregation, cleanup, resume, or Hub boundary. It is an operating contract, not a source-dataset converter.
Route boundary
- Use
BaseAdapterandConversionTaskfor a new or existing adapter whose inputs can be represented as independent conversion tasks. - Route source layouts, encodings, and filtering to the owning sibling route:
openx-conversion,agibot-conversion,robomind-conversion,libero-conversion, orrobocasa-conversion. - Route LeRobot-to-RLDS work to
rlds-exportand LeRobot format changes toversion-migration. Do not use this route to infer historical metadata layouts or to regenerate simulator data. - The runtime skill does not import a source checkout, run a conversion, download data, start Ray, render a simulator, or push to the Hub while planning or validating an adapter.
Operating procedure
- Confirm the environment. Check that the selected LeRobot API exposes the
dataset creation, aggregation, and video helpers expected by the adapter.
Import
datatroveeven for local execution because the shared pipeline imports it. Treat Ray, video codecs, and Hub credentials as optional gates, not assumptions. See troubleshooting. - Define the adapter contract. Set
dataset_type, positivefps,robot_type, and a completefeaturesmapping; add stabletagsonly when useful. Implementload_tasks()andload_subset(task). Keep raw-source details intask.metadata, not in generic pipeline logic. - Make frames unambiguous. Each yielded episode should be a materialized
sequence of frame dictionaries accepted by the target LeRobot writer. Put a
taskfield in every frame when language/task conditioning is intended. Validate array shapes, dtypes, image/video keys, and episode lengths before scheduling expensive work. - Plan paths. Give every task a unique temporary
output_path, normally below the adapter's sibling<final-name>_temppath. Keep the final output separate from all raw inputs and unrelated existing datasets. The pipeline deletes existing task outputs and deletes an existing final output before aggregation; inspect the plan before running. - Start locally. Call
run_converter(..., executor="local", ...)for a first smoke test.workers=-1derives workers from CPU count andcpus_per_task; an explicit small worker count is safer for video and memory-heavy adapters.tasks_per_jobaffects the Ray configuration, not local scheduling. - Use Ray deliberately. Select
executor="ray"only after the Ray/DataTrove extras, worker visibility, shared paths, and memory budget are proven. The route initializes Ray and passes a small runtime environment; it does not prove a cluster is reachable or make source files available on every node. - Use debug before scale.
debug=Trueoverrides the request to local execution, uses one worker, truncates the task list to its first two tasks, and disables Hub pushing. It still validates the original task list and CPU count first. Treat this as a bounded smoke test, not a representative run. - Review the aggregate. Confirm that temporary roots existed, the final
dataset metadata and indices agree, normalized arrays remain readable, and
video references/timestamps are valid. Keep temporary outputs with
cleanup_temp=Falseonly for deliberate inspection; remove them after the review. - Push only after local review.
push_to_hub=Truerequires a distincthub_repo_id. It uploads videos, uses public visibility, and applies the deduplicated LeRobot/dataset/robot/adapter tags. Authenticate and confirm destination ownership separately; do not use a Hub id as permission to overwrite an unrelated local path.
Contract and pipeline details
Use the exact field and hook behavior in the API reference, the execution and aggregation model in pipeline behavior, and the failure matrix in troubleshooting. The optional safe contract checker checks a JSON adapter manifest without importing an adapter or writing a dataset.
Minimal preflight
Before a real run, record: the source-specific route and evidence, target LeRobot version, final output path, task count and unique temporary roots, feature schema, task metadata policy, executor, CPU/memory budget, resume-log identity, cleanup decision, and Hub destination. For a multi-task adapter using an existing resume directory, verify that the log belongs to the same task manifest and paths. Never let a resume convenience authorize deletion of an unrelated final output.
A zero-task manifest and cpus_per_task < 1 are hard preflight errors. The
checker and the pipeline intentionally expose these cases rather than
silently producing an empty dataset. No native conversion is implied by this
skill; only safe static or synthetic contract checks belong here.
Evidence and staleness
This route distills the repository's generic_converter README, adapter,
utility, and pipeline modules, plus the root, AgiBot, and LIBERO README
descriptions. Those artifacts establish behavior but are not runtime
dependencies. If the installed LeRobot package changes its import locations,
writer signatures, aggregation schema, or video format, revalidate this route
and the source-specific sibling route before use.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).