Loading...
Loading...
Run the full DEFT AOI improvement loop for NVIDIA TAO VisualChangeNet / ChangeNet PCB inspection models: baseline evaluate, RCA, ingestion of customer-supplied pre-generated AnomalyGen images, k-NN mining, retraining, and deployment gating until FAR / recall KPI targets are met. EA variant — does not run AnomalyGen inline; the customer pre-generates synthetic NG/OK pairs out-of-band and the loop ingests them. Use for prompts like "run the DEFT loop", "fine-tune until FAR below 0.1% at recall=100%", or "improve my AOI ChangeNet model with RCA and pre-generated synthetic defects"; do not use for standalone TAO training, one-off inference, generic anomaly generation, or RCA-only analysis.
npx skill4agent add nvidia/skills tao-run-deft-aoi<workspace>/augmentation/anomalygen/specs/baseline_spec.yamlHF_TOKENNGC_API_KEY_*model.backbone.pretrained_backbone_pathreferences/visual-changenet.mdreferences/tao-mine-aoi-images.md<workspace>/augmentation/anomalygen/{reconstructed_image,original_image}/references/pipeline.mdautoml_enabled: trueautoml_policy: off${TAO_SKILL_BANK_PATH:-~/tao-skills-external}/scripts/list_tao_platforms.py \
--skill-bank ${TAO_SKILL_BANK_PATH:-~/tao-skills-external} --format text${TAO_SKILL_BANK_PATH:-~/tao-skills-external}/scripts/list_tao_platforms.py \
--skill-bank ${TAO_SKILL_BANK_PATH:-~/tao-skills-external} \
--platform <platform> --format textThere is exactly one user gate: pre-flight confirmation. Print the Pre-Flight Summary (see Pre-Flight Summary in), then STOP and wait for the user to type "go", "yes", "looks good", or similar explicit approval. Do not launch any side-effecting step (references/pre-flight.md, training, SDG, mutations underdocker run) before that approval — reading specs, listing files,${RESULTS_DIR}/, and populating the summary table are fine. "Autonomous" describes behavior after this gate, not before it. Do not skip the gate even if the user's original prompt sounded urgent ("just run it", "go ahead") — the summary itself is the artifact they need to see before approving.docker image inspectAfter the gate, the skill is fully autonomous. Run the entire loop without asking for confirmation. Do not pause between steps. Do not ask "want me to continue?" — just continue. Only stop if a step fails with an unrecoverable error or a hard-stop gate fires. Print a one-line status update at each step milestone so the user can follow progress.
references/pre-flight.mddeft_state.jsoniterations.baseline.stage_completed == "train"best_ckpt_pathtao-run-automl-deft-pipelineinference -> evaluatetrain -> inference -> evaluatetao-skill-bank:tao-train-visual-changenetrcatao-skill-bank:tao-analyze-gaps-visual-changenetreferences/visual-changenet.mdreferences/tao-analyze-gaps-visual-changenet.mddeft_state.jsonmax_iterationsreferences/pipeline.mdresults/loop_log.jsonlresults/deft_state.jsonmax_iterationsresults/DEFT_Loop_Report.htmlreporteragents/reporter.mdloop_log.jsonltao-skill-bank:*references/*.mdreporterreferences/pre-flight.mdmax_iterationstop_k_per_targetmin_similaritytraining_epochsnum_epochsspecs/baseline_spec.yaml~/workspace| Reference | Owns |
|---|---|
| Pre-Flight checks 1-11, full defaults list, Pre-Flight Summary template + the one user gate. Workspace/spec/CSV/checkpoint/image resolution, |
| Pipeline steps 1-7 + Augmentation Pool. RCA → route (pre-gen single-bucket promote-all-gaps, |
| Available Scripts table, Stage Reference Modules (stage→skill map), path-rule invariant, SKILL/INLINE/AGENT stage types, post-stage check, report artifacts, |
| |
| |
| Template fill rules followed by |
| |
<workspace><workspace>/
├── .env # NGC_API_KEY (nvcr.io/* image pulls), HF_TOKEN (HuggingFace pre-flight pulls). No AnomalyGen credentials required — this EA variant ingests pre-generated pairs.
├── specs/baseline_spec.yaml # ChangeNet train/eval spec
├── train/base/
│ ├── training_set.csv # seed training rows; ChangeNet 14-column siamese schema
│ └── validation_set.csv # held-out rows; checked for leakage against every train CSV
├── kpi/
│ ├── images/ # KPI test images (real data only — no generated images here)
│ └── testing_set.csv # labels live in the CSV
├── augmentation/
│ ├── mining_pool/
│ │ ├── mining_pool.csv # append-only production-line samples; paths relative to this dir
│ │ └── images/ # source images referenced by mining_pool.csv (e.g. *_SolderLight.jpg)
│ └── anomalygen/ # customer-supplied pre-generated synthetic pairs (this EA variant does not run AnomalyGen)
│ ├── reconstructed_image/ # NG images (will become ChangeNet input_path); flat dir of *.jpg or *.png
│ ├── original_image/ # OK partner images, same stems as reconstructed_image/ (will become ChangeNet golden_path)
│ └── defect_spec.jsonl # OPTIONAL — one entry per defect_type if defect-type accounting is wanted in deft_state.json
│ # Stems in reconstructed_image/ and original_image/ must match 1-to-1; extensions may differ.
└── results/run_<YYYYMMDD_HHMMSS>/ # created/resumed by this workflow (= ${RESULTS_DIR})input_pathgolden_pathlabelobject_namegolden_pathboardname{images_dir}/{input_path}/{object_name}_{light}{image_ext}input_path<workspace>results/run_<YYYYMMDD_HHMMSS>/ # = ${RESULTS_DIR}
├── deft_state.json # current resume snapshot (schema: references/deft_state.json)
├── loop_log.jsonl # append-only stage log; single source of truth
├── DEFT_Loop_Report.html # re-rendered after every stage by agents/reporter.md
├── best_model.json # inference handoff metadata (see references/prepare-for-inference.md)
├── best_model_inference_spec.yaml # ready-to-run TAO inference spec built from training config
├── iter${ITER}_summary.md # ≤300-word per-iteration summary
├── synth_pool/ # built ONCE at Pre-Flight step 10 via scripts/prestage_pregen.py
│ ├── manifest.json # paths + counts for the loop to reference
│ ├── images/synth_{ng,ok}/ # ChangeNet-staged pre-gen pairs (single copy, shared across iters)
│ ├── sdg_rows.csv # 14-col + provenance + filepath; the SDG half of source_pool
│ ├── source_pool.{csv,parquet} # real (mining_pool) + sdg unified pool with provenance
│ ├── source_embeddings.parquet # written only when --embed-with-siglip was passed to prestage_pregen.py
│ └── source_embed.log # data-services log for the source embedding (if run)
├── baseline/
│ ├── train/ # TAO train output: model_epoch_<EEE>_step_<SSS>.pth × N, status.json, experiment.yaml, train.log
│ ├── inference/{best_val,latest}/ # per-checkpoint inference.csv + KPI plots from scripts/analyze_kpi.py
│ └── rca_results/<TS>/ # kpi_gaps.parquet, threshold.txt, weak_samples_breakdown.txt
└── iter${ITER}/
├── routing_results/<TS>/ # mining_gaps.parquet, anomalygen_gaps.parquet, routing_summary.txt
├── anomalygen/ # per-iter bookkeeping (just records the synth_pool/manifest.json path)
│ └── ingest_summary.json # per-iter audit: which synth_pool manifest was reused, counts at iter start
├── mining_filter/
│ ├── mining_pool.csv # top-K-per-target k-NN survivors from synth_pool/source_pool (synth + real subject to same filter)
│ ├── knn_summary.csv # candidate_count, kept_count, rejected_count, similarity_threshold=0.9
│ ├── target_embeddings.parquet # embeddings of weak-target images (per-iter — targets change each iter)
│ └── mining_summary.txt # per-label breakdown emitted by mining container
├── dataset/
│ ├── train_combined_iter${ITER}.csv
│ └── train_combined_iter${ITER}_provenance.csv # source ∈ {base_train, previous_iter_train, mining_pool}
├── train/ # TAO train output for iter${ITER}
├── inference/{best_val,latest}/
└── rca_results/<TS>/ # next iteration's RCA reads inference/{best_val|latest}/inference.csvtrain_combined_iter${N}.csvmining_filter/mining_pool.csvtrain/base/training_set.csvreferences/pre-flight.md${RESULTS_DIR}/iter${ITER}/output: /results/...<workspace>references/stage-execution.mdloop_log.jsonldeft_state.jsonloop_log.jsonlscripts/log_stage.pyechojqreferences/state-logging.mdmining_pool.csv