i4h-workflow-validate
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseValidate a Workflow
验证工作流
Purpose
目的
Run the selected workflow run mode through the unified launcher, inspect the completed recording, and report simulator success.
通过统一启动器运行选定的工作流运行模式,检查已完成的记录,并报告模拟器运行成功情况。
Instructions
操作步骤
- Resolve the base checkout and a live workflow run mode.
- Run the unified launcher in the foreground.
- Require the final episode success summary.
- Inspect visible behavior and every rollout artifact.
- 解析基础检出版本和实时工作流运行模式。
- 在前台运行统一启动器。
- 获取最终的任务成功摘要。
- 检查可见行为和所有部署产物。
Resolve live support
解析实时支持
bash
export I4H_WORKFLOWS_REPO_URL="${I4H_WORKFLOWS_REPO_URL:-https://github.com/isaac-for-healthcare/i4h-workflows}"
I4H_REPO_DIR_NAME="${I4H_WORKFLOWS_REPO_URL%/}"
I4H_REPO_DIR_NAME="${I4H_REPO_DIR_NAME##*/}"
I4H_REPO_DIR_NAME="${I4H_REPO_DIR_NAME##*:}"
I4H_REPO_DIR_NAME="${I4H_REPO_DIR_NAME%.git}"
[ -n "$I4H_REPO_DIR_NAME" ] || { echo "Cannot derive a checkout name from I4H_WORKFLOWS_REPO_URL" >&2; exit 2; }
ROOT="${I4H_WORKFLOWS:-$(git rev-parse --show-toplevel 2>/dev/null)}"
if [ ! -d "$ROOT/workflows/i4h_workflows" ]; then
ROOT="${I4H_WORKFLOWS:-$HOME/$I4H_REPO_DIR_NAME}"
[ -d "$ROOT/workflows/i4h_workflows" ] || git clone "$I4H_WORKFLOWS_REPO_URL" "$ROOT"
fi
export I4H_WORKFLOWS="$ROOT"
cd "$ROOT"
./run.sh listTreat the resolver above as part of the skill contract: a hosted copy may run outside the base repository, so never assume the current checkout contains . selects the clone source. When is unset, derive the fallback directory from that URL; set only to reuse or choose a specific destination. Never replace an existing checkout.
workflows/i4h_workflowsI4H_WORKFLOWS_REPO_URLI4H_WORKFLOWSI4H_WORKFLOWSTreat output as the complete authoritative workflow-by-mode table; it is dependency-light and faster than scanning workflow modules. Do not duplicate that mutable table in this skill. Map the user's natural name to a listed workflow id, then choose only a mode shown on that same line:
./run.sh list| User intent | Required live mode | Launcher argument |
|---|---|---|
| Ordinary learned-policy evaluation | | |
| Requested or only available local controller | | |
| Explicit named alternative such as N1.7 | matching listed mode such as | |
Inspect , the workflow module, Scene manifest, and selected Task manifest when model, prompt, checkpoint, goal, or step-cap behavior matters.
./run.sh show <workflow> --mode <mode>Use precise readiness language:
- Structurally valid: , per-mode lint, and
showpass.lint --all - Launchable: the selected simulator mode starts and every required backend/checkpoint preloads.
- Rollout-validated: the requested episodes complete and the recorded success evidence passes inspection.
Do not report “validated” without stating which level was actually reached.
bash
export I4H_WORKFLOWS_REPO_URL="${I4H_WORKFLOWS_REPO_URL:-https://github.com/isaac-for-healthcare/i4h-workflows}"
I4H_REPO_DIR_NAME="${I4H_WORKFLOWS_REPO_URL%/}"
I4H_REPO_DIR_NAME="${I4H_REPO_DIR_NAME##*/}"
I4H_REPO_DIR_NAME="${I4H_REPO_DIR_NAME##*:}"
I4H_REPO_DIR_NAME="${I4H_REPO_DIR_NAME%.git}"
[ -n "$I4H_REPO_DIR_NAME" ] || { echo "Cannot derive a checkout name from I4H_WORKFLOWS_REPO_URL" >&2; exit 2; }
ROOT="${I4H_WORKFLOWS:-$(git rev-parse --show-toplevel 2>/dev/null)}"
if [ ! -d "$ROOT/workflows/i4h_workflows" ]; then
ROOT="${I4H_WORKFLOWS:-$HOME/$I4H_REPO_DIR_NAME}"
[ -d "$ROOT/workflows/i4h_workflows" ] || git clone "$I4H_WORKFLOWS_REPO_URL" "$ROOT"
fi
export I4H_WORKFLOWS="$ROOT"
cd "$ROOT"
./run.sh list将上述解析器视为技能契约的一部分:托管副本可能在基础仓库外运行,因此切勿假设当前检出版本包含。用于选择克隆源。当未设置时,从该URL推导回退目录;仅当需要重用或选择特定目标目录时才设置。切勿替换现有检出版本。
workflows/i4h_workflowsI4H_WORKFLOWS_REPO_URLI4H_WORKFLOWSI4H_WORKFLOWS将的输出视为完整的权威工作流-模式对照表;该命令依赖少,比扫描工作流模块更快。请勿在此技能中复制此可变对照表。将用户的自然名称映射到列出的工作流ID,然后仅选择同一行显示的模式:
./run.sh list| 用户意图 | 所需实时模式 | 启动器参数 |
|---|---|---|
| 常规学习策略评估 | | |
| 指定或仅有的本地控制器 | | |
| 明确的命名替代方案(如N1.7) | 匹配列出的模式(如 | |
当模型、提示词、检查点、目标或步骤限制行为至关重要时,检查、工作流模块、场景清单和选定的任务清单。
./run.sh show <workflow> --mode <mode>使用精确的就绪状态术语:
- 结构有效:命令、按模式的lint检查和
show检查均通过。lint --all - 可启动:选定的模拟器模式启动,且所有必需的后端/检查点预加载完成。
- 部署验证通过:请求的任务完成,且记录的成功证据通过检查。
未说明实际达到的验证级别时,请勿报告“已验证”。
Foreground execution rule
前台执行规则
Keep as this agent's foreground tool call. Do not use a subagent, monitor task, shell backgrounding, , , or a detached process. Poll a yielded session until exit and inspect the final episode summary before responding. When the selected Task is remote, the policy backend subprocess internally owned by is expected; a simulator-compatible exported RSL-RL Task runs in-process.
run.shnohuptmuxrun.shRun visibly by default. If the user explicitly requests headless execution, or a documented environment constraint makes it necessary, say so before launch and include ; never switch to headless silently.
--headlessPolicy:
bash
./run.sh <workflow> --policy \
--episodes <N> --attempts 3 \
--record verify.hdf5Rule-based:
bash
./run.sh <workflow> --rule-based \
--episodes <N> --attempts 3 \
--record verify.hdf5The launcher creates a unique canonical run directory and anchors the relative inside it. Resolve from the line or machine-readable ; do not recreate the launcher's timestamp. Use only when a caller-selected location must be shared with another stage; the launcher creates it. Absolute recording paths remain supported.
verify.hdf5RUN_DIR==> run dir ...run.json--run-dir "$RUN_DIR"For another declared mode, use . For a supplied/new checkpoint, resolve its exact path, confirm it belongs to the selected policy Task, and pass ; an exported RSL-RL Task expects its TorchScript , while a remote Task expects the owning backend's loadable checkpoint format. For “300 timesteps,” pass .
--mode <name>--checkpoint /absolute/pathpolicy.pt--episode-steps 300Never raise the Scene manifest's cap. may only lower it. Remote inference waits do not consume simulation steps. Use a unique when another run of the same workflow is active.
--episode-steps--namespace将作为此Agent的前台工具调用。请勿使用子Agent、监控任务、Shell后台运行、、或分离进程。轮询生成的会话直至退出,并在回复前检查最终任务摘要。当选定的任务为远程任务时,内部管理的策略后端子进程是预期的;与模拟器兼容的导出RSL-RL任务在进程内运行。
run.shnohuptmuxrun.sh默认以可见模式运行。如果用户明确请求无头执行,或文档化的环境限制要求无头执行,则在启动前说明并添加参数;切勿静默切换到无头模式。
--headless策略模式:
bash
./run.sh <workflow> --policy \
--episodes <N> --attempts 3 \
--record verify.hdf5基于规则的模式:
bash
./run.sh <workflow> --rule-based \
--episodes <N> --attempts 3 \
--record verify.hdf5启动器会创建唯一的规范运行目录,并将相对路径的锚定在其中。从行或机器可读的中解析;请勿重新生成启动器的时间戳。仅当调用方选定的位置必须与其他阶段共享时,才使用;启动器会创建该目录。绝对记录路径仍受支持。
verify.hdf5==> run dir ...run.jsonRUN_DIR--run-dir "$RUN_DIR"对于其他声明的模式,使用参数。对于提供的/新的检查点,解析其确切路径,确认它属于选定的策略任务,并传递参数;导出的RSL-RL任务需要其TorchScript格式的,而远程任务需要所属后端的可加载检查点格式。对于“300时间步长”,传递参数。
--mode <name>--checkpoint /absolute/pathpolicy.pt--episode-steps 300切勿提高场景清单的限制。仅可降低该限制。远程推理等待不会消耗模拟步骤。当同一工作流的另一个运行实例处于活动状态时,使用唯一的参数。
--episode-steps--namespaceVerify
验证
Require exit status 0 and final . A failed attempt followed by a successful retry counts as a successful requested episode; report attempts and retries.
N/N episodes succeededbash
RUN_DIR="<absolute run_dir from run.json or launcher output>"
uv run --project tools/dataset i4h-dataset inspect "$RUN_DIR/verify.hdf5" --segmentsInspect episode metadata, action/state widths, camera frames, node segments, and success flags. For visible runs, observe Scene/camera behavior and final task outcome. On failure, use the first actionable backend, contract, graph, or simulator error; never switch modes or increase the cap silently. Run after crashes that leave processes.
./stop.sh allFor a success rule that excludes collision, inspect the owning contact-sensor configuration and require a forced-contact negative test at least once after authoring or changing that rule. A sensor that initializes but has never produced a non-zero filtered force does not establish collision rejection.
要求退出状态为0,且最终显示。失败尝试后跟随成功重试的情况,算作成功完成请求的任务;需报告尝试次数和重试次数。
N/N episodes succeededbash
RUN_DIR="<absolute run_dir from run.json or launcher output>"
uv run --project tools/dataset i4h-dataset inspect "$RUN_DIR/verify.hdf5" --segments检查任务元数据、动作/状态宽度、相机帧、节点段和成功标志。对于可见模式运行,观察场景/相机行为和最终任务结果。失败时,优先处理第一个可解决的后端、合约、图或模拟器错误;切勿静默切换模式或提高限制。在导致进程残留的崩溃后运行命令。
./stop.sh all对于排除碰撞的成功规则,检查所属接触传感器的配置,并要求在编写或更改该规则后至少执行一次强制接触阴性测试。初始化后从未产生非零过滤力的传感器,无法确立碰撞排除机制。
Troubleshooting
故障排除
Use the first actionable backend, graph, contract, or simulator error. Retry within the same mode and cap only after correcting it.
优先处理第一个可解决的后端、图、合约或模拟器错误。仅在修正错误后,才可在相同模式和限制内重试。
Prerequisites
先决条件
Require synced simulator assets and any backend/checkpoint declared by the selected run mode.
要求同步模拟器资产,以及选定运行模式声明的所有后端/检查点。
Limitations
限制
Only modes from are supported, and a runtime step override may lower but never raise the validated Scene cap.
run.sh list仅支持列出的模式,且运行时步骤覆盖仅可降低(不可提高)已验证的场景限制。
run.sh listExamples
示例
- → run policy mode for two successful episodes, record, inspect, and report attempts plus visible outcome.
Evaluate scissor pick and place for 2 episodes. - → use only the declared local-controller mode.
Run surgical_reach_psm in rule-based mode for 1 episode.
- → 运行策略模式完成2次成功任务,记录结果、检查并报告尝试次数、重试次数及可见结果。
Evaluate scissor pick and place for 2 episodes. - → 仅使用声明的本地控制器模式运行。
Run surgical_reach_psm in rule-based mode for 1 episode.
Completion gate
完成标准
Report workflow, mode, model/checkpoint source, requested successes, attempts/retries, completion steps, visible outcome, HDF5 path and inspection, final exit status, and first unresolved failure if any.
报告工作流、模式、模型/检查点来源、请求的成功次数、尝试/重试次数、完成步骤、可见结果、HDF5路径及检查情况、最终退出状态,以及任何未解决的首个失败问题。