Loading...
Loading...
Compare original and translation side by side
siamese_scoredocker runtao_toolkit.data_servicesversions.yaml<category> <action> [hydra overrides...]gap_analysis vcn_aoi key=value …gap_analysis vcn_aoidocker run --rm "$DS_IMAGE" gap_analysis vcn_aoi --cfg=jobreferences/troubleshooting.mdkpi_gaps.parquetsiamese_scoreversions.yamltao_toolkit.data_servicesdocker run<category> <action> [hydra overrides...]gap_analysis vcn_aoi key=value …gap_analysis vcn_aoidocker run --rm "$DS_IMAGE" gap_analysis vcn_aoi --cfg=jobreferences/troubleshooting.mdkpi_gaps.parquetinference/inference.csvinput_pathobject_namelabelsiamese_scoreinference/latest/dataset.classify.input_mapdataset.classify.image_extkpi_media_pathinput_pathmin_recalltop_k_per_labelthresholdmin_recall=1.0top_k_per_label=50threshold=-1.0top_k_per_labelmin_recall=1.0references/parameters-and-artifacts.mdGapAnalysisConfiginference/inference.csvinput_pathobject_namelabelsiamese_scoreinference/latest/dataset.classify.input_mapdataset.classify.image_extkpi_media_pathinput_pathmin_recalltop_k_per_labelthresholdmin_recall=1.0top_k_per_label=50threshold=-1.0top_k_per_labelmin_recall=1.0GapAnalysisConfigreferences/parameters-and-artifacts.mdtao_toolkit.data_servicesversions.yamlundefinedversions.yamltao_toolkit.data_servicesundefined
`TAO_SKILL_BANK_PATH` is exported by the plugin's `session_start` hook. If it is unset (e.g. running outside the Claude Code plugin), point it at the skill-bank repo root before resolving.
A GPU is required (the same image is used across the AOI loop and other actions assume CUDA is present). Aborting early on a GPU-less host saves a confusing late error.
**Path mounting.** Every host path the container reads or writes — `inference.csv`, the train YAML, the dataset image root, and the output dir — must be bind-mounted. The simplest pattern is to mount the workspace root with **identical paths** inside and outside the container so absolute paths in args resolve the same on both sides:
```bash
WORKSPACE=<absolute path that contains inference.csv, train YAML, dataset images, and the output dir>
DOCKER="docker run --gpus all --rm --ipc=host --user $(id -u):$(id -g) -v $WORKSPACE:$WORKSPACE -w $WORKSPACE $DS_IMAGE"inference.csv-vmin_recalltop_k_per_labelthresholdmin_recall=1.0top_k_per_label=50threshold=-1.0-e <spec>--cfg=job
`TAO_SKILL_BANK_PATH`由插件的`session_start`钩子导出。如果未设置(例如在Claude Code插件外运行),请在解析前将其指向skill-bank仓库根目录。
必须使用GPU(AOI循环和其他操作均假设CUDA可用,因此同一镜像会被复用)。在无GPU的主机上提前终止运行可避免后续出现令人困惑的错误。
**路径挂载**。容器需要读取或写入的所有主机路径——`inference.csv`、训练YAML文件、数据集图像根目录和输出目录——都必须进行绑定挂载。最简单的方式是将工作区根目录以**内外路径一致**的方式挂载,这样参数中的绝对路径在容器内外均可解析:
```bash
WORKSPACE=<包含inference.csv、训练YAML、数据集图像和输出目录的绝对路径>
DOCKER="docker run --gpus all --rm --ipc=host --user $(id -u):$(id -g) -v $WORKSPACE:$WORKSPACE -w $WORKSPACE $DS_IMAGE"inference.csv-vmin_recalltop_k_per_labelthresholdmin_recall=1.0top_k_per_label=50threshold=-1.0-e <spec>--cfg=jobdocker rundocker run$DOCKER gap_analysis vcn_aoi \
inference_results_dir=<exp_dir>/inference/<label>/ \
train_config=<exp_dir>/train.yaml \
kpi_media_path=<dataset_root> \
results_dir=<rca_results_dir> \
top_k_per_label=50Always pass. This is the argument that switches the container from the default "samples below threshold" filter into proper top-K-per-label ranking. Attop_k_per_labelthe threshold is by construction at-or-below every NO_PASS score, so the below-threshold filter returns ONLY misclassified PASS rows and zero NO_PASS rows — useless as an augmentation queue. Withmin_recall=1.0set to a positive integer (either in the spec or as a Hydra override), the container computes signed weakness against the threshold for every row and surfaces the K weakest per ground-truth label, which is the per-label ranked output downstream steps consume.top_k_per_label
siamese_scoremin_recall1e-12top_k_per_labelreferences/parameters-and-artifacts.mdunreachable_kpi.txtresults_dirresults_dirkpi_gaps.parquetfilepathlabelsiamese_scoreweaknessthreshold.txtmetrics.jsonweak_samples_breakdown.txtunreachable_kpi.txtreferences/parameters-and-artifacts.md$DOCKER gap_analysis vcn_aoi \
inference_results_dir=<exp_dir>/inference/<label>/ \
train_config=<exp_dir>/train.yaml \
kpi_media_path=<dataset_root> \
results_dir=<rca_results_dir> \
top_k_per_label=50务必传入。该参数用于将容器从默认的“阈值以下样本”过滤模式切换为正确的“按标签选择top-K”排名模式。当top_k_per_label时,所选阈值必然小于或等于所有NO_PASS样本的分数,因此阈值以下过滤模式仅会返回分类错误的PASS样本,无NO_PASS样本——这对于增强队列来说毫无用处。将min_recall=1.0设置为正整数(在配置文件中或作为Hydra覆盖参数)后,容器会计算每个样本相对于阈值的符号弱点评分,并展示每个真实标签下的K个最弱样本,这正是下游步骤所需的按标签排名输出。top_k_per_label
siamese_scoremin_recall1e-12top_k_per_labelreferences/parameters-and-artifacts.mdresults_dirunreachable_kpi.txtresults_dirkpi_gaps.parquetfilepathlabelsiamese_scoreweaknessthreshold.txtmetrics.jsonweak_samples_breakdown.txtunreachable_kpi.txtreferences/parameters-and-artifacts.mdunreachable_kpi.txtresults_dirkpi_gaps.parquetlabel == 'PASS'weaknesslabel != 'PASS'kpi_gaps.parquetfilepath<results_dir>/rca_images/results_dirunreachable_kpi.txtkpi_gaps.parquetlabel == 'PASS'weaknesslabel != 'PASS'kpi_gaps.parquetfilepath<results_dir>/rca_images/references/recipe.mdreferences/recipe.md<experiment_result_dir>/rca_results/YYYY-MM-DD_HHMMSS/kpi_gaps.parquetthreshold.txtmetrics.jsonweak_samples_breakdown.txtunreachable_kpi.txtrca_images/rca_config/claude_session.jsonlRCA_Report.mdreferences/parameters-and-artifacts.mddate +%Y-%m-%d_%H%M%S<experiment_result_dir>/rca_results/YYYY-MM-DD_HHMMSS/kpi_gaps.parquetthreshold.txtmetrics.jsonweak_samples_breakdown.txtunreachable_kpi.txtrca_images/RCA_Report.mdrca_config/claude_session.jsonlreferences/parameters-and-artifacts.mddate +%Y-%m-%d_%H%M%Stop_k_per_labelmin_recall=1.0kpi_gaps.parquettop_k_per_label$WORKSPACE???unreachable_kpi.txtinference.csvkpi_media_pathreferences/troubleshooting.mdmin_recall=1.0top_k_per_labelkpi_gaps.parquettop_k_per_label$WORKSPACE???unreachable_kpi.txtinference.csvkpi_media_pathreferences/troubleshooting.mdmetrics.jsonkpi_gaps.parquetunreachable_kpi.txtreferences/rca-report-structure.mdmetrics.jsonkpi_gaps.parquetunreachable_kpi.txtreferences/rca-report-structure.mdDS_IMAGEversions.yamlimages.tao_toolkit.data_servicesdocker infonvidia-smidocker image inspect "$DS_IMAGE"date +%Y-%m-%d_%H%M%S<experiment_result_dir>/rca_results/<timestamp>/vcn_aoi_spec.yamlmin_recalltop_k_per_label$WORKSPACE-edocker run … "$DS_IMAGE" gap_analysis vcn_aoi -e vcn_aoi_spec.yaml inference_results_dir=… train_config=… kpi_media_path=… output_dir=…kpi_gaps.parquetthreshold.txtmetrics.jsonweak_samples_breakdown.txtresults_dirunreachable_kpi.txtkpi_gaps.parquetrca_images/RCA_Report.mdversions.yamlimages.tao_toolkit.data_servicesDS_IMAGEdocker infonvidia-smidocker image inspect "$DS_IMAGE"date +%Y-%m-%d_%H%M%S<experiment_result_dir>/rca_results/<timestamp>/vcn_aoi_spec.yamlmin_recalltop_k_per_label$WORKSPACE-edocker run … "$DS_IMAGE" gap_analysis vcn_aoi -e vcn_aoi_spec.yaml inference_results_dir=… train_config=… kpi_media_path=… output_dir=…kpi_gaps.parquetthreshold.txtmetrics.jsonweak_samples_breakdown.txtresults_dirunreachable_kpi.txtkpi_gaps.parquetrca_images/RCA_Report.md