인터페이스는 현지화되어 있으며, Skill 소개와 설명 문서는 선택한 언어로 AI가 자동 번역합니다. 코드·명령어·경로·전문 용어는 원문을 유지하며 원작자 문서가 우선합니다.
Skills 둘러보기
데이터 및 연구 · SKILL.md

input-output-formats

input-output-formats

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

Independent GitHub snapshot · Automated classification · Original documentation governs

Skill 문서

GitHub

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

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
저장한 Skills