AGENT SKILL

spektral

Helps with Spektral graph neural network workflows, from graph data loading and transforms to layers and models.

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

01 前言 Front Matter

name
spektral
license
MIT
metadata
{ "disco-role": "operating" }
description
Helps with Spektral graph neural network workflows, from graph data loading and transforms to layers and models.
disable-model-invocation
true

02 资源文件 6

03 SKILL.md 正文

Spektral

Use this skill when the task mentions Spektral, graph neural networks, graph datasets, loaders, pooling, message passing, or ready-made graph models.

Quick install

  • Public install: pip install spektral
  • Spektral pulls in TensorFlow and the scientific Python stack declared in pyproject.toml.
  • For this Spektral 1.3.1 source revision, prefer TensorFlow/Keras 2.x when model calls hit Keras 3 mask behavior errors; tensorflow==2.15.1 with keras==2.15.0 was verified for CPU workflows. Some older source paths also assume NetworkX/SciPy matrix-era APIs, so check the troubleshooting guide for dependency-version drift.
  • For a fast sanity check, run scripts/check_install.py.
  • If an editable install complains about multiple top-level packages, use a clean checkout or a source tree that exposes only the spektral package.

Quick import check

python -I -c "import spektral; from spektral.data import Graph, Dataset, SingleLoader, DisjointLoader, BatchLoader; from spektral.layers import GCNConv, GeneralConv"

Route by task family

graph-data

Use this route for graph containers, dataset classes, built-in datasets, transforms, loader selection, data-mode selection, and custom dataset pipelines.

Typical requests:

  • "How do I define a custom Dataset?"
  • "Which loader should I use for graph classification?"
  • "How do I preprocess graphs for a GCN?"
  • "Why is my dataset in mixed mode?"

Read:

  • sub-skills/graph-data/SKILL.md
  • sub-skills/graph-data/references/api-reference.md
  • sub-skills/graph-data/references/workflows.md
  • sub-skills/graph-data/references/dataset-catalog.md
  • sub-skills/graph-data/references/troubleshooting.md
  • sub-skills/graph-data/scripts/smoke_data_modes.py

gnn-models

Use this route for convolution layers, pooling layers, custom message passing, ready-made models, graph explanation, and utility ops around graph math and sparse tensors.

Typical requests:

  • "How do I build a GCN/GNN?"
  • "How do I write a custom MessagePassing layer?"
  • "Why does batch mode need GraphMasking?"
  • "How do I explain a prediction with GNNExplainer?"

Read:

  • sub-skills/gnn-models/SKILL.md
  • sub-skills/gnn-models/references/api-reference.md
  • sub-skills/gnn-models/references/workflows.md
  • sub-skills/gnn-models/references/layer-catalog.md
  • sub-skills/gnn-models/references/troubleshooting.md
  • sub-skills/gnn-models/scripts/smoke_models.py

When to read the shared references

  • references/api-overview.md for the package module map and ownership split.
  • references/workflows.md for the root-level workflow map and routing hints.
  • references/troubleshooting.md for install/import, dataset download, mode mismatch, and masking issues.
  • references/repo-provenance.md to check whether this skill still matches the current repository snapshot.

What this skill covers

  • Graph objects, dataset containers, and loader behavior.
  • Built-in benchmark datasets and transform pipelines.
  • Data-mode choices: single, disjoint, batch, and mixed.
  • Convolution, pooling, message passing, and readout layers.
  • Ready-made models such as GCN and GeneralGNN, plus GNNExplainer.
  • Utility helpers for sparse tensors, graph math, logging, and serialization.

What this skill does not do

  • It does not replace TensorFlow or general Keras guidance.
  • It does not cover DGL or PyG.
  • It does not require the original repository checkout at runtime; the bundled references and scripts should be enough.

If you are unsure where a request belongs

  • Start with graph-data if the pain point is shapes, loaders, datasets, transforms, or download/configuration.
  • Start with gnn-models if the pain point is layer behavior, pooling, masking, message passing, or model architecture.
  • If the task crosses both, read the graph-data route first when the user is defining inputs, and the gnn-models route first when the user is defining the network.

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