models-and-customization
Select RecBole model families and implement or diagnose custom RecBole models, trainers, dataloaders, samplers, and metrics.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- models-and-customization
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Select RecBole model families and implement or diagnose custom RecBole models, trainers, dataloaders, samplers, and metrics.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/customization-guide.md9.4 KB
- 参考文档references/model-families-and-selection.md8.3 KB
- 参考文档references/troubleshooting.md6.6 KB
- 脚本scripts/inspect_model_registry.py8.4 KB
03 SKILL.md 正文
RecBole Models And Customization
Use this sub-skill when the user asks which RecBole model family to use, why a model cannot be resolved, how to implement a custom recommender component, or how model choice constrains required data files and optional dependencies.
Route Here For
- Selecting among general, sequential, context-aware/CTR, knowledge-aware, and external-library models.
- Choosing examples such as
BPR,LightGCN,SASRec,GRU4Rec,FM,DeepFM,KGAT,KGIN,XGBoost, orLightGBM. - Diagnosing
get_model(model_name)orget_trainer(model_type, model_name)failures, including case-sensitive class names and missing property defaults. - Sketching or reviewing custom subclasses of
GeneralRecommender,SequentialRecommender,ContextRecommender, orKnowledgeRecommender. - Deciding whether a custom trainer, dataloader, sampler, or metric is needed.
Operating Workflow
- Classify the recommendation task. Use model-families-and-selection.md before suggesting a model. A CTR request with labels or side features is a context-aware task, not a plain general recommender, unless the user explicitly wants to ignore those features.
- Check data prerequisites early. General and sequential tasks are driven
by
.inter; CTR/context-aware tasks usually need.interlabels and may need.user/.item; knowledge-aware tasks need.inter,.kg, and.link. Route atomic-file schema, config priority, and validation details to the siblingconfiguration-and-datasub-skill. - Resolve the model registry. Prefer public class spellings such as
BPR,SASRec,FM,KGAT,XGBoost, andLightGBM. Use the bundled helperscripts/inspect_model_registry.pyto inspect an installed package without relying on a repository checkout. - For custom models, enforce the RecBole contract. Select the correct base
recommender, set
input_type, implement__init__,calculate_loss, andpredict, optionally implementfull_sort_predict, and read all custom hyperparameters fromconfig. See customization-guide.md. - For custom execution behavior, decide the extension point. Use a custom
trainer for optimization/evaluation loop changes, a dataloader for batch
structure changes, a sampler for negative-sampling policy changes, and a
metric for evaluator output changes. Route actual fitting, evaluation, HPO,
checkpoints, and case-study execution to
training-evaluation-and-tuning. - Troubleshoot from the symptom. Use
troubleshooting.md for model-name,
dependency,
input_type, missing method, family/data mismatch, and GPU/OOM issues.
Bundled Helper
scripts/inspect_model_registry.py: prints the installed RecBole version, resolves one or more model names withget_model, reports trainer resolution, and optionally prints constructor signatures, MRO, module names, and known property-YAML filenames. It accepts--properties-dirwhen the user wants to inspect a specific model-properties directory.
Boundaries
- Do not run training, evaluation, HPO, checkpoints, or case studies here; use
training-evaluation-and-tuning. - Do not deep-dive atomic file schemas, config precedence, dataset conversion,
or data validation here; use
configuration-and-data. - Do not produce exhaustive model catalogs. Summarize families, show durable examples, and verify ambiguous names with the installed-package helper.
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).