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
- 参考文档references/api-reference.md6.8 KB
- 参考文档references/loading-workflows.md6.6 KB
- 参考文档references/troubleshooting.md5.5 KB
- 脚本scripts/create_local_loading_fixture.py3.4 KB
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, oraudiofolderwith explicitdata_filesordata_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 bysave_to_disk; read API reference. - In-memory or generated data: use
Dataset.from_dict,Dataset.from_list,Dataset.from_pandas,Dataset.from_generator, orDatasetDict; 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=Trueonly when the user has authenticated locally; pass a token value only from a secret manager or environment variable. - Prefer explicit
revisionfor reproducibility and explicitdata_filesmappings 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
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.
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.
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.
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.
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.
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).