[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78AY58WCT9CY3FC6SD5WQD1":3,"skill-same:01M78AY58WCT9CY3FC6SD5WQD1":109},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":32,"commitSha":33,"skillDirectory":34,"forksCount":14,"repositoryHtmlUrl":35,"repositoryHomepageUrl":36,"ownerHtmlUrl":37,"ownerBlogUrl":38,"ownerDescription":39,"updatedAt":40,"install":41,"resources":54},"01M78AY58WCT9CY3FC6SD5WQD1","tao-train-optical-inspection",null,"Optical Inspection for defect detection using Siamese networks. Compares image pairs to detect manufacturing defects, anomalies, or quality issues. Use when training, evaluating, exporting, or running inference for a TAO Optical Inspection model on AOI \u002F quality-control data. Trigger phrases include \"train optical inspection\", \"AOI defect detection\", \"Siamese defect classifier\", \"PCB \u002F manufacturing inspection\".","Solizardking\u002Fskillhub-main","Solizardking","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F108096810?v=4","01M786KDB10AYV042N0F9BD5B5","Clawd","01M786NYYXSZK1D05WM8JQPC48",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Ftao-train-optical-inspection\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: tao-train-optical-inspection\ndescription: Optical Inspection for defect detection using Siamese networks. Compares image pairs to detect manufacturing\n  defects, anomalies, or quality issues. Use when training, evaluating, exporting, or running inference for a TAO Optical\n  Inspection model on AOI \u002F quality-control data. Trigger phrases include \"train optical inspection\", \"AOI defect\n  detection\", \"Siamese defect classifier\", \"PCB \u002F manufacturing inspection\".\nlicense: Apache-2.0\ncompatibility: Requires docker + nvidia-container-toolkit.\nmetadata:\n  version: \"0.1.0\"\n  author: NVIDIA Corporation\nallowed-tools: Read Bash\ntags:\n- defect\n- detection\n---\n\n# Optical Inspection\n\nOptical inspection for defect detection using Siamese networks. Compares image pairs to detect manufacturing defects, anomalies, or quality issues.\n\nSet train.pretrained_model_path for pretrained Siamese weights.\n\nFor TAO Deploy TensorRT actions (`gen_trt_engine`, TensorRT `evaluate`, and TensorRT `inference`), read `references\u002Ftao-deploy-optical-inspection.md` first. The parent PyT container does not expose `optical_inspection gen_trt_engine`; TensorRT engine generation is deploy-only. Deploy spec templates live in this skill's `references\u002F` folder with the `spec_template_deploy_*.yaml` prefix.\n\n## Dataclass Schemas\n\nGenerated TAO Core schemas are packaged in `schemas\u002F\u003Caction>.schema.json`, with `schemas\u002Fmanifest.json` listing available actions. Each generated schema also emits `references\u002Fspec_template_\u003Caction>.yaml` from the schema top-level `default` field. AutoML enablement is declared at the model layer in `references\u002Fskill_info.yaml` via `automl_enabled`. Runnable AutoML still requires `schemas\u002Ftrain.schema.json` and `references\u002Fspec_template_train.yaml` to exist and parse. Use the packaged train schema for `automl_default_parameters`, `automl_disabled_parameters`, defaults, min\u002Fmax bounds, enums, option weights, math conditions, dependencies, and popular parameters. Do not expect `~\u002Ftao-core` at runtime; maintainers regenerate schemas\u002Ftemplates before packaging the skill bank.\n\n## Train Action Policy\n\nThis model is AutoML-enabled at the model layer. Before handling any train-stage request, read `references\u002Fskill_info.yaml` and resolve the run override from either an explicit `automl_policy` value or the user's workflow request. Use `automl_policy: on` by default and only expose `on` \u002F `off` in new launch prompts. Treat phrases like \"turn off AutoML\", \"disable AutoML\", \"no HPO\", or \"plain training\" as `automl_policy: off` for this run only. When `automl_policy: on`, `automl_enabled: true`, and both `schemas\u002Ftrain.schema.json` and `references\u002Fspec_template_train.yaml` are packaged, route the train action through `tao-skill-bank:tao-run-automl` by default with this model's `skill_dir`. Preserve workflow\u002Fapplication overrides for datasets, specs, output directories, GPU\u002Fplatform settings, parent checkpoints, and `automl_policy`. Use direct model training only when `automl_policy: off` or the packaged train schema\u002Ftemplate is missing; in the missing-schema case, report that AutoML is enabled but not runnable for this model until schemas are generated.\n\nNon-train actions such as `evaluate`, `inference`, `export`, and deploy flows stay in this model skill. The per-run `automl_policy` override does not change model metadata.\n\n## Training Requirements\n\n- **Dataset type:** optical_inspection\n- **Formats:** default\n- **Monitoring metric:** val_acc\n\n### Per-Action Dataset Requirements\n\n| Action | Spec Key | Source | Files | List? |\n|---|---|---|---|---|\n| evaluate | dataset.test_dataset.images_dir | eval_dataset | images.tar.gz | No |\n| evaluate | dataset.test_dataset.csv_path | eval_dataset | dataset.csv | No |\n| inference | dataset.infer_dataset.images_dir | inference_dataset | images.tar.gz | No |\n| inference | dataset.infer_dataset.csv_path | inference_dataset | dataset.csv | No |\n| train | dataset.train_dataset.images_dir | train_datasets | images.tar.gz | No |\n| train | dataset.train_dataset.csv_path | train_datasets | dataset.csv | No |\n| train | dataset.validation_dataset.images_dir | eval_dataset | images.tar.gz | No |\n| train | dataset.validation_dataset.csv_path | eval_dataset | dataset.csv | No |\n| train | dataset.test_dataset.images_dir | eval_dataset | images.tar.gz | No |\n| train | dataset.test_dataset.csv_path | eval_dataset | dataset.csv | No |\n\n### Typical Spec Overrides\n\nData source overrides are **mandatory for every action** — the agent MUST construct data source paths from the Per-Action Dataset Requirements table above and include them in `spec_overrides`.\n\n```python\nS3_TRAIN = \"s3:\u002F\u002Fbucket\u002Fdata\u002Ftrain\"\nS3_EVAL = \"s3:\u002F\u002Fbucket\u002Fdata\u002Feval\"\nS3_INFERENCE = \"s3:\u002F\u002Fbucket\u002Fdata\u002Finference\"\n```\n\n**train (mandatory data sources):**\n```python\n{\n    \"train.num_epochs\": 30,\n    \"train.checkpoint_interval\": 10,\n    \"train.validation_interval\": 10,\n    \"train.num_gpus\": 1,\n    \"dataset.batch_size\": 8,\n    \"dataset.train_dataset.images_dir\": f\"{S3_TRAIN}\u002Fimages.tar.gz\",\n    \"dataset.train_dataset.csv_path\": f\"{S3_TRAIN}\u002Fdataset.csv\",\n    \"dataset.validation_dataset.images_dir\": f\"{S3_EVAL}\u002Fimages.tar.gz\",\n    \"dataset.validation_dataset.csv_path\": f\"{S3_EVAL}\u002Fdataset.csv\",\n    \"dataset.test_dataset.images_dir\": f\"{S3_EVAL}\u002Fimages.tar.gz\",\n    \"dataset.test_dataset.csv_path\": f\"{S3_EVAL}\u002Fdataset.csv\",\n}\n```\n\n**evaluate (mandatory data sources):**\n```python\n{\n    \"evaluate.checkpoint\": \"\u003Cselected train\u002FAutoML checkpoint>\",\n    \"dataset.test_dataset.images_dir\": f\"{S3_EVAL}\u002Fimages.tar.gz\",\n    \"dataset.test_dataset.csv_path\": f\"{S3_EVAL}\u002Fdataset.csv\",\n}\n```\n\nUse the workflow's checkpoint resolver for downstream actions instead of guessing a filename. For Optical Inspection smoke runs, AutoML may produce `model_epoch_000_step_00006.pth`; resume can then produce `model_epoch_001_step_00012.pth`. Best-checkpoint actions should use the AutoML best child job's selected checkpoint, epoch-specific actions should pass the exact epoch\u002Fstep checkpoint requested, and only explicit \"latest\" requests should resolve to the latest checkpoint.\n\n**export:**\n```python\n{\n    \"export.checkpoint\": \"\u003Cselected train\u002FAutoML checkpoint>\",\n    \"export.onnx_file\": \"\u002Fresults\u002Foptical_inspection.onnx\",\n    \"export.input_width\": 128,\n    \"export.input_height\": 512,\n    \"export.batch_size\": 1,\n}\n```\n\n**inference (mandatory data sources):**\n```python\n{\n    \"inference.checkpoint\": \"\u003Cselected train\u002FAutoML checkpoint>\",\n    \"dataset.infer_dataset.images_dir\": f\"{S3_INFERENCE}\u002Fimages.tar.gz\",\n    \"dataset.infer_dataset.csv_path\": f\"{S3_INFERENCE}\u002Fdataset.csv\",\n}\n```\n\n## Dataset Convert\n\nDataset conversion is optional for Optical Inspection. If the dataset is already in TAO-ready Optical Inspection format, start directly from the `images.tar.gz` plus `dataset.csv` splits and run `train`, `evaluate`, `inference`, and downstream checkpoint\u002Fexport\u002Fdeploy actions on that converted data.\n\nThe PyT container exposes `optical_inspection dataset_convert`, but this model skill does not package a `dataset_convert` action\u002Ftemplate. The converter expects the raw Factory PCB layout (`root_dataset_dir`, train\u002Fval\u002Fall PCB directories, `golden_csv_dir`, `project_name`, and `bot_top`). The S3 validation bucket currently contains preconverted Optical Inspection `images.tar.gz` plus `dataset.csv` splits, not the raw PCB\u002Fgolden CSV source. Do not synthesize a fake PCB dataset. In model validation reports, mark dataset conversion as `not run: preconverted dataset provided` rather than failed or blocked when only converted data is available.\n\nWhen using the preconverted S3 validation tarballs locally, verify the extracted directory before writing specs. The tarballs may unpack an `images\u002F` wrapper directory; point `dataset.*.images_dir` at the inner directory that contains `golden\u002F` and the board\u002Fimage folders referenced by `dataset.csv`, for example `...\u002F\u003Csplit>\u002Fimages\u002Fimages`, not the outer wrapper.\n\n## Eval Dataset\n\nOptional. Eval dataset uses same format (images + CSV).\n\n## Important Parameters\n\n- **model.model_type**: Siamese variant. Options include Siamese, Siamese_3.\n- **model.model_backbone**: Default custom.\n- **model.embedding_vectors**: Number of embedding dimensions. Default 5.\n- **train.optim.lr**: Learning rate. Default 5e-4.\n- **dataset.batch_size**: Training batch size. Must be greater than 1; use `2` or higher for minimal smoke runs.\n- **dataset.num_input**: Number of input images per comparison.\n- **dataset.input_map**: Mapping of input channels \u002F image pairs.\n\n## Multi-GPU \u002F Multi-Node\n\n**Launch method:** Lightning-managed (single `python` process, Lightning spawns workers).\n\n| Spec Key | Description | Default |\n|----------|-------------|---------|\n| `train.num_gpus` | Number of GPUs | 1 |\n| `train.gpu_ids` | GPU device indices | [0] |\n\n- Strategy: `auto` (Lightning picks best strategy automatically)\n- No explicit `num_nodes` or `distributed_strategy` config — single-node only\n- Lightweight Siamese network, single GPU typically sufficient\n\n## Hardware\n\nMinimum 1 GPU(s), recommended 1 GPU(s). 8GB+ VRAM per GPU. Siamese networks for inspection are lightweight. Single GPU sufficient.\n\n## Error Patterns\n\n**CSV format error**: Ensure dataset.csv has the correct column format for image pair paths and labels.\n\n**Extracted image root mismatch**: If train, evaluate, or inference cannot find paths from `dataset.csv`, inspect the extracted `images.tar.gz` tree. The TAO-ready root must contain `golden\u002F` plus the board folders referenced in the CSV. For validation S3 tarballs this can be one level below the extraction target, such as `images\u002Fimages`.\n\n**Training batch size assertion**: The Optical Inspection dataloader rejects\n`dataset.batch_size: 1` for train. Keep the template default of 8 for normal\nruns, or set `dataset.batch_size: 2` for minimal AutoML smoke validation.\n\n**PyTorch checkpoint load failure on downstream actions**: For checkpoints\nproduced by the same trusted TAO train\u002FAutoML workflow, set\n`TORCH_FORCE_NO_WEIGHTS_ONLY_LOAD=1` for evaluate, inference, export, and\nresume jobs if the current PyTorch default blocks loading the full checkpoint.\nDo not use this env var for untrusted checkpoints.\n\n## Spec Param \u002F Parent Model Inference\n\nModel-specific inference mappings belong in this MD file, not in `config.json`. Generated runners should read this section and apply the mappings with SDK helpers before `create_job()`. This mirrors the old microservices `infer_params.py` flow.\n\nInference mappings from TAO Core `optical_inspection.config.json`:\n\n| Action | Spec Field | Inference Function | Meaning |\n|---|---|---|---|\n| evaluate | `encryption_key` | `key` | encryption key |\n| evaluate | `evaluate.checkpoint` | `parent_model` | model file inferred from the parent job results folder |\n| evaluate | `results_dir` | `output_dir` | current job results directory |\n| export | `encryption_key` | `key` | encryption key |\n| export | `export.checkpoint` | `parent_model` | model file inferred from the parent job results folder |\n| export | `export.onnx_file` | `create_onnx_file` | output ONNX path |\n| export | `results_dir` | `output_dir` | current job results directory |\n| inference | `encryption_key` | `key` | encryption key |\n| inference | `inference.checkpoint` | `parent_model` | model file inferred from the parent job results folder |\n| inference | `inference.trt_engine` | `parent_model` | model file inferred from the parent job results folder |\n| inference | `results_dir` | `output_dir` | current job results directory |\n| train | `encryption_key` | `key` | encryption key |\n| train | `results_dir` | `output_dir` | current job results directory |\n| train | `train.pretrained_model_path` | `ptm_if_no_resume_model` | PTM when no resume checkpoint exists |\n| train | `train.resume_training_checkpoint_path` | `resume_model` | model file inferred from the current job results folder |\n\nFor `parent_model` or `parent_model_folder`, pass the upstream train\u002Fexport\u002FAutoML child job id as `parent_job_id`. The SDK lists the parent result folder, filters checkpoint artifacts, and returns the selected model file or folder. Do not add these mappings back to `config.json` and do not patch generated runner scripts to guess checkpoint paths.\n\n## Deployment\n\n- [tao-deploy-optical-inspection](references\u002Ftao-deploy-optical-inspection.md)\n","# Optical Inspection\n\nOptical inspection for defect detection using Siamese networks. Compares image pairs to detect manufacturing defects, anomalies, or quality issues.\n\nSet train.pretrained_model_path for pretrained Siamese weights.\n\nFor TAO Deploy TensorRT actions (`gen_trt_engine`, TensorRT `evaluate`, and TensorRT `inference`), read `references\u002Ftao-deploy-optical-inspection.md` first. The parent PyT container does not expose `optical_inspection gen_trt_engine`; TensorRT engine generation is deploy-only. Deploy spec templates live in this skill's `references\u002F` folder with the `spec_template_deploy_*.yaml` prefix.\n\n## Dataclass Schemas\n\nGenerated TAO Core schemas are packaged in `schemas\u002F\u003Caction>.schema.json`, with `schemas\u002Fmanifest.json` listing available actions. Each generated schema also emits `references\u002Fspec_template_\u003Caction>.yaml` from the schema top-level `default` field. AutoML enablement is declared at the model layer in `references\u002Fskill_info.yaml` via `automl_enabled`. Runnable AutoML still requires `schemas\u002Ftrain.schema.json` and `references\u002Fspec_template_train.yaml` to exist and parse. Use the packaged train schema for `automl_default_parameters`, `automl_disabled_parameters`, defaults, min\u002Fmax bounds, enums, option weights, math conditions, dependencies, and popular parameters. Do not expect `~\u002Ftao-core` at runtime; maintainers regenerate schemas\u002Ftemplates before packaging the skill bank.\n\n## Train Action Policy\n\nThis model is AutoML-enabled at the model layer. Before handling any train-stage request, read `references\u002Fskill_info.yaml` and resolve the run override from either an explicit `automl_policy` value or the user's workflow request. Use `automl_policy: on` by default and only expose `on` \u002F `off` in new launch prompts. Treat phrases like \"turn off AutoML\", \"disable AutoML\", \"no HPO\", or \"plain training\" as `automl_policy: off` for this run only. When `automl_policy: on`, `automl_enabled: true`, and both `schemas\u002Ftrain.schema.json` and `references\u002Fspec_template_train.yaml` are packaged, route the train action through `tao-skill-bank:tao-run-automl` by default with this model's `skill_dir`. Preserve workflow\u002Fapplication overrides for datasets, specs, output directories, GPU\u002Fplatform settings, parent checkpoints, and `automl_policy`. Use direct model training only when `automl_policy: off` or the packaged train schema\u002Ftemplate is missing; in the missing-schema case, report that AutoML is enabled but not runnable for this model until schemas are generated.\n\nNon-train actions such as `evaluate`, `inference`, `export`, and deploy flows stay in this model skill. The per-run `automl_policy` override does not change model metadata.\n\n## Training Requirements\n\n- **Dataset type:** optical_inspection\n- **Formats:** default\n- **Monitoring metric:** val_acc\n\n### Per-Action Dataset Requirements\n\n| Action | Spec Key | Source | Files | List? |\n|---|---|---|---|---|\n| evaluate | dataset.test_dataset.images_dir | eval_dataset | images.tar.gz | No |\n| evaluate | dataset.test_dataset.csv_path | eval_dataset | dataset.csv | No |\n| inference | dataset.infer_dataset.images_dir | inference_dataset | images.tar.gz | No |\n| inference | dataset.infer_dataset.csv_path | inference_dataset | dataset.csv | No |\n| train | dataset.train_dataset.images_dir | train_datasets | images.tar.gz | No |\n| train | dataset.train_dataset.csv_path | train_datasets | dataset.csv | No |\n| train | dataset.validation_dataset.images_dir | eval_dataset | images.tar.gz | No |\n| train | dataset.validation_dataset.csv_path | eval_dataset | dataset.csv | No |\n| train | dataset.test_dataset.images_dir | eval_dataset | images.tar.gz | No |\n| train | dataset.test_dataset.csv_path | eval_dataset | dataset.csv | No |\n\n### Typical Spec Overrides\n\nData source overrides are **mandatory for every action** — the agent MUST construct data source paths from the Per-Action Dataset Requirements table above and include them in `spec_overrides`.\n\n```python\nS3_TRAIN = \"s3:\u002F\u002Fbucket\u002Fdata\u002Ftrain\"\nS3_EVAL = \"s3:\u002F\u002Fbucket\u002Fdata\u002Feval\"\nS3_INFERENCE = \"s3:\u002F\u002Fbucket\u002Fdata\u002Finference\"\n```\n\n**train (mandatory data sources):**\n```python\n{\n    \"train.num_epochs\": 30,\n    \"train.checkpoint_interval\": 10,\n    \"train.validation_interval\": 10,\n    \"train.num_gpus\": 1,\n    \"dataset.batch_size\": 8,\n    \"dataset.train_dataset.images_dir\": f\"{S3_TRAIN}\u002Fimages.tar.gz\",\n    \"dataset.train_dataset.csv_path\": f\"{S3_TRAIN}\u002Fdataset.csv\",\n    \"dataset.validation_dataset.images_dir\": f\"{S3_EVAL}\u002Fimages.tar.gz\",\n    \"dataset.validation_dataset.csv_path\": f\"{S3_EVAL}\u002Fdataset.csv\",\n    \"dataset.test_dataset.images_dir\": f\"{S3_EVAL}\u002Fimages.tar.gz\",\n    \"dataset.test_dataset.csv_path\": f\"{S3_EVAL}\u002Fdataset.csv\",\n}\n```\n\n**evaluate (mandatory data sources):**\n```python\n{\n    \"evaluate.checkpoint\": \"\u003Cselected train\u002FAutoML checkpoint>\",\n    \"dataset.test_dataset.images_dir\": f\"{S3_EVAL}\u002Fimages.tar.gz\",\n    \"dataset.test_dataset.csv_path\": f\"{S3_EVAL}\u002Fdataset.csv\",\n}\n```\n\nUse the workflow's checkpoint resolver for downstream actions instead of guessing a filename. For Optical Inspection smoke runs, AutoML may produce `model_epoch_000_step_00006.pth`; resume can then produce `model_epoch_001_step_00012.pth`. Best-checkpoint actions should use the AutoML best child job's selected checkpoint, epoch-specific actions should pass the exact epoch\u002Fstep checkpoint requested, and only explicit \"latest\" requests should resolve to the latest checkpoint.\n\n**export:**\n```python\n{\n    \"export.checkpoint\": \"\u003Cselected train\u002FAutoML checkpoint>\",\n    \"export.onnx_file\": \"\u002Fresults\u002Foptical_inspection.onnx\",\n    \"export.input_width\": 128,\n    \"export.input_height\": 512,\n    \"export.batch_size\": 1,\n}\n```\n\n**inference (mandatory data sources):**\n```python\n{\n    \"inference.checkpoint\": \"\u003Cselected train\u002FAutoML checkpoint>\",\n    \"dataset.infer_dataset.images_dir\": f\"{S3_INFERENCE}\u002Fimages.tar.gz\",\n    \"dataset.infer_dataset.csv_path\": f\"{S3_INFERENCE}\u002Fdataset.csv\",\n}\n```\n\n## Dataset Convert\n\nDataset conversion is optional for Optical Inspection. If the dataset is already in TAO-ready Optical Inspection format, start directly from the `images.tar.gz` plus `dataset.csv` splits and run `train`, `evaluate`, `inference`, and downstream checkpoint\u002Fexport\u002Fdeploy actions on that converted data.\n\nThe PyT container exposes `optical_inspection dataset_convert`, but this model skill does not package a `dataset_convert` action\u002Ftemplate. The converter expects the raw Factory PCB layout (`root_dataset_dir`, train\u002Fval\u002Fall PCB directories, `golden_csv_dir`, `project_name`, and `bot_top`). The S3 validation bucket currently contains preconverted Optical Inspection `images.tar.gz` plus `dataset.csv` splits, not the raw PCB\u002Fgolden CSV source. Do not synthesize a fake PCB dataset. In model validation reports, mark dataset conversion as `not run: preconverted dataset provided` rather than failed or blocked when only converted data is available.\n\nWhen using the preconverted S3 validation tarballs locally, verify the extracted directory before writing specs. The tarballs may unpack an `images\u002F` wrapper directory; point `dataset.*.images_dir` at the inner directory that contains `golden\u002F` and the board\u002Fimage folders referenced by `dataset.csv`, for example `...\u002F\u003Csplit>\u002Fimages\u002Fimages`, not the outer wrapper.\n\n## Eval Dataset\n\nOptional. Eval dataset uses same format (images + CSV).\n\n## Important Parameters\n\n- **model.model_type**: Siamese variant. Options include Siamese, Siamese_3.\n- **model.model_backbone**: Default custom.\n- **model.embedding_vectors**: Number of embedding dimensions. Default 5.\n- **train.optim.lr**: Learning rate. Default 5e-4.\n- **dataset.batch_size**: Training batch size. Must be greater than 1; use `2` or higher for minimal smoke runs.\n- **dataset.num_input**: Number of input images per comparison.\n- **dataset.input_map**: Mapping of input channels \u002F image pairs.\n\n## Multi-GPU \u002F Multi-Node\n\n**Launch method:** Lightning-managed (single `python` process, Lightning spawns workers).\n\n| Spec Key | Description | Default |\n|----------|-------------|---------|\n| `train.num_gpus` | Number of GPUs | 1 |\n| `train.gpu_ids` | GPU device indices | [0] |\n\n- Strategy: `auto` (Lightning picks best strategy automatically)\n- No explicit `num_nodes` or `distributed_strategy` config — single-node only\n- Lightweight Siamese network, single GPU typically sufficient\n\n## Hardware\n\nMinimum 1 GPU(s), recommended 1 GPU(s). 8GB+ VRAM per GPU. Siamese networks for inspection are lightweight. Single GPU sufficient.\n\n## Error Patterns\n\n**CSV format error**: Ensure dataset.csv has the correct column format for image pair paths and labels.\n\n**Extracted image root mismatch**: If train, evaluate, or inference cannot find paths from `dataset.csv`, inspect the extracted `images.tar.gz` tree. The TAO-ready root must contain `golden\u002F` plus the board folders referenced in the CSV. For validation S3 tarballs this can be one level below the extraction target, such as `images\u002Fimages`.\n\n**Training batch size assertion**: The Optical Inspection dataloader rejects\n`dataset.batch_size: 1` for train. Keep the template default of 8 for normal\nruns, or set `dataset.batch_size: 2` for minimal AutoML smoke validation.\n\n**PyTorch checkpoint load failure on downstream actions**: For checkpoints\nproduced by the same trusted TAO train\u002FAutoML workflow, set\n`TORCH_FORCE_NO_WEIGHTS_ONLY_LOAD=1` for evaluate, inference, export, and\nresume jobs if the current PyTorch default blocks loading the full checkpoint.\nDo not use this env var for untrusted checkpoints.\n\n## Spec Param \u002F Parent Model Inference\n\nModel-specific inference mappings belong in this MD file, not in `config.json`. Generated runners should read this section and apply the mappings with SDK helpers before `create_job()`. This mirrors the old microservices `infer_params.py` flow.\n\nInference mappings from TAO Core `optical_inspection.config.json`:\n\n| Action | Spec Field | Inference Function | Meaning |\n|---|---|---|---|\n| evaluate | `encryption_key` | `key` | encryption key |\n| evaluate | `evaluate.checkpoint` | `parent_model` | model file inferred from the parent job results folder |\n| evaluate | `results_dir` | `output_dir` | current job results directory |\n| export | `encryption_key` | `key` | encryption key |\n| export | `export.checkpoint` | `parent_model` | model file inferred from the parent job results folder |\n| export | `export.onnx_file` | `create_onnx_file` | output ONNX path |\n| export | `results_dir` | `output_dir` | current job results directory |\n| inference | `encryption_key` | `key` | encryption key |\n| inference | `inference.checkpoint` | `parent_model` | model file inferred from the parent job results folder |\n| inference | `inference.trt_engine` | `parent_model` | model file inferred from the parent job results folder |\n| inference | `results_dir` | `output_dir` | current job results directory |\n| train | `encryption_key` | `key` | encryption key |\n| train | `results_dir` | `output_dir` | current job results directory |\n| train | `train.pretrained_model_path` | `ptm_if_no_resume_model` | PTM when no resume checkpoint exists |\n| train | `train.resume_training_checkpoint_path` | `resume_model` | model file inferred from the current job results folder |\n\nFor `parent_model` or `parent_model_folder`, pass the upstream train\u002Fexport\u002FAutoML child job id as `parent_job_id`. The SDK lists the parent result folder, filters checkpoint artifacts, and returns the selected model file or folder. Do not add these mappings back to `config.json` and do not patch generated runner scripts to guess checkpoint paths.\n\n## Deployment\n\n- [tao-deploy-optical-inspection](references\u002Ftao-deploy-optical-inspection.md)\n",{"name":5,"tags":24,"license":15,"metadata":27,"description":7,"allowed-tools":30,"compatibility":31},[25,26],"defect","detection",{"author":28,"version":29},"NVIDIA Corporation","0.1.0","Read Bash","Requires docker + nvidia-container-toolkit.","main","be3de0244dc1a57e323d8160787ebb40fb64930e","public\u002Fapi\u002Fskills\u002Fnvidia\u002Ftao-train-optical-inspection","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main","https:\u002F\u002Fskills.x402.wtf","https:\u002F\u002Fgithub.com\u002FSolizardking","https:\u002F\u002Fmusebook.trade","Got a mile high and never came down","2026-10-08 23:20:13",{"source":8,"skillName":5,"commands":42,"prompt":52,"zipAvailable":53},[43,46,49],{"tool":44,"command":45},"npx","npx skills add Solizardking\u002Fskillhub-main --skill tao-train-optical-inspection",{"tool":47,"command":48},"bunx","bunx skills add Solizardking\u002Fskillhub-main --skill tao-train-optical-inspection",{"tool":50,"command":51},"pnpm","pnpm dlx skills add Solizardking\u002Fskillhub-main --skill tao-train-optical-inspection","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Ftao-train-optical-inspection\u002FSKILL.md",true,[55,61,65,69,73,77,81,85,89,93,97,101,105],{"path":56,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":59,"sourceHtmlUrl":60},"BENCHMARK.md","REFERENCE","参考文档",4131,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Ftao-train-optical-inspection\u002FBENCHMARK.md",{"path":62,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":63,"sourceHtmlUrl":64},"metadata.json",657,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Ftao-train-optical-inspection\u002Fmetadata.json",{"path":66,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":67,"sourceHtmlUrl":68},"references\u002Fskill_info.yaml",4920,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Ftao-train-optical-inspection\u002Freferences\u002Fskill_info.yaml",{"path":70,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":71,"sourceHtmlUrl":72},"references\u002Fspec_template_deploy_experiment.yaml",1561,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Ftao-train-optical-inspection\u002Freferences\u002Fspec_template_deploy_experiment.yaml",{"path":74,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":75,"sourceHtmlUrl":76},"references\u002Fspec_template_evaluate.yaml",2061,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Ftao-train-optical-inspection\u002Freferences\u002Fspec_template_evaluate.yaml",{"path":78,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":79,"sourceHtmlUrl":80},"references\u002Fspec_template_export.yaml",2149,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Ftao-train-optical-inspection\u002Freferences\u002Fspec_template_export.yaml",{"path":82,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":83,"sourceHtmlUrl":84},"references\u002Fspec_template_gen_trt_engine.yaml",2336,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Ftao-train-optical-inspection\u002Freferences\u002Fspec_template_gen_trt_engine.yaml",{"path":86,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":87,"sourceHtmlUrl":88},"references\u002Fspec_template_inference.yaml",2062,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Ftao-train-optical-inspection\u002Freferences\u002Fspec_template_inference.yaml",{"path":90,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":91,"sourceHtmlUrl":92},"references\u002Fspec_template_train.yaml",1936,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Ftao-train-optical-inspection\u002Freferences\u002Fspec_template_train.yaml",{"path":94,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":95,"sourceHtmlUrl":96},"references\u002Ftao-deploy-optical-inspection.md",5640,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Ftao-train-optical-inspection\u002Freferences\u002Ftao-deploy-optical-inspection.md",{"path":98,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":99,"sourceHtmlUrl":100},"references\u002Ftao-deploy-optical-inspection.skill_info.yaml",3563,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Ftao-train-optical-inspection\u002Freferences\u002Ftao-deploy-optical-inspection.skill_info.yaml",{"path":102,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":103,"sourceHtmlUrl":104},"skill-card.md",3788,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Ftao-train-optical-inspection\u002Fskill-card.md",{"path":106,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":107,"sourceHtmlUrl":108},"verification.json",3296,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Ftao-train-optical-inspection\u002Fverification.json",[110,118,125,132,139,147],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":114,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":19},"01M78E0TGCAMNPS207BA3G07S7","zkrouter","Self-hosted OpenAI-compatible LLM router — smart tier-based routing, ZK-stamped routing decisions, mode overrides, free OpenRouter at install via the Birth bot. Save 60-80% on inference costs by routing to the cheapest capable model across 12+ OpenRouter models.","MIT","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fzkrouter\u002FSKILL.md",[],[],{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":114,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":19},"01M78E0R1Z8BDT6EDTHY17MTNB","zk","For custom ZK Solana programs and privacy-preserving applications to prevent double spending. Guide to integrate rent-free nullifier PDAs for double-spend prevention.","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fzk\u002FSKILL.md",[],[],{"skillNo":126,"name":127,"nameZh":6,"description":128,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":114,"licenseFileUrl":6,"sourceHtmlUrl":129,"categories":130,"keywords":131,"publishedAt":19},"01M78E0P3ZTZ1YWF8MD5MM23QE","zk-omni-messaging","Zero-knowledge omnichain messaging between Robinhood Chain and Solana using CheshireZkOmniMessenger (msgType 4) with nullifier anti-replay and the zk-omni-relayer service.","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fzk-omni-messaging\u002FSKILL.md",[],[],{"skillNo":133,"name":134,"nameZh":6,"description":135,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":114,"licenseFileUrl":6,"sourceHtmlUrl":136,"categories":137,"keywords":138,"publishedAt":19},"01M78E0JXZ2PNB1896VXAGDBWD","zerion-wallet-data","Use when the user asks to check a wallet's portfolio, token balances, DeFi positions, PnL, transaction history, or NFTs. Provides interpreted on-chain data across 40+ EVM chains and Solana via x402 pay-per-request or API key — no raw RPC decoding needed.","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fzerion-wallet-data\u002FSKILL.md",[],[],{"skillNo":140,"name":141,"nameZh":6,"description":142,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":114,"licenseFileUrl":143,"sourceHtmlUrl":144,"categories":145,"keywords":146,"publishedAt":19},"01M78E0G14FH9GRRTQYMKD5E59","youtube-clipper","YouTube 视频智能剪辑工具。下载视频和字幕，AI 分析生成精细章节（几分钟级别）， 用户选择片段后自动剪辑、翻译字幕为中英双语、烧录字幕到视频，并生成总结文案。 使用场景：当用户需要剪辑 YouTube 视频、生成短视频片段、制作双语字幕版本时。 关键词：视频剪辑、YouTube、字幕翻译、双语字幕、视频下载、clip video","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fyoutube-clipper\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fyoutube-clipper\u002FSKILL.md",[],[],{"skillNo":148,"name":149,"nameZh":6,"description":150,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":114,"licenseFileUrl":6,"sourceHtmlUrl":151,"categories":152,"keywords":153,"publishedAt":19},"01M78E0C2ZYA99CFFDNB7ZMK5S","yield-optimization","Multi-chain yield optimization via yield.xyz (StakeKit). Discover 2,988+ yield opportunities across 75+ blockchains, build deposit\u002Fwithdrawal transactions with shell scripts, and sign them with a MoonPay wallet. Use when the user wants to earn yield, find the best lending or staking rate, enter\u002Fexit a position, or check portfolio balances.","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fyield-optimization\u002FSKILL.md",[],[]]