i4h-workflow-dataset-mimic

작성자: nvidia

HDF5 녹화를 행동/상태 노이즈로 궤적을 복제하여 확장합니다. 데이터셋을 모방, 확장 또는 증강하라는 요청이 있을 때 사용하며, 새로운 데모 녹화에는 사용하지 않습니다…

npx skills add https://github.com/nvidia/skills --skill i4h-workflow-dataset-mimic

i4h Workflow — Mimic Dataset

Purpose

Expand an HDF5 recording by replicating trajectories with small action and state noise. Use when the user asks to mimic, expand, or augment a dataset without recording new episodes. If the same prompt also asks to visualize the dataset, finish mimic first, then compose [[i4h-workflow-dataset-convert]] and [[i4h-lerobot-viz]] on the mimic output.

Base Code

These steps drive the i4h-workflows base code (the workflows/agentic/ tree). To reuse an existing checkout, set I4H_WORKFLOWS to its path (no clone happens). Otherwise this resolves the current repo, or clones to ~/i4h-workflows — pick that default without prompting. Run every command below from the resolved root:

# Resolve the i4h-workflows base code (provides workflows/agentic/).
ROOT="${I4H_WORKFLOWS:-$(git rev-parse --show-toplevel 2>/dev/null)}"
if [ ! -d "$ROOT/workflows/agentic" ]; then
  ROOT="${I4H_WORKFLOWS:-$HOME/i4h-workflows}"
  [ -d "$ROOT/workflows/agentic" ] || git clone https://github.com/isaac-for-healthcare/i4h-workflows "$ROOT"
fi
export I4H_WORKFLOWS="$ROOT"; cd "$ROOT"

Basics

  • Env config (source of truth): workflows/agentic/config/environments/<env>.yaml defines the <env> robot and task the mimicked trajectories replay against.
  • Mimic perturbs action/state, not visuals.
  • Default --include-source keeps the original demos in the output.
  • In a chained workflow after teleop/validate, use the HDF5 produced by that chain. Do not silently fall back to an older same-env recording if the latest/current recording is empty or failed; stop and report that source demos are missing.
  • Count HDF5 episodes with the workflow venv, not system Python (h5py may not be installed globally).

Run

Run the steps below in order. Each step is a separate bash call; variables persist in the local agent's tmux session.

Step 1 — setup and resolve input HDF5

REPO_ROOT="${I4H_WORKFLOWS:-$(git rev-parse --show-toplevel 2>/dev/null)}"; [ -d "$REPO_ROOT/workflows/agentic" ] || REPO_ROOT="$HOME/i4h-workflows"
ENV_ID=scissor_pick_and_place
RUNS_ROOT="${REPO_ROOT}/workflows/agentic/runs"

# Point IN at a real recording to expand (absolute path). Recordings come from teleop or
# validate (which writes data/verify.hdf5 under each runs/eval_* dir). List candidates newest-first:
#   find "${RUNS_ROOT}" -name '*.hdf5' -printf '%TY-%Tm-%Td %TH:%TM  %p\n' | sort -r | head
IN="${IN:-}"
if [ ! -f "${IN}" ]; then
  echo "mimic: set IN to an existing .hdf5 (got '${IN:-<unset>}'). Candidates:" >&2
  find "${RUNS_ROOT}" -name '*.hdf5' -printf '%TY-%Tm-%Td %TH:%TM  %p\n' 2>/dev/null | sort -r | head
  exit 1
fi

# Verify the selected input is a real recording before mimic. A tiny HDF5 or
# `0/N episodes succeeded` teleop artifact is not usable source data.
"${REPO_ROOT}/workflows/agentic/mimic/.venv/bin/python" - "${IN}" <<'PY'
import h5py
import sys
path = sys.argv[1]
with h5py.File(path, "r") as f:
    count = len(f["data"]) if "data" in f else 0
print(f"source episodes: {count}")
if count <= 0:
    raise SystemExit("mimic: input HDF5 has no episodes; record successful demos first")
PY

RUN_DIR="${RUNS_ROOT}/mimic_${ENV_ID}_$(date +%Y%m%d_%H%M%S)"
mkdir -p "${RUN_DIR}/data" "${RUN_DIR}/logs"
ln -sfn "${RUN_DIR}" "${RUNS_ROOT}/.latest"
OUT="${RUN_DIR}/data/demo_mimic.hdf5"

When resolving "my dataset" from prior prompts, inspect candidates newest-first and prefer the current chain's latest successful teleop/validate HDF5. If the newest HDF5 for the target env has 0 episodes, do not skip back to an older run unless the user explicitly asks to reuse that older dataset.

Step 2 — mimic expand

"${REPO_ROOT}/workflows/agentic/mimic/run.sh" --env "${ENV_ID}" \
  --input "${IN}" \
  --output "${OUT}" \
  --episodes 3 \
  --noise-std 0.01 \
  --include-source \
  --overwrite \
  2>&1 | tee "${RUN_DIR}/logs/mimic.log"

Verify

uv --directory "${REPO_ROOT}/workflows/agentic/mimic" run python -c \
  "import h5py; print('episodes:', len(h5py.File('${OUT}','r')['data']))"

Confirm the output episode count equals the source demos plus --episodes. Also confirm the input episode count was greater than zero; mimic output from an empty source is invalid.

If the prompt includes visualization (for example, "Mimic 3 more episodes and visualize my dataset"), continue after this verify step:

  1. Load [[i4h-workflow-dataset-convert]] and set HDF5_PATH="${OUT}" so the augmented HDF5 is converted to LeRobot with --video-codec h264.
  2. Load [[i4h-lerobot-viz]] and set DATASET_DIR to the converted dataset directory (${HF_LEROBOT_HOME}/local/${ENV_ID} by default).
  3. Report both the augmented HDF5 and the visualizer URL.

Prerequisites

  • Workflow set up via [[i4h-workflow-setup]] (the .venv must exist).
  • An existing input HDF5 recording (--input).
  • The env id that produced the recording.

Limitations

  • Perturbs action/state only, not visuals.
  • Augments an existing recording rather than recording new episodes.
  • Output state/action dimensions must match the source.

Troubleshooting

  • Error: .venv not found / mimic fails to launch - Cause: workflow not set up. Fix: run [[i4h-workflow-setup]] first.
  • Error: input recording not found - Cause: wrong or missing --input HDF5 path. Fix: point to the existing recording file.
  • Error: input HDF5 has no episodes - Cause: teleop was launched but no successful episodes were saved. Fix: record successful source demos first; do not substitute an older run without explicit user direction.
  • Error: output already exists / write refused - Cause: --output path is occupied. Fix: choose a new path or pass --overwrite.
  • Error: state/action dimension mismatch on inspect - Cause: --env differs from the env that produced the input. Fix: use the same env id as the source recording.

Final Response

Report input path, output path, generated episode count, noise std, whether source demos were included, and the visualizer URL if visualization was requested.

nvidia의 다른 스킬

compileiq-debug
nvidia
무언가 잘못되었을 때 사용: Search()가 멈추거나, 모든 평가가 INVALID_SCORE를 반환하거나, 점수가 개선되지 않거나, 모든 설정이 동일한 숫자를 반환하거나, ptxas 오류 등이 발생할 때
create-github-pr
nvidia
gh CLI를 사용하여 GitHub 풀 리퀘스트를 생성합니다. 사용자가 새 PR을 만들거나, 코드 리뷰를 제출하거나, 풀 리퀘스트를 열고자 할 때 사용합니다. 트리거 키워드 -…
nemoclaw-maintainer-cross-issue-sweep
nvidia
다른 열린 이슈들을 스캔하여 주어진 PR이 함께 수정하거나 실수로 망가뜨릴 수 있는 이슈를 찾습니다. 인접 수정 기회와 모순 위험을 file:line…과 함께 출력합니다.
fhir-basics
nvidia
에이전트에게 FHIR R4 API의 작동 방식, 사용 가능한 리소스, 검색 매개변수를 사용한 쿼리 방법, 모든 응답 형식을 올바르게 파싱하는 방법을 가르칩니다…
compileiq-validate-result
nvidia
검색이 완료된 후, 속도 향상을 청구하거나 ACF를 발송하기 전에 사용합니다. dump_results CSV를 로드하고, 상위 K개 후보(단일 목표)를 추출합니다…
changelog-audit
nvidia
릴리스 전에 Warp CHANGELOG.md를 감사합니다: 누락된 항목 복구, 사용자 영향별 정렬, 항목 언어 다듬기, 줄 바꿈, (릴리스 브랜치 모드) 비교 업데이트…
maintain-dynamic-plugins
nvidia
NeMo Relay 동적 플러그인 로더, 매니페스트, Rust 네이티브 SDK, gRPC 워커 프로토콜, Python 워커 SDK, 문서, 테스트 및 릴리스 워크플로 커버리지를 유지 관리합니다.
dgx-diagnose
nvidia
일반적인 DGX Station GB300 문제 진단 — CUDA 충돌, 잘못된 GPU 타겟팅, vLLM/SGLang 컨테이너 버그, MIG 상태 문제, NVLink/Fabric Manager 오류,…