AGENT SKILL

loading-local-hub

Load datasets from the Hub, local files, packaged builders, Python objects, generators, and disk snapshots while choosing safe offline or authenticated network paths.

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

01 前言 Front Matter

name
loading-local-hub
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Load datasets from the Hub, local files, packaged builders, Python objects, generators, and disk snapshots while choosing safe offline or authenticated network paths.
disable-model-invocation
true

02 资源文件 4

03 SKILL.md 正文

Loading Local and Hub Datasets

Use this sub-skill when the task is to get data into datasets before transformation: Hub repositories, local files/directories, packaged modules such as csv or json, Python-native objects, generator functions, or snapshots previously written with save_to_disk.

Choose the Loading Path

  • Hub dataset: use load_dataset("namespace/name", name=..., split=..., revision=..., token=...); read loading workflows for revision, token, and offline boundaries.
  • Local files or directories: use a packaged module such as csv, json, parquet, text, imagefolder, or audiofolder with explicit data_files or data_dir; read loading workflows.
  • Inspect before loading: use load_dataset_builder(...) to inspect configs, features, and splits before materializing rows; read API reference.
  • Already saved snapshot: use load_from_disk(dataset_path, storage_options=...) for directories produced by save_to_disk; read API reference.
  • In-memory or generated data: use Dataset.from_dict, Dataset.from_list, Dataset.from_pandas, Dataset.from_generator, or DatasetDict; read API reference.

Safety Boundaries

  • Treat Hub access, remote URLs in data_files, and uncached revisions as network operations; avoid them unless the user expects network access.
  • Never print or persist Hub tokens. Prefer token=True only when the user has authenticated locally; pass a token value only from a secret manager or environment variable.
  • Prefer explicit revision for reproducibility and explicit data_files mappings for deterministic splits.
  • For transformations, streaming iteration patterns, batching, filtering, or maps, route to ../processing-streaming/SKILL.md.
  • For feature schemas, casting, media decoding, and output formats, route to ../features-formats/SKILL.md.
  • For cache cleanup, push/share operations, and datasets-cli, route to ../sharing-cli-cache/SKILL.md.

Bundled Helper

Run scripts/create_local_loading_fixture.py to create a tiny local multi-split CSV fixture and optional example snippets. This is safe and self-contained; it does not import datasets, access the network, or depend on the source checkout.

Troubleshooting

Read troubleshooting when loading fails due to missing files, ambiguous split inference, config selection, private Hub auth, offline mode, local format inference, load_from_disk path mistakes, or storage_options for remote filesystems.

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