graphgym-experiments
Configure, validate, customize, and troubleshoot PyTorch Geometric GraphGym experiments without running unsafe benchmark-scale jobs.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- graphgym-experiments
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Configure, validate, customize, and troubleshoot PyTorch Geometric GraphGym experiments without running unsafe benchmark-scale jobs.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/customization.md3.8 KB
- 参考文档references/graphgym-configs.md3.9 KB
- 参考文档references/troubleshooting.md3.5 KB
- 脚本scripts/example_graphgym_node.yaml862 B
- 脚本scripts/validate_graphgym_config.py11.1 KB
03 SKILL.md 正文
GraphGym Experiments
Use this sub-skill when a task involves PyTorch Geometric GraphGym experiment YAML files, run-single/run-batch concepts, custom GraphGym registration, result directories, or GraphGym optional-dependency troubleshooting.
Do not use this sub-skill for general GNN layer design, arbitrary training-loop implementation, data container basics, heterogeneous graph modeling, explainability, or distributed training. Route those workflows to sibling sub-skills when present.
Start Here
- Read graphgym configs when creating or editing GraphGym YAML, choosing
dataset,train,model,gnn, oroptimkeys, or mapping run-single/run-batch shell concepts into safe commands. - Read customization when registering custom activations, layers, losses, datasets, loaders, optimizers, schedulers, metrics, training functions, networks, or config groups.
- Read troubleshooting when imports fail for optional GraphGym extras, a config key/type is rejected, a registry key collides, results are hard to find, or a batch job would create expensive side effects.
- Run validate_graphgym_config.py to inspect a GraphGym YAML file without launching training, downloading datasets, using GPUs, or writing result directories.
- Copy or compare against example_graphgym_node.yaml for a minimal CPU-friendly node-classification template.
Safe Commands
python scripts/validate_graphgym_config.py \
scripts/example_graphgym_node.yaml
python scripts/validate_graphgym_config.py --help
The validator prints JSON with ok, dependency status, recognized sections, warnings, and errors. It intentionally does not call torch_geometric.graphgym.main, run_single.sh, run_batch.sh, configs_gen.py, or any training entrypoint.
Common Tasks
- Create a single experiment YAML with top-level sections such as
out_dir,dataset,train,model,gnn, andoptim; keepaccelerator: cpuand lowoptim.max_epochfor smoke runs. - Explain run-single as
python main.py --cfg <config.yaml> --repeat <n>in a GraphGym project, but do not run it unless the user explicitly accepts dataset downloads, result writes, optional extras, and training time. - Explain run-batch as generating perturbed configs from a base YAML and grid file, then queueing many runs; treat it as benchmark-scale by default.
- Register custom modules with
torch_geometric.graphgym.register_*decorators or direct calls, using unique lowercase keys and testing registry insertion before training. - Confirm results under the configured
out_dir, then distinguish per-seed run directories from aggregated metrics and copied config files.
Route Boundaries
- For PyG model layer internals,
MessagePassing,GCNConv,GATConv,SAGEConv, or training-loop code outside GraphGym, use../gnn-modeling/SKILL.md. - For
Data,HeteroData, custom datasets, transforms, or local fixture validation, use../data-and-datasets/SKILL.md. - For mini-batch loaders, neighbor sampling, and link loaders outside GraphGym configs, use
../loaders-and-sampling/SKILL.md. - For large-scale distributed execution, remote backends, multi-GPU, and hardware scheduling, use
../scalable-distributed/SKILL.md.
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).