physical-ai-defect-image-generation
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePhysical AI Defect Image Generation Workflow Orchestrator
物理AI缺陷图像生成工作流编排器
Table of Contents
目录
- Supported Flows
- Disambiguation (full table in )
references/disambiguation.md - Step 0: Select Flow, Cookbook, and Gather Inputs
- Common Preconditions (long-form in )
references/preconditions.md - Flow walkthroughs (one entry per flow; details in )
references/flows/ - OSMO Monitoring
- Supporting files
End-to-end orchestration of defect image generation, augmentation, and labeling pipelines for AOI (Automated Optical Inspection) datasets. Every flow has a canonical OSMO workflow YAML in that chains all steps non-interactively. Use-case cookbooks in provide PCBA usd2roi/image-edit configs and AnomalyGen training configs for PCBA, metal surface, and glass inspection. This skill governs flow selection, data handoffs, and submit commands; component internals live in each component's .
assets/configs/assets/cookbooks/SKILL.md- 支持的工作流
- 歧义消除(完整表格见 )
references/disambiguation.md - 步骤0:选择工作流、手册并收集输入
- 通用前提条件(详细内容见 )
references/preconditions.md - 工作流演练(每个工作流对应一个条目;详情见 )
references/flows/ - OSMO 监控
- 支持文件
针对AOI(Automated Optical Inspection,自动光学检测)数据集的缺陷图像生成、增强和标注流水线的端到端编排。每个工作流在 中都有一个标准的OSMO工作流YAML文件,可无交互地串联所有步骤。 中的用例手册提供了PCBA的usd2roi/图像编辑配置,以及针对PCBA、金属表面和玻璃检测的AnomalyGen训练配置。本技能负责工作流选择、数据传递和提交命令;组件内部细节请查看各组件的 。
assets/configs/assets/cookbooks/SKILL.mdSupported Flows
支持的工作流
| Flow | Entry point | OSMO YAML | Steps | Use cases |
|---|---|---|---|---|
| Day 0 — Texture Defects | CAD scene USD ( | | usd2roi (scan_grid + per-cell ROI crops) → image-edit augmentation ( | PCBA |
| Day 0 — Good Image (usd2roi + Image-Edit) | CAD scene USD + per-board | | usd2roi-render (scan_grid + per-cell ROI crop) → Qwen Image-Edit (OVSL2SL appearance transfer) | PCBA clean-image set (ChangeNet golden halves, finetune positives, real-photo pairing) |
| Day 0 — Structural Defects | CAD scene USD + per-board | | isaac-render (pose defects: shift / tombstone / sideflip) + per-component crop (single pod) → Qwen Image-Edit (OVSL2SL lighting transfer; pose geometry preserved) | PCBA pose-defect set; ChangeNet defect halves |
| Day 1 — Infer + Label (real-photo alignment, DEFAULT) | CAD-derived USD + real PCBA photo (both ship in | | usd2roi day-1 render → MI register → per-ROI crop → yq-render config → finetune-or-passthrough → infer (anomalygen labels inline) | Default PCBA Day 1. Raw AOI screenshot of any usd2roi-supported board |
| Day 1 — Infer + Label (manual ROI) | Pre-captured clean images + ROI masks (NGC artifact or user upload) | | yq-render config → finetune-or-passthrough → infer (anomalygen labels inline) | Metal surface, glass (no USD/real-photo flow); PCBA only when user explicitly asks for pre-captured ROI experimentation |
| Finetune Only | Labeled anomaly URL artifact | | yq-render config → finetune (validate_dataset → prep_testcase → torchrun) | Any use case; produces checkpoint for Day 0 or Day 1. Requires raw training data under |
All flows run on OSMO. Day 0 flows require (Qwen Image-Edit OVSL2SL — existing URL or local deploy from ); Finetune Only has no external endpoints.
image_edit_endpointreferences/nim/| 工作流 | 入口点 | OSMO YAML | 步骤 | 用例 |
|---|---|---|---|---|
| Day 0 — 纹理缺陷 | CAD场景USD(手册中附带 | | usd2roi(扫描网格 + 每单元ROI裁剪)→ 图像编辑增强( | PCBA |
| Day 0 — 良品图像 (usd2roi + 图像编辑) | CAD场景USD + 每块板的 | | usd2roi渲染(扫描网格 + 每单元ROI裁剪)→ Qwen图像编辑(OVSL2SL外观迁移) | PCBA良品图像集(ChangeNet基准样本、微调正样本、真实照片配对) |
| Day 0 — 结构缺陷 | CAD场景USD + 每块板的 | | isaac渲染(姿态缺陷:偏移/立碑/侧翻) + 单组件裁剪(单个封装)→ Qwen图像编辑(OVSL2SL光照迁移;保留姿态几何) | PCBA姿态缺陷集;ChangeNet缺陷样本 |
| Day 1 — 推理 + 标注(真实照片对齐,默认) | CAD导出的USD + PCBA真实照片(均包含在 | | usd2roi Day 1渲染 → MI配准 → 每ROI裁剪 → yq渲染配置 → 微调或直通 → 推理(AnomalyGen内置标注) | 默认PCBA Day 1工作流。任何支持usd2roi的电路板的原始AOI截图 |
| Day 1 — 推理 + 标注(手动ROI) | 预捕获的清洁图像 + ROI掩码(NGC工件或用户上传) | | yq渲染配置 → 微调或直通 → 推理(AnomalyGen内置标注) | 金属表面、玻璃(无USD/真实照片工作流);仅当用户明确要求时用于PCBA预捕获ROI实验 |
| 仅微调 | 标注异常的URL工件 | | yq渲染配置 → 微调(验证数据集 → 准备测试用例 → torchrun) | 任何用例;生成供Day 0或Day 1使用的检查点。要求原始训练数据存放在 |
所有工作流均在OSMO上运行。Day 0工作流需要 (Qwen Image-Edit OVSL2SL — 现有URL或从 本地部署);仅微调工作流无外部端点。
image_edit_endpointreferences/nim/Pick the right workflow for the user's defect class
根据用户的缺陷类别选择合适的工作流
| Defect class | Workflow | Mechanism |
|---|---|---|
Clean / good / scan-grid / | | usd2roi-render + Qwen Image-Edit |
| Texture defects (solder bridge, scratch, discoloration) AND missing-component (handled natively by AnomalyGen, NOT structural) | | Qwen Image-Edit + AnomalyGen AMP/SDG |
| Structural / pose defects (tombstone, shift, sideflip) | | IsaacSim pose perturbation |
| Day 1 inference + labeling on a real image | | usd2roi day-1 registration (real-alignment) or direct inference (manual-ROI) |
ChangeNet golden/defect pairs: submit + with the same (two-submission pairing convention).
good_image_generation.yamlstructural_defect_generation.yaml--set name=Day 0 and Day 1 share the same downstream shape: a Jinja-gated(omitted whenfinetune-job) feedinguse_pretrained_checkpoint=true. Day 0 prependsanomaly-infer+usd2roi-render; Day 1 starts fromaugment-image-edit. Per-stage detail: each flow's walkthrough.<dig_url_root>/datasets/<usecase>/raw
| 缺陷类别 | 工作流 | 机制 |
|---|---|---|
清洁/良品/扫描网格/ | | usd2roi渲染 + Qwen图像编辑 |
| 纹理缺陷(焊桥、划痕、变色)及缺失组件(由AnomalyGen原生处理,非结构类) | | Qwen图像编辑 + AnomalyGen AMP/SDG |
| 结构/姿态缺陷(立碑、偏移、侧翻) | | IsaacSim姿态扰动 |
| 真实图像的Day 1推理 + 标注 | | usd2roi Day 1配准(真实对齐)或直接推理(手动ROI) |
ChangeNet基准/缺陷配对:提交 + 时使用相同的 (两次提交配对约定)。
good_image_generation.yamlstructural_defect_generation.yaml--set name=Day 0和Day 1共享相同的下游流程:一个Jinja控制的(当finetune-job时省略)输入到use_pretrained_checkpoint=true。Day 0前置anomaly-infer+usd2roi-render;Day 1从augment-image-edit开始。各阶段细节:查看对应工作流的演练文档。<dig_url_root>/datasets/<usecase>/raw
User intent → knob mapping
用户意图 → 参数映射
Every OV flow is two-stage: caps the final per-cell crops (stage 2); caps raw scan-grid patches (stage 1, each yielding multiple crops). DO NOT auto-map "generate N images" → (wrong stage). does not exist on (one crop per component — use ) or (narrow via the cookbook's whitelist). Full knob table, smoke-test recipes, defaults, caveats: .
crop_max_emit=Nrender_patches=Nrender_patches=Ncrop_max_emitstructural_defect_generation.yamlrender_patchestexture_defect_generation_day1_real_alignment.yamlcrop.classesreferences/knob_mapping.md每个OV工作流分为两个阶段: 限制最终的每单元裁剪数量(阶段2); 限制原始扫描网格补丁数量(阶段1,每个补丁可生成多个裁剪)。请勿自动将“生成N张图像”映射为(阶段错误)。 不存在参数(每个组件对应一个裁剪 — 使用), 也无此参数(通过手册中的白名单缩小范围)。完整参数表、冒烟测试方案、默认值和注意事项见 。
crop_max_emit=Nrender_patches=Nrender_patches=Nstructural_defect_generation.yamlcrop_max_emitrender_patchestexture_defect_generation_day1_real_alignment.yamlcrop.classesreferences/knob_mapping.mdStructural-defect sizing (no crop_max_emit
knob exists)
crop_max_emit结构缺陷输出规模(无crop_max_emit
参数)
crop_max_emitStructural output is non-linear in — doubling frames adds ~1.6–1.7× crops, not 2×. Don't use (no effect) or (fails). Validated yield table + target-size formula: §"Sizing the output". For ambiguous "generate N images", surface the calibration table via .
render_patchescrop_max_emitrender_patches=0references/flows/structural_defect_generation.mdAskUserQuestion结构缺陷输出与呈非线性关系 — 帧数翻倍会增加约1.6–1.7倍的裁剪量,而非2倍。请勿使用(无效果)或(会失败)。经验证的产出表和目标规模公式见 中的“输出规模调整”章节。对于模糊的“生成N张图像”请求,通过展示校准表。
render_patchescrop_max_emitrender_patches=0references/flows/structural_defect_generation.mdAskUserQuestionDisambiguation: handle vague requests before committing
歧义消除:提交前处理模糊请求
Underspecified prompts ("generate me some images", "run the PCBA flow", "give me defects") must not be resolved by silently assuming a flow / usecase / knob mapping. When intent is ambiguous, pause and present candidate interpretations via (2–4 mutually exclusive options) before submitting. Disambiguate the load-bearing choices: which flow, which use case, what stage a count refers to, finetune vs. passthrough.
AskUserQuestionSettled defaults you should NOT disambiguate: PCBA Day 1 → real-alignment; board → ; image-edit endpoint → local cluster service (); ; Day 1 real-alignment (fall back to only when CAD masks are unavailable, see ).
0603_H100references/nim/use_pretrained_checkpoint=truedefault_spatial_dependency=cadfreereferences/flows/texture_defect_generation_day1_real_alignment.mddig_url_rootAskUserQuestionosmo data uploadpreflight_urls.shs3://osmo-workflows/digFull trigger table, prompt construction, and when-NOT-to-ask exceptions: — load before assembling options for any vague request.
references/disambiguation.mdAskUserQuestion未明确的请求(如“给我生成一些图像”、“运行PCBA工作流”、“给我生成缺陷样本”)不得通过默认假设工作流/用例/参数映射来解决。当意图不明确时,暂停操作并通过提供候选解释(2–4个互斥选项),待用户选择后再提交。需明确关键选择:使用哪个工作流、哪个用例、计数对应的阶段、微调还是直通。
AskUserQuestion无需消除歧义的既定默认值:PCBA Day 1 → 真实对齐;电路板 → ;图像编辑端点 → 本地集群服务();;Day 1真实对齐的(仅当CAD掩码不可用时才 fallback 到,见 )。
0603_H100references/nim/use_pretrained_checkpoint=truedefault_spatial_dependency=cadfreereferences/flows/texture_defect_generation_day1_real_alignment.mddig_url_rootAskUserQuestionosmo data uploadpreflight_urls.shs3://osmo-workflows/dig完整触发表、提示构建及无需询问的例外情况见 — 在为任何模糊请求构建选项前,请先查阅该文档。
references/disambiguation.mdAskUserQuestionStep 0: Select Flow, Cookbook, and Gather Inputs
步骤0:选择工作流、手册并收集输入
Before this step, if the request is vague (e.g. "generate me images", "run the PCBA flow", "give me defects"), pause and run the disambiguation cheat sheet above — present candidate interpretations via and let the user pick. Don't auto-pick a load-bearing default the user didn't actually choose.
AskUserQuestion在本步骤之前,如果请求模糊(如“给我生成图像”、“运行PCBA工作流”、“给我生成缺陷样本”),请暂停并执行上述歧义消除流程 — 通过提供候选解释,让用户选择。请勿自动选择用户未明确指定的关键默认值。
AskUserQuestionFirst-time gate
首次使用验证
If memory has no entries for this user, ASK the up-front preference questions in ONE call BEFORE any preflight / / / , save to memory (§4), then proceed. Bundle:
AskUserQuestionosmokubectlosmo data upload- — MUST be elicited, not auto-picked. Offer
dig_url_rootas a confirmable suggestion; else user provides their own OSMO-supported storage prefix. ~80 GB+ lands here. No escape hatch other than memory-recall of a previously confirmed value.s3://osmo-workflows/dig - Default OSMO — candidates from
--pool→osmo profile list.pool.accessible - Pod-template confirmation — only when returns 403 (§2 has the exact question).
osmo config show POD_TEMPLATE - Image-edit endpoint — Day 0 only: Option A (existing URL) vs Option B (deploy local NIM).
Subsequent conversations read these silently from memory. Per-flow choices (use case, checkpoint vs finetune, board, knobs) are asked each time — see below.
如果用户记忆中无相关记录,在执行任何预检///操作前,通过一次调用询问前置偏好问题,保存到记忆中(第4节),然后继续。需询问的内容包括:
osmokubectlosmo data uploadAskUserQuestion- — 必须获取,不得自动选择。提供
dig_url_root作为可确认的建议值;否则由用户提供自己的OSMO支持存储前缀。该路径会占用80GB+存储空间。除复用已确认的记忆值外,无其他捷径。s3://osmo-workflows/dig - 默认OSMO — 候选值来自
--pool→osmo profile list。pool.accessible - Pod模板确认 — 仅当返回403时询问(第2节有确切问题)。
osmo config show POD_TEMPLATE - 图像编辑端点 — 仅Day 0需要:选项A(现有URL) vs 选项B(部署本地NIM)。
后续对话将从记忆中静默读取这些值。每次都需询问工作流相关选择(用例、检查点还是微调、电路板、参数) — 见下文。
Preflight ordering (after the first-time gate)
预检顺序(首次使用验证后)
Run §1 → §2 → §3 → §4 generate the run stamp. Cadence: §1 and §2 are once-per-conversation gates with cross-conversation memory caching (see §4a in ) — skip when memory records them as already verified / user-confirmed. §3 runs before every submit (varies by flow). §4 is the agent's job — fresh per submit.
preflight_credentials.shpreflight_pod_template.shpreflight_urls.sh <flow> <usecase>references/preconditions.md$STAMPPod-template enforcement is two layers: the pre-submit gate (§2) plus an in-pod runtime preflight on every OV + training task (fails fast on missing or < 16 GiB). Runtime failure despite §2 passing → template was patched out → route to . Missing creds / URL artifacts → offer to submit + first.
preflight_pod_template.sh/usr/share/nvidia/nvoptix.bin/dev/shmphysical-ai-infrastructure-setup-and-resilient-scalingsetup/setup_<case>.yamlsetup/setup_pretrained.yamlThen ask the user in one message — per-flow choices only (the first-time gate above already covered , pool, pod-template, and endpoint preferences; pull those from memory):
dig_url_root- Use case — PCBA (use Day 0 + pcb cookbook), metal surface (Day 1 + metal_surface cookbook), glass (Day 1 + glass cookbook), or custom?
- Checkpoint available? — If yes (), use
use_pretrained_checkpoint=trueand provide<dig_url_root>/models/<usecase>. If no, finetune fromcheckpoint_step.<dig_url_root>/datasets/<usecase>/raw - Local-NIM pool capacity check (Day 0 Option B only) — before , check
kubectl applyviaTotal Capacity.physical-ai-infrastructure-setup-and-resilient-scalingcannot host NIM + DIG concurrently → ask user to add GPUs or switch to Option A.Total Capacity < 2is alwaysimage_edit_model, never genericnvidia/Qwen-Image-Edit-NVPCB-OVSL2SL.qwen-image-edit - Save user preferences to memory — after the first-time gate (and after any submit diverging from a documented default), persist load-bearing choices (, OSMO pool, default board, image-edit endpoint, pod-template state, osmo-admin role). Never save
dig_url_root(constant — saving invites drift) or ephemeral state (STAMP, one-offimage_edit_model). Full table:anomaly_types_json§4a "Memory rules". Read relevant memories at the start of every new conversation and apply silently.references/preconditions.md
Review the relevant flow reference before asking — most values have sensible defaults. Day 1 routing: PCBA defaults to ; metal/glass have no USD flow so always ; don't ask the user "manual or real-alignment?" for PCBA unless they explicitly ask to skip alignment.
real_alignmentmanual_roi执行第1节 → 第2节 → 第3节 → 第4节生成运行标记。频率:第1节和第2节为每对话一次的验证门,且跨对话记忆缓存(见 第4a节) — 当记忆记录已验证/用户确认时跳过。第3节在每次提交前运行(因工作流而异)。第4节由代理完成 — 每次提交生成新的。
preflight_credentials.shpreflight_pod_template.shpreflight_urls.sh <flow> <usecase>references/preconditions.md$STAMPPod模板验证分为两层:提交前的验证门(第2节),以及每个OV和训练任务的容器内运行时预检(当缺少或小于16GiB时快速失败)。若第2节通过但运行时失败 → 模板已被修改 → 转至。若缺少凭证/URL工件 → 先提交相关的 + 。
preflight_pod_template.sh/usr/share/nvidia/nvoptix.bin/dev/shmphysical-ai-infrastructure-setup-and-resilient-scalingsetup/setup_<case>.yamlsetup/setup_pretrained.yaml然后在一条消息中询问用户仅与工作流相关的选择(上述首次使用验证已覆盖、pool、pod模板和端点偏好;从记忆中提取这些值):
dig_url_root- 用例 — PCBA(使用Day 0 + pcb手册)、金属表面(Day 1 + metal_surface手册)、玻璃(Day 1 + glass手册),还是自定义?
- 是否有可用检查点? — 如果有(),使用
use_pretrained_checkpoint=true并提供<dig_url_root>/models/<usecase>。如果没有,从checkpoint_step开始微调。<dig_url_root>/datasets/<usecase>/raw - 本地NIM池容量检查(仅Day 0选项B需要) — 在执行前,通过
kubectl apply检查physical-ai-infrastructure-setup-and-resilient-scaling。Total Capacity无法同时承载NIM + DIG → 询问用户添加GPU或切换到选项A。Total Capacity < 2始终为image_edit_model,绝不能使用通用的nvidia/Qwen-Image-Edit-NVPCB-OVSL2SL。qwen-image-edit - 将用户偏好保存到记忆 — 首次使用验证后(以及任何偏离文档默认值的提交后),持久化关键选择(、OSMO pool、默认电路板、图像编辑端点、pod模板状态、osmo-admin角色)。请勿保存
dig_url_root(固定值 — 保存会导致偏差)或临时状态(STAMP、一次性image_edit_model)。完整表格见anomaly_types_json第4a节“记忆规则”。每次新对话开始时读取相关记忆并静默应用。references/preconditions.md
询问前请查阅相关工作流参考文档 — 大多数值有合理默认值。Day 1路由:PCBA默认使用;金属/玻璃无USD工作流,因此始终使用;除非用户明确要求跳过对齐,否则不要询问PCBA用户“手动还是真实对齐?”。
real_alignmentmanual_roiCommon Preconditions (all flows)
通用前提条件(所有工作流)
Quick reference. Long-form: .
references/preconditions.md-
OSMO credentials + tokens — once per conversation. If aexists in the workspace, source it first (
.env) soset -a; . ./.env; set +ais exported. RunHF_TOKEN; authoritative check is the OSMO credscripts/preflight_credentials.shis provisioned (images are public onhf-token— no registry cred needed). Passnvcr.io/nvidia/in restricted-egress shells. See--no-probe§1.references/preconditions.md -
Pod template — once per conversation, with cross-conversation memory caching (see Step 0 §6). Skip when memory records the cluster verified / user-confirmed / 409-skipped. Otherwise runand branch on exit code (0=verified / 1=patch via infra skill / 2=ask-user (HTTP 403) / 3=skip (HTTP 409) / 4=env-fix). Full branching prose and prompts in
scripts/preflight_pod_template.sh§2.references/preconditions.md -
Required URL artifacts — before every submit. Run. If anything is missing, stop and submit the relevant
DIG_URL_ROOT=<dig_url_root> scripts/preflight_urls.sh <flow> <usecase> [variant]+setup/setup_<case>.yamlfirst (the OSMO setup workflows) — seesetup/setup_pretrained.yaml. Never download assets locally to work around a problem; if setup fails on credentials, ask the user to rectify them and re-submit on OSMO. Per-flow checklist:references/setup.mdFlow Use case Required URL artifacts under <dig_url_root>Day 0 — Texture Defects PCBA ,models/pretrained,models/pcb,datasets/pcb/rawdatasets/pcb/assetsDay 0 — Good Image PCBA onlydatasets/pcb/assetsDay 0 — Structural Defects PCBA onlydatasets/pcb/assetsDay 1 Metal surface ,models/pretrained,models/metal_surfacedatasets/metal_surface/rawDay 1 Glass ,models/pretrained,models/glassdatasets/glass/rawDay 1 real-photo alignment PCBA Day 1 PCBA plus datasets/pcb/assetsFinetune Only Any ,models/pretraineddatasets/<usecase>/rawBuilt-invalues areusecase,pcb,metal_surface. Seeglass§3.references/preconditions.md -
Name stamping — regeneratebefore every submit and pass
$STAMP=$(cat /proc/sys/kernel/random/uuid | cut -c1-8). Production YAMLs ship no--set name=<flow>-$STAMPdefault. Seename§4.references/preconditions.md -
Glass case (UC3) — Roboflow zip — only for. Upload
setup_glass.yamlto an OSMO URL prefix first; passmobile_screen.zip. Full procedure:--set uc3_zip_url_root=<prefix>§"Glass case (UC3)".references/setup.md
快速参考。详细内容见 。
references/preconditions.md-
OSMO凭证 + 令牌 — 每对话一次。如果工作区中存在文件,先加载它(
.env),以便导出set -a; . ./.env; set +a。运行HF_TOKEN;权威检查是OSMO凭证scripts/preflight_credentials.sh已配置(hf-token上的图像为公开 — 无需注册表凭证)。在受限出口环境中传递nvcr.io/nvidia/。见--no-probe第1节。references/preconditions.md -
Pod模板 — 每对话一次,且跨对话记忆缓存(见步骤0第6节)。当记忆记录集群已验证/用户确认/409跳过,跳过此步骤。否则运行并根据退出码分支(0=已验证 / 1=通过基础架构技能修补 / 2=询问用户(HTTP 403) / 3=跳过(HTTP 409) / 4=修复环境)。完整分支说明和提示见
scripts/preflight_pod_template.sh第2节。references/preconditions.md -
必需的URL工件 — 每次提交前。运行。如果缺少任何工件,停止操作并先提交相关的
DIG_URL_ROOT=<dig_url_root> scripts/preflight_urls.sh <flow> <usecase> [variant]+setup/setup_<case>.yaml(OSMO设置工作流) — 见setup/setup_pretrained.yaml。绝不能通过本地下载资产来解决问题;如果设置因凭证失败,请询问用户修正后重新在OSMO上提交。各工作流检查清单:references/setup.md工作流 用例 下必需的URL工件<dig_url_root>Day 0 — 纹理缺陷 PCBA ,models/pretrained,models/pcb,datasets/pcb/rawdatasets/pcb/assetsDay 0 — 良品图像 PCBA 仅 datasets/pcb/assetsDay 0 — 结构缺陷 PCBA 仅 datasets/pcb/assetsDay 1 金属表面 ,models/pretrained,models/metal_surfacedatasets/metal_surface/rawDay 1 玻璃 ,models/pretrained,models/glassdatasets/glass/rawDay 1真实照片对齐 PCBA Day 1 PCBA工件 + datasets/pcb/assets仅微调 任何 ,models/pretraineddatasets/<usecase>/raw内置值包括usecase,pcb,metal_surface。见glass第3节。references/preconditions.md -
名称标记 — 每次提交前重新生成,并传递
$STAMP=$(cat /proc/sys/kernel/random/uuid | cut -c1-8)。生产级YAML文件无默认--set name=<flow>-$STAMP值。见name第4节。references/preconditions.md -
玻璃用例(UC3)— Roboflow压缩包 — 仅适用于。先将
setup_glass.yaml上传到OSMO URL前缀;传递mobile_screen.zip。完整流程见--set uc3_zip_url_root=<prefix>中的“玻璃用例(UC3)”章节。references/setup.md
Flow walkthroughs
工作流演练
Each flow's full walkthrough — group diagrams, prerequisites, submit-command variants, data handoffs, per-stage troubleshooting — lives under . The agent should read the matching file before submitting any flow it hasn't run in the current conversation.
references/flows/| Flow | Workflow YAML | Walkthrough |
|---|---|---|
| Day 0 — Texture Defects (PCBA) | | |
| Day 0 — Good Image (PCBA) | | |
| Day 0 — Structural Defects (PCBA) | | |
| Day 1 — Infer + Label (real-photo alignment, default PCBA) | | |
| Day 1 — Infer + Label (manual ROI, metal/glass + PCBA experimentation) | | |
| Finetune Only | | |
每个工作流的完整演练 — 分组图、前提条件、提交命令变体、数据传递、各阶段故障排除 — 均位于下。代理在提交当前对话中未运行过的工作流前,应先阅读对应文件。
references/flows/| 工作流 | 工作流YAML | 演练文档 |
|---|---|---|
| Day 0 — 纹理缺陷(PCBA) | | |
| Day 0 — 良品图像(PCBA) | | |
| Day 0 — 结构缺陷(PCBA) | | |
| Day 1 — 推理 + 标注(真实照片对齐,PCBA默认) | | |
| Day 1 — 推理 + 标注(手动ROI,金属/玻璃 + PCBA实验) | | |
| 仅微调 | | |
Cross-flow invariants
跨工作流不变量
- (default) → passthrough against
use_pretrained_checkpoint=true. Set tomodels/<usecase>to insert an in-podfalsegroup (cookbook yq-patched in-pod, no pre-submit render step).finetune-job - Day 0 emits per-cell trees; Day 1 emits per-ROI crops registered against the USD; structural emits flat per-component crops.
crop/<MATERIAL>/<cell>/... - Shipped per-usecase +
checkpoint_stepdefaults: seeanomaly_types_json§"Shipped checkpoint andreferences/preconditions.mddefaults".anomaly_types_json
- (默认)→ 基于
use_pretrained_checkpoint=true直通。设置为models/<usecase>可插入容器内的false组(手册yq修补容器内配置,无需提交前渲染步骤)。finetune-job - Day 0输出每单元目录结构;Day 1输出与USD配准的每ROI裁剪;结构缺陷输出扁平的单组件裁剪。
crop/<MATERIAL>/<cell>/... - 随附的各用例+
checkpoint_step默认值见anomaly_types_json中的“随附检查点和references/preconditions.md默认值”章节。anomaly_types_json
OSMO Monitoring
OSMO监控
Load before any , , or action in this skill. It defines the polling cadence, task-status interpretation, log-pull escalation thresholds, failure-classification routing, and what to surface to the user vs. silently retry. Do not assemble a post-submit watch loop or status summary from memory — re-read it on the first such action of every conversation.
references/monitoring.mdosmo workflow submitosmo workflow queryosmo workflow logsbash
osmo workflow query <workflow_id> --format-type json | jq '{status, tasks: [.groups[].tasks[] | {name, status, exit_code}]}'
osmo workflow logs <workflow_id> -t <task_name> -n 200
osmo data download <dig_url_root>/runs/<name>/anomaly ./output/anomaly-<name>/Monitoring discipline: . Retrieval: . Presentation: . Gotchas: .
references/monitoring.mdreferences/output_retrieval.mdreferences/output_rendering.mdreferences/troubleshooting.md在本技能中执行任何、或操作前,请先查阅。该文档定义了轮询频率、任务状态解读、日志拉取升级阈值、失败分类路由,以及需向用户展示和需静默重试的内容。请勿凭记忆构建提交后的监控循环或状态摘要 — 每次对话首次执行此类操作时都需重新查阅该文档。
osmo workflow submitosmo workflow queryosmo workflow logsreferences/monitoring.mdbash
osmo workflow query <workflow_id> --format-type json | jq '{status, tasks: [.groups[].tasks[] | {name, status, exit_code}]}'
osmo workflow logs <workflow_id> -t <task_name> -n 200
osmo data download <dig_url_root>/runs/<name>/anomaly ./output/anomaly-<name>/监控规范:。结果检索:。结果展示:。常见问题:。
references/monitoring.mdreferences/output_retrieval.mdreferences/output_rendering.mdreferences/troubleshooting.mdResponse Template
响应模板
For "show me the plan / recipe" requests, emit your final response with these labeled sections (so nothing truncates mid-recipe):
Workflow: →
<flow name>assets/configs/<yaml>Preflights: ;
scripts/preflight_credentials.shscripts/preflight_urls.sh <0|1|finetune> <usecase> [variant]Required URL Artifacts under : enumerate per Common Preconditions §3 for the chosen flow.
<dig_url_root>Submit Command:
bash
STAMP=$(cat /proc/sys/kernel/random/uuid | cut -c1-8)
osmo workflow submit assets/configs/<yaml> --pool <pool> \
--set name=<flow>-$STAMP dig_url_root=<root> usecase=<usecase> \
image_edit_endpoint=<endpoint> image_edit_model=nvidia/Qwen-Image-Edit-NVPCB-OVSL2SL \
checkpoint_step=<step> 'anomaly_types_json=<types>'Monitoring: load before running the submit; apply its polling cadence + log-pull thresholds after returns a workflow id.
references/monitoring.mdosmo workflow submitOutput Location: (per-flow override: see flow walkthrough).
<dig_url_root>/runs/<flow>-$STAMP/anomaly/对于“展示计划/方案”请求,按以下带标签的部分输出最终响应(避免方案被截断):
工作流: →
<工作流名称>assets/configs/<yaml文件名>预检: ;
scripts/preflight_credentials.shscripts/preflight_urls.sh <0|1|finetune> <usecase> [variant]<dig_url_root>提交命令:
bash
STAMP=$(cat /proc/sys/kernel/random/uuid | cut -c1-8)
osmo workflow submit assets/configs/<yaml文件名> --pool <pool> \
--set name=<工作流名称>-$STAMP dig_url_root=<根路径> usecase=<用例> \
image_edit_endpoint=<端点> image_edit_model=nvidia/Qwen-Image-Edit-NVPCB-OVSL2SL \
checkpoint_step=<步骤> 'anomaly_types_json=<类型>'监控: 提交前查阅;返回工作流ID后,应用其轮询频率 + 日志拉取阈值。
references/monitoring.mdosmo workflow submit输出位置: (各工作流覆盖情况见对应工作流演练文档)。
<dig_url_root>/runs/<工作流名称>-$STAMP/anomaly/Supporting files
支持文件
Full inventory — workflow YAMLs, cookbooks, scripts table, references, evals, component skills — in . Top-level dirs: , , , , .
references/contents.mdassets/configs/assets/cookbooks/scripts/references/evals/完整清单 — 工作流YAML、手册、脚本表、参考文档、评估、组件技能 — 见 。顶级目录:, , , , 。
references/contents.mdassets/configs/assets/cookbooks/scripts/references/evals/