
i4h Workflow Finetune
OfficialFreeFine-tune policies on LeRobot datasets with ease.
Free · Opens the source repo
What i4h Workflow Finetune does
The i4h Workflow Finetune skill is designed for developers and researchers looking to fine-tune GR00T or openpi PI0 policies using existing LeRobot datasets. This skill is particularly useful when you need to adapt a pre-trained model to specific tasks by leveraging recorded demonstrations. By following a straightforward series of bash commands, users can set up their environment, specify the dataset path, and initiate the training process efficiently.
To begin, users must ensure they have a valid LeRobot dataset directory that includes a meta/info.json file. The skill checks for this prerequisite and provides guidance on how to find suitable datasets if the specified path is invalid. The training process is executed through a command-line interface (CLI), allowing for flexibility in configuring parameters such as the number of training steps, batch size, and learning rate. The skill supports GPU utilization, ensuring that training can be performed efficiently on compatible hardware.
The i4h Workflow Finetune skill is particularly beneficial for those working in robotics and AI, where fine-tuning models on specific datasets can lead to improved performance in real-world applications. The structured workflow not only simplifies the training process but also allows users to track their training progress through logs, which include essential metrics like training loss. This skill is ideal for developers who are familiar with bash commands and have experience in machine learning workflows.
However, it is important to note that this skill is not suitable for environments that are strictly inference-only, as it requires train-capable environments defined in the configuration files. Additionally, users must ensure they have access to GPUs, as the skill is dependent on GPU resources for training tasks. Overall, the i4h Workflow Finetune skill provides a robust solution for fine-tuning AI policies, making it a valuable addition to the toolkit of any developer or researcher in the field.
When to use it
Use this skill when you need to adapt pre-trained models to specific tasks using recorded demonstrations.
When not to use it
Avoid this skill if you are working with inference-only environments or if you lack access to GPU resources.
What you can build with it
Fine-tuning for Robotics Applications
Use this skill to adapt GR00T or openpi PI0 policies for specific robotic tasks, enhancing their performance.
Training on Custom Datasets
Leverage existing LeRobot datasets to fine-tune models, ensuring they meet the requirements of your unique applications.
Streamlining AI Policy Development
Integrate this skill into your workflow to simplify the process of training AI models, making it more efficient and manageable.
How to install i4h Workflow Finetune
View source1. Install with the skills CLI
npx skills add nvidia/skills/i4h-workflow-finetune --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by nvidiai4h Workflow — Finetune
Purpose
Fine-tune a GR00T or openpi PI0 policy on an existing LeRobot dataset. Use when asked to finetune, train, or post-train a policy on recorded demos.
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
- The dataset path must be an existing LeRobot directory with
meta/info.json. - Train support is determined by
policy.train_moduleinworkflows/agentic/config/environments/<env>.yaml. A null value means inference-only. assemble_trocaris inference-only.
Stack Map
| Env | Stack | CLI |
|---|---|---|
scissor_pick_and_place | gr00t_n15 | i4h-agentic-gr00t-n15-train |
locomanip_tray_pick_and_place | gr00t_n16 | i4h-agentic-gr00t-n16-train |
locomanip_push_cart | gr00t_n16 | i4h-agentic-gr00t-n16-train |
ultrasound_liver_scan | openpi_pi0 | i4h-agentic-openpi-pi0-train |
N1.6 locomanip envs share policy.locomanip.train.
Preflight
test -f "${DATASET_PATH}/meta/info.json"
nvidia-smi --query-gpu=name --format=csv,noheader | wc -l
workflows/agentic/policy/<stack>/run.sh --list-envs
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 dataset
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
STACK_DIR=gr00t_n15
TRAIN_CLI=i4h-agentic-gr00t-n15-train
RUNS_ROOT="${REPO_ROOT}/workflows/agentic/runs"
# Point DATASET_PATH at a converted LeRobot dataset dir (absolute; must contain meta/info.json),
# produced by [[i4h-workflow-dataset-convert]]. List candidates:
# find "${RUNS_ROOT}" "${HF_LEROBOT_HOME:-$HOME/.cache/huggingface/lerobot}" -name info.json -path '*/meta/*' -printf '%h\n' | sed 's#/meta$##' | sort -u
DATASET_PATH="${DATASET_PATH:-}"
if [ ! -f "${DATASET_PATH%/}/meta/info.json" ]; then
echo "finetune: set DATASET_PATH to a LeRobot dataset dir with meta/info.json (got '${DATASET_PATH:-<unset>}'). Candidates:" >&2
find "${RUNS_ROOT}" "${HF_LEROBOT_HOME:-$HOME/.cache/huggingface/lerobot}" -name info.json -path '*/meta/*' -printf '%h\n' 2>/dev/null | sed 's#/meta$##' | sort -u | head
exit 1
fi
RUN_DIR="${RUNS_ROOT}/finetune_${ENV_ID}_$(date +%Y%m%d_%H%M%S)"
OUT="${RUN_DIR}/checkpoint"
export TMPDIR=/tmp # short path: torch DataLoader FD-sharing socket must fit AF_UNIX's 108-byte limit
mkdir -p "${OUT}" "${RUN_DIR}/logs"
ln -sfn "${RUN_DIR}" "${RUNS_ROOT}/.latest"
Step 2 — train
uv --directory "${REPO_ROOT}/workflows/agentic/policy/${STACK_DIR}" run "${TRAIN_CLI}" \
--env "${ENV_ID}" \
--dataset-path "${DATASET_PATH}" \
--output-dir "${OUT}" \
--max-steps 1000 \
--save-steps 1000 \
--num-gpus 1 \
2>&1 | tee "${RUN_DIR}/logs/finetune.log"
Tyro flags use kebab case (--max-steps, not --max_steps).
Common Flags
--dataset-path PATH(required)--output-dir PATH--base-model-path PATH_OR_REPOoverrides YAMLpolicy.model_repo--max-steps N,--save-steps N--batch-size N,--learning-rate FLOAT--no-tune-visual— freeze the vision backbone (trains the action head + projector only): ~2× faster, ~half the memory, less overfitting. Good default for small datasets; unfreeze only with lots of data + a real visual domain gap.--num-gpus N— must not exceed visible GPUs--report-to tensorboard|wandb
Verify
- Checkpoint directory
${OUT}/checkpoint-<N>containsmodel-0000*-of-*.safetensors,experiment_cfg/,processor/. - Log contains
train_losslines and a final'train_runtime': ...summary.
Prerequisites
- Workflow set up via [[i4h-workflow-setup]] (the stack's
.venvmust exist). - An existing LeRobot dataset directory with
meta/info.json. - A train-capable env:
policy.train_modulenon-null inworkflows/agentic/config/environments/<env>.yaml(assemble_trocaris inference-only). - At least one visible GPU (
--num-gpusmust not exceed visible GPUs).
Limitations
- Inference-only envs (null
policy.train_module, e.g.assemble_trocar) cannot be fine-tuned. - Requires GPU(s);
--num-gpusmust not exceed the count fromnvidia-smi. - N1.6 locomanip envs share
policy.locomanip.train. - Each env maps to one stack/CLI (see Stack Map); the dataset must match that env.
Troubleshooting
- Error: train CLI / module import fails - Cause: workflow not set up, stack
.venvmissing. Fix: run [[i4h-workflow-setup]] first. - Error: dataset path rejected / missing
meta/info.json- Cause:--dataset-pathis not a valid LeRobot directory. Fix: point to a converted LeRobot dataset (see Preflighttest -f). - Error: env is inference-only / no train support - Cause:
policy.train_moduleis null for that env. Fix: choose a train-capable env from the Stack Map. - Error: unrecognized flag like
--max_steps- Cause: Tyro flags use kebab case. Fix: use--max-stepsform.
Final Response
Report env, stack, dataset path, output checkpoint path, train_loss summary, and blockers.
Frequently asked questions about i4h Workflow Finetune
Similar skills
Spring Boot Testing
Master testing techniques for Spring Boot 4 applications.
GitHub Issues
Manage GitHub issues efficiently with MCP tools.
Geofeed Tuner
Optimize your IP geolocation feeds in CSV format.
Batch Files
Master Windows batch scripting for automation and task management.
Adobe Illustrator Scripting
Automate your Illustrator workflows with ExtendScript.
Plugin Structure
Create and organize Claude Code plugins effectively.
