技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
pytorch-geometric【数据与研究】Use PyTorch Geometric to build graph data, loaders, GNN models, heterogeneous workflows, explainers, scalable/distributed jobs, and GraphGym experiments.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this repo skill when a task involves PyTorch Geometric (PyG), the torch_geometric Python package, graph neural networks, graph data containers, mini-batch/neighbor loaders, heterogeneous graphs, explainability, distributed graph learning, or GraphGym experiment configs.
torch, optional extension issues, dataset downloads, CUDA/backend mismatches, or stale generated skill concerns.PyG imports torch, so install a compatible PyTorch build first, then install PyG:
python -m pip install torch
python -m pip install torch-geometric
python - <<'PY'
import torch
import torch_geometric
print(torch.__version__)
print(torch_geometric.__version__)
PY
For CUDA, ROCm, Apple Silicon, or extension-heavy sampling workflows, choose the PyTorch wheel and optional PyG extension wheels that match the target backend. Do not mix CPU PyTorch with CUDA-only extension wheels.
Data, HeteroData, Batch, custom Dataset/InMemoryDataset, transforms, dataset splitting, and local graph validation.DataLoader, NeighborLoader, LinkNeighborLoader, mini-batching, sampler parameters, temporal/link sampling, and optional sampler backend errors.MessagePassing, common convolution layers, pooling, metrics, training loops, torch.compile, TorchScript/JIT, and tiny model smoke tests.HeteroData, HeteroConv, to_hetero, hetero loaders, bipartite relations, and hetero link prediction.Explainer, GNNExplainer, masks, thresholds, explanation metrics, and model-config recovery.FeatureStore/GraphStore, distributed PyG, multi-GPU/multi-node planning, CPU affinity, profiling, and backend diagnostics.Data or HeteroData fixtures for smoke checks before running dataset-download or benchmark examples.edge_index is torch.long with shape [2, num_edges], node features align with num_nodes, masks index the right supervision target, and hetero edge types are (src, relation, dst) triplets.pyg-lib, torch-sparse, torch-scatter, and related extension wheels are often needed for fast sampling or sparse operations, while GraphGym and RAG workflows need their own extras.python scripts/check_pyg_environment.py --json
Use --require-torch, --require-pyg, or --require-neighbor-backend when the user needs a hard pass/fail diagnostic for a specific workflow.