TL;DR
Strands Robots는 Robot() 하나를 통해 로봇 시연 기록, Hugging Face Storage Bucket 동기화, LeRobotDataset 스트리밍 학습, 물리 하드웨어 배포를 하나의 데이터 루프로 연결합니다. Storage Bucket은 Xet의 content-defined chunking으로 바뀐 청크만 업로드하므로 500 MB 파일에서 1%가 바뀐 경우 5.5 MB만 전송하고, stream_dataset()은 MP4와 Parquet 샤드에서 필요한 데이터를 읽어 전체 데이터셋의 로컬 복사를 건너뜁니다. 단일 NVIDIA L4에서 ACT 500 optimizer steps를 120프레임 에피소드에 실행한 구성은 133초가 걸렸으며, 생성된 checkpoint는 mode="real"로 전환한 Robot()에 다시 연결할 수 있습니다. 다만 Bucket은 버전이 없으므로 고유한 run_id와 별도 자격 증명을 사용하고, 보존할 산출물은 versioned dataset repository에 저장해야 합니다.
섹션별 상세
from strands import Agent
from strands_robots import Robot
sim = Robot("so100") # mode="sim" (default - safe, no hardware)
agent = Agent(tools=[sim])
# Record a demonstration and sync it to a bucket.
agent("Record a pick-the-cube demo and sync it to my-org/robot-fave.")
# Stream it back from the bucket to train, without downloading it first.
for batch in sim.stream_dataset("my-org/robot-fave/cube_pick", repo_type="bucket").dataloader(batch_size=64):
...시뮬레이션 Robot()이 자연어 명령으로 시연을 기록하고 Storage Bucket에 동기화한 뒤 같은 데이터셋을 스트리밍 학습에 연결합니다.



reader = sim.stream_dataset("my-org/robot-fave/cube_pick", repo_type="bucket", shuffle=False, max_num_shards=1, buffer_size=1, # one episode, in capture order
)
print(reader.num_episodes, reader.num_frames, reader.fps)
for frame in reader:
frame["observation.images.front"] # (3, H, W) tensor, decoded on the fly from the MP4 shard
frame["observation.state"] # joint vector, from the Parquet shard
frame["action"]
breakStorage Bucket의 LeRobot 샤드에서 카메라 영상과 로봇 상태·행동을 한 프레임씩 원격으로 읽고 영상은 순회 중 디코딩합니다.
# policy here is a LeRobot policy you constructed, such as ACTPolicy.
for batch in reader.dataloader(batch_size=64, num_workers=4):
loss, _ = policy(batch) # lerobot ACTPolicy.forward returns (loss, loss_dict)
loss.backward()스트리밍 reader를 PyTorch DataLoader에 넘겨 4개 worker로 배치를 만들고 LeRobot 정책의 손실을 계산해 역전파합니다.
import os
os.environ["STRANDS_TRUST_REMOTE_CODE"] = "1" # create_policy loads with trust_remote_code=True
from strands_robots import create_policy
from strands_robots.training import TrainSpec, create_trainer
trainer = create_trainer("lerobot_local", device="cuda")
spec = TrainSpec(dataset_root="/tmp/cube_pick", output_dir="/tmp/cube_pick_ft", base_model="", steps=500, extra={"policy_type": "act"})
result = trainer.train(spec)
# train ACT on the streamed dataset
policy = create_policy(result.checkpoint_dir) # load the checkpoint straight backlerobot_local Trainer가 학습 설정을 실행하고 생성된 checkpoint를 같은 create_policy() 진입점으로 다시 불러옵니다.

robot = Robot("so100", mode="real", port="/dev/ttyACM0", cameras={"front": {"type": "opencv", "index_or_path": "/dev/video0", "fps": 30}})
agent = Agent(tools=[robot])
agent("Pick up the red cube.")mode="real"과 실제 장치 포트를 지정해 학습한 정책을 SO-100 계열 물리 로봇에 연결하고 다음 시연을 수집합니다.
용어 해설
- 콘텐츠 정의 청킹(Content-Defined Chunking)
- — 파일 내용을 기준으로 청크 경계를 정하는 저장 방식입니다. 데이터가 삽입되거나 일부 바뀌어도 전체 파일의 청크 경계가 연쇄적으로 밀리지 않아 변경된 바이트가 포함된 청크만 다시 업로드합니다. 이 글에서는 Xet 기반 Storage Buckets의 중복 제거와 증분 동기화를 가능하게 하는 핵심 메커니즘으로 쓰입니다.
- LeRobotDataset
- — 로봇 관측값, 상태, 행동과 에피소드 메타데이터를 Parquet 및 MP4 샤드로 저장하는 데이터 형식입니다. 시뮬레이션과 실제 로봇에서 만든 데이터가 같은 디스크 구조를 유지하므로 별도 변환 없이 학습과 재생에 사용할 수 있습니다. 이 글의 전체 데이터 루프가 의존하는 공통 형식입니다.
- StreamingLeRobotDataset
- — LeRobot 샤드에서 필요한 데이터만 원격 바이트 범위 읽기로 가져오는 스트리밍 데이터셋입니다. 카메라 프레임은 MP4에서 순회 중 디코딩하고 상태와 행동은 Parquet에서 읽어 전체 데이터셋을 로컬 디스크에 복사하지 않습니다. PyTorch iterable 및 DataLoader와 연결해 GPU 학습에 사용할 수 있습니다.
- Storage Bucket
- — Hugging Face Hub의 hf:// 네임스페이스에서 데이터 작업 계층으로 사용하는 변경 가능하고 버전이 없는 저장소입니다. 하루 동안 수집한 로봇 데이터를 기록 시점부터 다음 학습 시점까지 보관하며 hf CLI로 동기화합니다. 버전 관리가 필요한 공개 산출물은 별도의 versioned dataset repository에 저장해야 합니다.
- Robot mesh
- — 여러 로봇을 하나의 에이전트 흐름에 연결하는 Strands Robots의 구성 방식입니다. 시뮬레이션 로봇과 물리 로봇이 같은 Robot() 인터페이스와 데이터 형식을 사용하고, LAN·클라우드·디바이스 연결 계층을 통해 정책 제공자와 이어집니다. 여러 로봇의 수집 작업을 같은 버킷으로 병렬화할 때 활용됩니다.
기술
- Strands Robots
- Strands Agents
- LeRobot
- Hugging Face Storage Buckets
- Xet
- PyTorch
- MuJoCo
- torchcodec
- Hugging Face Hub
- Amazon S3
- ACTPolicy
- GR00T
- Cosmos 3
활용 사례
- 시뮬레이션에서 pick-and-place 로봇 시연 수집
- Storage Bucket에 로봇 에피소드 증분 동기화
- 원격 LeRobotDataset을 GPU로 스트리밍 학습
- 학습한 정책을 SO-101 물리 로봇에 배포
- 여러 로봇이 하나의 Bucket에 데이터를 병렬 수집
AI 요약 · 북마크 · 개인 피드 설정 — 무료
출처 · 인용 안내
인용 시 "요약 출처: AI Trends (aitrends.kr)"를 표기하고, 사실 확인은 원문 보기 기준으로 진행해 주세요. 자세한 기준은 운영 정책을 참고해 주세요.
