tao-convert-dataset-format

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Convert a TAO DAFT Dataset

转换TAO DAFT数据集

Quick start

快速入门

bash
tao-daft convert <source-format> <target-format> --path <input> --output <output>
Source and target are positional subcommands;
--path
and
--output
are flags. Discover the supported formats and per-pair flags from the leaf
--help
(see "CLI conventions" below).
bash
tao-daft convert <source-format> <target-format> --path <input> --output <output>
源格式和目标格式是位置子命令;
--path
--output
是标志参数。可通过叶子节点的
--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 CLI surface before choosing format slugs, then run the leaf conversion command with explicit
--path
and
--output
flags:
bash
tao-daft --version
tao-daft convert --help
tao-daft convert <source-format> --help
tao-daft convert <source-format> <target-format> --path /path/to/daft --output /path/to/converted
在选择格式标识前,先查看已安装的CLI可用命令,然后使用明确的
--path
--output
标志参数运行叶子节点的转换命令:
bash
tao-daft --version
tao-daft convert --help
tao-daft convert <source-format> --help
tao-daft convert <source-format> <target-format> --path /path/to/daft --output /path/to/converted

Purpose

用途

Drives
tao-daft convert
to transform a DAFT dataset (or a tree of them) between supported formats. The CLI does the real work; the skill picks the right source/target pair and flags, then explains the result.
Trigger on: converting a DAFT dataset, packaging DAFT QA / summarization / temporal tasks for VLM training, producing a
meta.json
-style training set, or the command
tao-daft convert
. Do not trigger for non-DAFT → DAFT conversion (COCO, YOLO, Data Factory JSONL) — redirect to the upstream
nvidia-tao-daft
repo's converter skills.
If the user opens ambiguously, run a few
--help
calls first.
通过
tao-daft convert
将单个DAFT数据集(或数据集目录树)在支持的格式之间转换。实际工作由CLI完成;本技能负责选择正确的源/目标格式对和标志参数,并解释转换结果。
触发场景:转换DAFT数据集、为VLM训练打包DAFT QA/摘要/时序任务、生成
meta.json
风格的训练集,或执行
tao-daft convert
命令。请勿用于非DAFT到DAFT的转换(如COCO、YOLO、Data Factory JSONL)——请转用上游
nvidia-tao-daft
仓库的转换器技能。
如果用户的需求不明确,先运行几次
--help
命令来获取信息。

Prerequisites

前提条件

  • nvidia-tao-daft
    installed (wheel only, not the source repo). Confirm with
    tao-daft --version
    .
  • A DAFT dataset, or a parent directory containing many, on local disk.
  • 已安装
    nvidia-tao-daft
    (仅支持wheel包,不支持源码仓库)。可通过
    tao-daft --version
    确认。
  • 本地磁盘上有一个DAFT数据集,或包含多个DAFT数据集的父目录。

Instructions

操作说明

CLI conventions

CLI 约定

tao-daft
is nested argparse subcommands. The conventions below are stable across versions even when format names or flags change, so always discover the current surface from
--help
rather than relying on names this doc happens to mention.
  1. Source and target are both positional subcommands, not
    --from
    /
    --to
    :
    tao-daft convert <source> <target> [flags]
    . Format slugs are versioned, lowercase, dot-separated (
    metropolis-v3.0
    ,
    cosmos-reason-v1.0
    , ...).
  2. Path and output are flags
    --path PATH
    (source),
    --output OUTPUT
    (destination). Both required at the leaf; passing positionally fails.
  3. --path
    accepts both granularities
    — a single scene/dataset or a parent directory; the converter walks the tree.
  4. Per-pair flags live at the leaf — flag sets differ between targets (e.g. media-handling). Always check the leaf
    --help
    .
Operating procedure:
  1. tao-daft --version
    — confirm install, pin version in any report.
  2. tao-daft convert --help
    — list supported source formats.
  3. tao-daft convert <source> --help
    — list valid targets for that source.
  4. Infer source from layout (same directory markers as the
    tao-validate-dataset-format
    skill's "Format inference"). If you cannot infer or the target is unspecified, ask.
  5. tao-daft convert <source> <target> --help
    — pick flags for the user's intent (task subset, media copy vs reference, metadata).
  6. Execute, then interpret (see below).
tao-daft
采用嵌套式argparse子命令。以下约定在版本更新时保持稳定,即使格式名称或标志参数发生变化,也请始终通过
--help
查看当前可用命令,而非依赖本文档中提到的名称
  1. 源格式和目标格式均为位置子命令,而非
    --from
    /
    --to
    tao-daft convert <source> <target> [flags]
    。格式标识为版本化的小写点分隔字符串(如
    metropolis-v3.0
    cosmos-reason-v1.0
    等)。
  2. 路径和输出为标志参数——
    --path PATH
    (源路径)、
    --output OUTPUT
    (目标路径)。在叶子节点命令中两者均为必填项;若按位置传递会执行失败。
  3. --path
    支持两种粒度
    ——单个场景/数据集或父目录;转换器会遍历目录树。
  4. 各格式对的专属标志参数位于叶子节点——不同目标格式的标志参数集不同(如媒体处理相关参数)。请始终查看叶子节点的
    --help
操作流程:
  1. tao-daft --version
    ——确认安装情况,并在任何报告中记录版本号。
  2. tao-daft convert --help
    ——列出支持的源格式。
  3. tao-daft convert <source> --help
    ——列出该源格式对应的有效目标格式。
  4. 根据目录结构推断源格式(与
    tao-validate-dataset-format
    技能的“格式推断”使用相同的目录标记)。若无法推断或目标格式未指定,请询问用户。
  5. tao-daft convert <source> <target> --help
    ——根据用户的意图(任务子集、媒体复制 vs 引用、元数据)选择合适的标志参数。
  6. 执行命令,然后解读结果(见下文)。

Reading output

解读输出

Per-scene progress prints to stdout; non-zero exit on failure. The converted dataset is written under
--output
— spot-check it with the
tao-validate-dataset-format
skill before training. For large trees, capture the full output and partial-read if huge.
每个场景的转换进度会打印到标准输出;转换失败时会返回非零退出码。转换后的数据集会写入
--output
指定的路径——在训练前请使用
tao-validate-dataset-format
技能进行抽查。对于大型目录树,请捕获完整输出,若输出过大可部分读取。

Limitations

局限性

  • DAFT-supported source formats only. For non-DAFT layouts use the upstream repo's converter skills.
  • Supported pairs are whatever
    --help
    reports for the installed version — don't pass an unconfirmed pair.
  • Source and target are positional;
    --path
    /
    --output
    are flags.
  • convert
    only —
    validate
    and
    info
    have their own skills.
  • Do not reimplement conversion in Python; the CLI is the spec.
  • 仅支持DAFT兼容的源格式。对于非DAFT格式,请使用上游仓库的转换器技能。
  • 支持的格式对取决于已安装版本的
    --help
    输出——请勿使用未确认的格式对。
  • 源格式和目标格式为位置参数;
    --path
    /
    --output
    为标志参数。
  • 仅负责
    convert
    命令——
    validate
    info
    命令有各自对应的技能。
  • 请勿用Python重新实现转换逻辑;CLI是官方规范。

Troubleshooting

故障排除

  • tao-daft: command not found
    — wheel not installed;
    pip install nvidia-tao-daft
    , verify with
    tao-daft --version
    .
  • error: argument --path/--output is required
    — passed positionally; move behind the flag.
  • invalid choice: '<format>'
    — slug not wired up in this version. Re-run the relevant
    --help
    .
  • Output rejected by
    tao-daft validate
    — re-check per-pair flags (media handling, task subset) via leaf
    --help
    ; a misset flag often produces a structurally valid but semantically wrong target.
  • tao-daft: command not found
    ——未安装wheel包;请运行
    pip install nvidia-tao-daft
    ,并通过
    tao-daft --version
    验证。
  • error: argument --path/--output is required
    ——按位置传递了参数;请改为通过标志参数传递。
  • invalid choice: '<format>'
    ——该格式标识在当前版本中未配置。请重新运行对应的
    --help
    命令查看。
  • 输出被
    tao-daft validate
    拒绝
    ——通过叶子节点的
    --help
    重新检查各格式对的标志参数(媒体处理、任务子集);标志参数设置错误通常会生成结构有效但语义错误的目标数据集。