"""Training copy of a phase 2 dataset with only the cameras the policy uses. SmolVLA is trained on the overhead and wrist views; the dataset keeps the rover view for later. LeRobot's remove_feature writes a new dataset without the dropped cameras, so training never decodes their videos. The original is untouched. Run: .venv/bin/python sim/make_train_view.py data/so101_chess_sim data/so101_chess_sim_train """ from __future__ import annotations import argparse def main(): from lerobot.datasets.dataset_tools import remove_feature from lerobot.datasets.lerobot_dataset import LeRobotDataset ap = argparse.ArgumentParser(description=__doc__) ap.add_argument("src") ap.add_argument("dst") ap.add_argument("--drop", nargs="+", default=["observation.images.rover"]) args = ap.parse_args() ds = LeRobotDataset("local/so101_chess_sim", root=args.src) out = remove_feature(ds, feature_names=args.drop, output_dir=args.dst, repo_id="local/so101_chess_sim_train") print(f"{args.dst}: {out.num_episodes} episodes, {out.num_frames} frames, features {list(out.meta.features)}") if __name__ == "__main__": main()