AGENT SKILL

graph-models

Build Graph Nets blocks and high-level Sonnet model architectures.

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

01 前言 Front Matter

name
graph-models
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Build Graph Nets blocks and high-level Sonnet model architectures.
disable-model-invocation
true

02 资源文件 6

03 SKILL.md 正文

Graph Models

Use this sub-skill when the task is to assemble, adapt, or debug Graph Nets neural-network modules: low-level broadcasters/aggregators, EdgeBlock / NodeBlock / GlobalBlock, high-level graph_nets.modules architectures, or Sonnet model factories for Graph Nets demos.

Route here for

  • Choosing and wiring graph_nets.blocks broadcasters, aggregators, reducers, or update blocks.
  • Building GraphIndependent, GraphNetwork, InteractionNetwork, RelationNetwork, DeepSets, CommNet, or SelfAttention modules.
  • Writing Sonnet 1 or Sonnet 2 *_model_fn factories for edge, node, global, encoder, core, decoder, or output transforms.
  • Adapting the bundled demo architectures in scripts/demo_models_tf1.py or scripts/demo_models_tf2.py.
  • Running a tiny installed-package model smoke with scripts/graph_model_smoke.py.

Route elsewhere

  • Raw GraphsTuple construction, dictionary batching, and NetworkX conversion belong in ../graph-data/SKILL.md.
  • TensorFlow utilities, placeholders, padding, masks, utils_tf.concat, tf.function signatures, and session/feed details belong in ../tensorflow-ops/SKILL.md.
  • Full training-loop or notebook reproduction work should use the root Graph Nets recipe guidance first, then return here only for the model/module layer.

Required reading for model work

  1. references/api-reference.md for constructor contracts, field requirements, reducer defaults, and Sonnet version differences.
  2. references/workflows.md for practical recipes: independent encoders/decoders, generic message passing, relation/set/communication modules, self-attention, and encode-process-decode.
  3. references/troubleshooting.md when a graph field is None, senders/receivers are absent, reducers are missing, concatenation shapes fail, or TF/Sonnet major versions mismatch.

Operating checklist

  • Confirm the installed stack before choosing code style: Sonnet 1 uses snt.AbstractModule and TF1 sessions/placeholders; Sonnet 2 uses snt.Module, eager tensors, and optional tf.function wrapping.
  • Decide which graph fields the module is allowed to read. Match every use_* flag to non-None input fields and to required reducers.
  • Keep model factories as zero-argument callables that return a Sonnet module or callable. Do not instantiate a fresh submodule inside every call of an already-built model.
  • Validate all concatenated features share the same rank and all non-last axes after broadcasting/aggregation; only the last feature axis should differ.
  • Preserve sub-skill boundaries: fix invalid graph data before model assembly and delegate padding/session mechanics to the TensorFlow ops sub-skill.

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