AGENT SKILL

input-output-formats

Choose and validate img2dataset input schemas, output formats, writer layouts, metadata sidecars, captions, hashes, additional columns, and TFRecord prerequisites.

License 许可
MIT
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
input-output-formats
license
MIT
metadata
{ "disco-role": "operating" }
description
Choose and validate img2dataset input schemas, output formats, writer layouts, metadata sidecars, captions, hashes, additional columns, and TFRecord prerequisites.
disable-model-invocation
true

02 资源文件 4

03 SKILL.md 正文

Input and Output Formats

Use this sub-skill when the task is about choosing, constructing, or auditing img2dataset input and output formats.

Trigger when the user asks about

  • Supported --input_format values or converting a URL table into an img2dataset input.
  • Non-default URL, caption, hash, or metadata columns (--url_col, --caption_col, --verify_hash, --save_additional_columns).
  • Using a folder of input files, shard sizing, skipped/done shards, or expected shard names.
  • Choosing --output_format among files, webdataset, parquet, tfrecord, and dummy.
  • Expected output layouts: per-image files, tar members, parquet metadata sidecars, stats JSON, captions, image bytes in parquet/TFRecord, and dummy benchmark outputs.
  • Auditing an existing output folder for missing images, captions, metadata columns, shard sidecars, or TFRecord prerequisites.

Route elsewhere

  • Core download retries, SSL, X-Robots-Tag behavior, incremental mode policy, and command orchestration belong to ../core-download/.
  • Resize modes, filters, encoding quality/format tradeoffs, re-encoding, and bounding-box blur belong to ../image-processing/.
  • PySpark/Ray, throughput tuning, DNS, filesystem performance, W&B, and cluster execution belong to ../distributed-execution/.

Short workflow

  1. Read data-formats to pick the exact --input_format, column mapping flags, folder behavior, hash verification columns, additional metadata columns, and shard sizing.

  2. Read output-formats to choose the writer and know the exact files/columns to expect after a run.

  3. For an existing output, run the bundled layout helper:

    python sub-skills/input-output-formats/scripts/inspect_output_layout.py \
      --output-folder out \
      --expected-format webdataset \
      --require-captions
    
  4. If the helper reports schema, caption, missing-column, optional-dependency, or filesystem-prefix problems, use troubleshooting before changing downloader, resize, or distributed settings.

Safe bundled helper

  • scripts/inspect_output_layout.py inspects a completed output folder without importing img2dataset. It lists shards, subfolders, tars, parquets, TFRecords, stats JSON, tar members, and parquet metadata columns when optional readers are installed. It exits nonzero for clear mismatches such as an expected writer layout not being present, dummy outputs containing image artifacts, or required captions being absent.

Common command fragments

# CSV with non-default URL/caption columns and extra metadata saved into output metadata.
img2dataset --url_list urls.csv --input_format csv \
  --url_col image_url --caption_col alt_text \
  --save_additional_columns '["license","source_id"]' \
  --output_format webdataset --output_folder out

# Parquet input with hash verification and parquet output containing image bytes.
img2dataset --url_list urls.parquet --input_format parquet \
  --url_col image_url --caption_col caption \
  --compute_hash md5 --verify_hash '["expected_md5","md5"]' \
  --output_format parquet --output_folder out

# Folder input: every file matching the selected extension is sharded in sorted order.
img2dataset --url_list input_parts --input_format jsonl.gz \
  --number_sample_per_shard 10000 --output_format webdataset --output_folder out

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351