configuration-and-data
Build, validate, and troubleshoot RecBole Config objects, atomic datasets, load_col settings, and dataset/dataloader preparation flows.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- configuration-and-data
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Build, validate, and troubleshoot RecBole Config objects, atomic datasets, load_col settings, and dataset/dataloader preparation flows.
- disable-model-invocation
- true
02 资源文件 3
- 参考文档references/configuration-and-data.md13.9 KB
- 参考文档references/troubleshooting.md9.4 KB
- 脚本scripts/validate_atomic_dataset.py17.8 KB
03 SKILL.md 正文
RecBole Configuration and Data
Use this sub-skill when the user is working with RecBole configuration objects, YAML/dict/CLI overrides, atomic data files, dataset preprocessing, or split DataLoader creation. Keep the answer focused on creating or diagnosing the configuration/data layer; route model internals and training loops to siblings.
Trigger requests
- "prepare a RecBole dataset" or "convert my data to RecBole atomic files".
- "fix my
load_colconfig", "why is my.userfile ignored?", or "load an extra feature file". - "explain RecBole atomic files", including
.inter,.user,.item,.kg,.link, and.net. - "create a YAML config for sequential recommendation" or context-aware, knowledge-aware, social, or general data preparation.
- "why does
Configignore my value?" or any conflict among YAML,config_dict, command-line arguments, and defaults. - "split and save dataloaders" or "load saved dataloaders" without asking for a full training run.
- Data failures involving
data_path, missing dataset directories, missingfield:typeheader suffixes, delimiter mistakes, YAML/list quoting, GPU fallback, filtering/splitting knobs, or cache paths.
Quick workflow
-
Identify the task family: general, context-aware, knowledge-aware, sequential, or social. Use this to decide mandatory atomic files and the model/dataset defaults likely to be injected by
Config. -
Determine the expected RecBole dataset name. The directory should contain files named like
<dataset>.inter; for most non-bundled datasets,data_pathis the parent directory andConfigappends the dataset name. -
Construct the configuration with:
from recbole.config import Config config = Config( model="BPR", dataset="my_dataset", config_file_list=["config.yaml"], config_dict={"load_col": None}, ) -
Apply configuration priority exactly: command line
--key=valueoverridesconfig_dict, which overrides later values merged fromconfig_file_list, which overrides RecBole defaults. Ifmodelordatasetare passed directly toConfig, those constructor arguments select the final model/dataset. -
Validate atomic data before running RecBole. Use the bundled helper:
python scripts/validate_atomic_dataset.py /path/to/dataset-root/my_dataset \ --dataset my_dataset --task-family general -
If the user asks to build runtime objects, use the documented data flow:
from recbole.data import ( create_dataset, data_preparation, save_split_dataloaders, load_split_dataloaders, ) dataset = create_dataset(config) train_data, valid_data, test_data = data_preparation(config, dataset) save_split_dataloaders(config, (train_data, valid_data, test_data)) cached = load_split_dataloaders(config) -
For errors, first inspect the resolved values (
config["data_path"],config["load_col"],config["eval_args"],config["device"]) rather than assuming the YAML file won.
Config surfaces to cover here
- Five groups: environment, data, model, training, and evaluation. Discuss model
settings only as they affect data defaults; send model choice/customization to
models-and-customization. - Environment/data keys:
use_gpu,gpu_id,data_path,checkpoint_dir,save_dataset,dataset_save_path,save_dataloaders,dataloaders_save_path,field_separator,seq_separator,load_col,unload_col,unused_col,additional_feat_suffix,alias_of_user_id,alias_of_item_id,alias_of_entity_id,alias_of_relation_id, filtering knobs, benchmark/pre-split knobs, and the shape ofeval_args. - Training/evaluation keys only enough for routing and splits:
epochs, batch sizes,train_neg_sample_args,eval_args,metrics,topk,valid_metric,repeatable, and evaluation modes. Route full training, checkpointing, metrics interpretation, HyperTuning, Ray, and significance tests totraining-evaluation-and-tuning.
Atomic data rules to enforce
- Headers must use
field_name:field_type; valid types aretoken,token_seq,float, andfloat_seq. - Default column delimiter is a tab. Sequence-valued cells use the sequence separator, usually a single space.
- Mandatory files by task family:
- general:
.inter - context-aware:
.inter,.user,.item - knowledge-aware:
.inter,.kg,.link - sequential:
.inter - social:
.inter,.net
- general:
load_col: nullloads all existing standard files used by the dataset class. Ifload_colis a dict and a suffix is absent, RecBole treats that file as not loaded. Include every required source and field explicitly, or use"*"for all fields in a source.- Do not set
load_colandunload_colfor the same source in normal guidance.
Key references and helper
- See configuration-and-data.md for
config priority examples, atomic file tables,
load_colpatterns, dataset construction, saving, and loading. - See troubleshooting.md for symptom/cause/fix tables, including missing header type suffixes and override surprises.
- Use scripts/validate_atomic_dataset.py to check local atomic files without importing RecBole.
Boundaries and sibling routing
- Route actual model training/evaluation loops, checkpoint semantics, metric
selection strategy, HyperTuning, Ray integration, and statistical tests to
../training-evaluation-and-tuning/SKILL.md. - Route model family selection, custom models, trainers, samplers, dataloaders,
metrics, transforms, and extension APIs to
../models-and-customization/SKILL.md. - Do not ask a future agent to reopen RecBole source files for the topics in this sub-skill; the bundled references and script are the runtime evidence.
Answer checklist
Before finalizing a configuration/data answer, include:
- Expected dataset directory and file names.
- Minimal YAML or
config_dictwith correctly quoted lists/dicts. - Resolved priority explanation when values conflict.
load_colorunload_colbehavior for every required suffix.- Atomic header remediation if a file does not use
name:typecolumns. - Whether saved dataset/dataloader caches are being created, loaded, or ignored.
- Clear routing note if the user is really asking for training, tuning, or model customization.
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).