tao-validate-dataset-format

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Validate a TAO DAFT Dataset

验证TAO DAFT数据集

Quick start

快速开始

bash
tao-daft validate <format> --path <dataset-or-parent-dir>
<format>
is a positional subcommand (e.g.
metropolis-v3.0
,
cosmos-reason-v1.0
);
--path
is required. Discover supported formats and per-format flags via
tao-daft validate --help
and the leaf
--help
(see "CLI conventions" below).
bash
tao-daft validate <format> --path <dataset-or-parent-dir>
<format>
是一个位置子命令(例如
metropolis-v3.0
cosmos-reason-v1.0
);
--path
为必填项。可通过
tao-daft validate --help
以及子命令的
--help
(见下文“CLI约定”)查看支持的格式和各格式专属参数。

Preflight

预检查

bash
python -c "import nvidia_tao_daft" 2>/dev/null || {
  echo "MISSING: tao-daft not installed. Run:"
  echo "  pip install nvidia-tao-daft"
  exit 1
}
bash
python -c "import nvidia_tao_daft" 2>/dev/null || {
  echo "缺失依赖:tao-daft未安装。请运行:"
  echo "  pip install nvidia-tao-daft"
  exit 1
}

Quick Start

快速入门

Discover the installed validator formats before choosing a format slug, then run validation with the target passed through
--path
:
bash
tao-daft --version
tao-daft validate --help
tao-daft validate <format> --help
tao-daft validate <format> --path /path/to/daft-dataset
在选择格式标识前,先查看已安装的验证器格式,然后通过
--path
指定目标路径运行验证:
bash
tao-daft --version
tao-daft validate --help
tao-daft validate <format> --help
tao-daft validate <format> --path /path/to/daft-dataset

Purpose

用途

Drive
tao-daft validate
against a DAFT dataset (or a tree of them). The CLI is the spec; the skill picks subcommand + flags and explains the result.
Trigger when the user mentions "TAO DAFT", "DAFT format", validating a DAFT dataset, schema/cross-reference errors, or
tao-daft validate
. Do not trigger for non-DAFT layouts (COCO, YOLO, Data Factory JSONL), or for
tao-daft info
/
tao-daft convert
— those have their own skills.
If the user's opening is ambiguous, run a few
--help
commands first to ground yourself, then come back and confirm the task.
针对DAFT数据集(或数据集目录树)运行
tao-daft validate
命令。 CLI是权威规范;本技能会选择子命令和参数并解释执行结果。
当用户提及"TAO DAFT"、"DAFT格式"、验证DAFT数据集、模式/交叉引用错误或
tao-daft validate
时触发本技能。 请勿针对非DAFT格式(COCO、YOLO、Data Factory JSONL)或
tao-daft info
/
tao-daft convert
触发——这些场景有专属技能。
若用户的需求表述模糊,请先运行几次
--help
命令明确信息,再返回确认任务。

Prerequisites

前提条件

  • nvidia-tao-daft
    installed (
    pip install nvidia-tao-daft
    ; the wheel is enough, no source repo). Confirm with
    tao-daft --version
    .
  • A DAFT dataset, or a parent directory of them, on local disk.
  • 已安装
    nvidia-tao-daft
    (执行
    pip install nvidia-tao-daft
    ;仅需安装wheel包,无需源码仓库)。可通过
    tao-daft --version
    确认安装状态。
  • 本地磁盘上有DAFT数据集或其上级目录。

Instructions

操作说明

CLI conventions

CLI约定

tao-daft
is nested argparse subcommands. Names and flags drift across versions, so discover the current surface from
--help
rather than trusting any list in this doc.
  1. Format is a positional subcommand, not
    --format
    :
    tao-daft validate <format> [flags]
    . List current formats via
    tao-daft validate --help
    ; slugs look like
    metropolis-v3.0
    ,
    cosmos-reason-v1.0
    .
  2. Target is
    --path PATH
    , not positional. It accepts a single dataset/scene or a parent directory — the validator walks the tree.
  3. Flags are per-format; run the leaf help, e.g.
    tao-daft validate metropolis-v3.0 --help
    , before choosing them. Don't assume a flag from one format exists on another.
So the loop is:
tao-daft --version
tao-daft validate --help
→ pick format (infer if unspecified, see below) →
tao-daft validate <format> --help
→ run → interpret.
tao-daft
采用嵌套的argparse子命令结构。命令名称和参数会随版本变化,因此请通过
--help
查看当前可用命令
,而非依赖本文档中的列表。
  1. 格式是位置子命令,而非
    --format
    参数: 命令格式为
    tao-daft validate <format> [flags]
    。可通过
    tao-daft validate --help
    查看当前支持的格式;格式标识类似
    metropolis-v3.0
    cosmos-reason-v1.0
  2. 目标路径通过
    --path PATH
    指定
    ,而非位置参数。它接受单个数据集/场景或上级目录——验证器会遍历目录树。
  3. 参数为格式专属;在选择参数前,请运行子命令的帮助信息,例如
    tao-daft validate metropolis-v3.0 --help
    。 不要假设某一格式的参数在其他格式中存在。
操作流程为:
tao-daft --version
tao-daft validate --help
→ 选择格式(若未指定则推断,见下文)→
tao-daft validate <format> --help
→ 运行命令 → 解读结果。

Format inference

格式推断

Use directory markers, not filenames:
  • meta.json
    next to
    media/
    and
    text/
    cosmos-reason-v1.0
    .
  • A directory (or nested directories) containing
    contextual/
    , typically alongside
    raw/
    and
    task/
    metropolis-v3.0
    .
  • Neither marker present ⇒ ask the user; do not guess.
依据目录标识而非文件名推断格式:
  • meta.json
    media/
    text/
    同级 ⇒
    cosmos-reason-v1.0
    格式。
  • 目录(或嵌套目录)包含
    contextual/
    ,通常与
    raw/
    task/
    并存 ⇒
    metropolis-v3.0
    格式。
  • 上述标识均不存在 ⇒ 询问用户,请勿猜测。

Reading errors

错误解读

The CLI ends every run with a
VALIDATION RESULTS
block, then
✅ VALIDATION PASSED
or
❌ VALIDATION FAILED
, and exits non-zero on failure (safe to chain in scripts).
Output can be large on big trees — capture the full output to a file and read it in slices rather than scrolling inline.
CLI每次运行结束后都会输出
VALIDATION RESULTS
区块,随后显示
✅ VALIDATION PASSED
❌ VALIDATION FAILED
,验证失败时会返回非零退出码(可安全用于脚本链式调用)。
大型目录树的输出内容可能较多——建议将完整输出保存到文件中分段查看,而非直接滚动查看。

Limitations

局限性

  • Validates DAFT only. Non-DAFT layouts (COCO, YOLO, Data Factory JSONL, etc.) belong in the upstream converter skills.
  • Supported formats are whatever
    tao-daft validate --help
    reports for the installed version; older slugs may have been retired.
  • Covers
    validate
    only. Defer to the dedicated skills for
    tao-daft info
    and
    tao-daft convert
    .
  • Don't reimplement validation in Python; the CLI is the spec.
  • 仅支持验证DAFT格式。非DAFT格式(COCO、YOLO、Data Factory JSONL等)请使用上游转换工具技能。
  • 支持的格式取决于当前安装版本的
    tao-daft validate --help
    输出;旧版格式标识可能已被弃用。
  • 仅覆盖
    validate
    命令。
    tao-daft info
    tao-daft convert
    请使用专属技能。
  • 请勿用Python重实现验证逻辑;CLI是权威规范。

Troubleshooting

故障排除

  • tao-daft: command not found
    — wheel not installed in the active env.
    pip install nvidia-tao-daft
    ; verify
    tao-daft --version
    .
  • error: argument --path is required
    — path passed positionally. Move it behind
    --path
    .
  • invalid choice: '<format>'
    — slug isn't wired up in this version. Re-run
    tao-daft validate --help
    and pick from the list.
  • Auto-detection (raw type / contextual set) is wrong — override via the format's scope-restriction flag; discover the name from the leaf
    --help
    .
  • CI wants warnings to fail — add
    --strict
    .
  • tao-daft: command not found
    —— 未在当前环境中安装wheel包。执行
    pip install nvidia-tao-daft
    ;通过
    tao-daft --version
    验证安装。
  • error: argument --path is required
    —— 将路径作为位置参数传递了。请将路径移至
    --path
    参数后。
  • invalid choice: '<format>'
    —— 该格式标识在当前版本中未配置。重新运行
    tao-daft validate --help
    并从列表中选择。
  • 自动检测(原始类型/上下文集)错误 —— 通过格式的范围限制参数覆盖;参数名称可从子命令的
    --help
    中查看。
  • CI要求警告触发失败 —— 添加
    --strict
    参数。