AGENT SKILL

datasets

Use this skill when working with Hugging Face Datasets: loading local or Hub datasets, defining Features schemas, processing/streaming datasets, converting formats, sharing to the Hub, managing cache/offline behavior, or using datasets-cli.

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

01 前言 Front Matter

name
datasets
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Use this skill when working with Hugging Face Datasets: loading local or Hub datasets, defining Features schemas, processing/streaming datasets, converting formats, sharing to the Hub, managing cache/offline behavior, or using datasets-cli.
disable-model-invocation
true

02 资源文件 5

03 SKILL.md 正文

Hugging Face Datasets

Use this repo skill for practical work with the datasets Python package. It is self-contained guidance distilled from the Datasets source, docs, tests, and verified public API surface.

Start Here

  • Install the package with pip install datasets; add extras only for workflows that need them, such as datasets[audio], datasets[vision], datasets[pdfs], datasets[nibabel], or ML framework packages.
  • Run python -c "from datasets import Dataset, load_dataset; print(Dataset.from_dict({'x':[1]}))" for a minimal import/API smoke check.
  • Use load_dataset(...) for Hub datasets, local files, local dataset repositories, and packaged format builders.
  • Use Dataset.from_dict, Dataset.from_list, Dataset.from_pandas, or Dataset.from_generator when data already exists in Python.

Route by Task

  • Load datasets from the Hub, local files/directories, Python objects, generators, packaged modules, or disk snapshots with sub-skills/loading-local-hub/SKILL.md.
  • Transform, filter, batch, split, shuffle, stream, format, combine, or convert datasets with sub-skills/processing-streaming/SKILL.md.
  • Define Features, cast columns, troubleshoot schemas, and work with CSV/JSON/Parquet/Arrow/text/image/audio/video/PDF/NIfTI/mesh formats with sub-skills/features-formats/SKILL.md.
  • Push datasets to the Hub, create dataset cards, use datasets-cli, manage cache/offline mode, or diagnose filesystem/storage issues with sub-skills/sharing-cli-cache/SKILL.md.

Shared References and Scripts

  • Read references/api-surface.md for the verified top-level API map and the most important signatures.
  • Read references/troubleshooting.md for cross-cutting install, import, optional dependency, auth, cache, and workflow routing failures.
  • Read references/repo-provenance.md when checking whether this skill is stale relative to a Datasets checkout.
  • Run scripts/datasets_api_smoke.py --help for a safe local smoke helper that verifies import, core APIs, tiny in-memory processing, and CLI availability.

Common Decisions

  • Prefer explicit data_files, split, and features when automatic local file inference would be ambiguous.
  • Use streaming=True for large or remote data that should not be fully downloaded; route downstream iterable semantics to processing-streaming.
  • Use decode=False for media columns when optional decoders are unavailable or when you only need paths/bytes metadata.
  • Do not put tokens in code, logs, dataset cards, or generated examples; pass tokens through normal Hugging Face auth mechanisms.
  • Treat delete_from_hub and push_to_hub as state-changing operations; dry-run the plan and confirm repo IDs/config names before running them.

Validation Pattern

  1. Confirm the package imports and the relevant optional dependency is installed.
  2. Build or load a tiny representative dataset first.
  3. Declare Features when schema inference is risky.
  4. Run the intended map/filter/cast/format operation on a tiny subset.
  5. Save, reload, or push only after the local smoke path behaves as expected.

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