技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
fabric-expert-loops【数据与研究】Use this sub-skill for Lightning Fabric expert-controlled PyTorch loops: setup, launch, backward, dataloaders, precision/devices, logging, checkpointing, wrapping, and custom trainer loops.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when the user wants Lightning Fabric rather than the high-level Trainer: manual PyTorch training loops, custom loop engines, explicit optimizer stepping, gradient accumulation, checkpoint dictionaries, rank-aware printing, Fabric CLI launch, or wrapping existing PyTorch code with minimal abstraction.
lightning.Fabric or lightning.fabric.Fabric.Fabric.setup, Fabric.setup_dataloaders, Fabric.backward, Fabric.save, Fabric.load, Fabric.print, Fabric.log, and rank/world utilities.accelerator, strategy, devices, num_nodes, precision, plugins, callbacks, and loggers.Trainer, LightningModule, callbacks, and LightningDataModule training workflows: ../training-core/SKILL.md.../distributed-accelerators/SKILL.md.LightningCLI / YAML config-driven Trainer applications: ../cli-configuration/SKILL.md.training-core and recommend Trainer.references/api-reference.md and the conversion patterns in references/workflows.md.python sub-skills/fabric-expert-loops/scripts/fabric_smoke.py --help, then python sub-skills/fabric-expert-loops/scripts/fabric_smoke.py --max-steps 2 --checkpoint-path fabric-smoke.pt from a writable working directory.fabric run --accelerator=cpu --devices=1 sub-skills/fabric-expert-loops/scripts/fabric_smoke.py --max-steps 2. When using fabric run, do not also call fabric.launch() in user code.../distributed-accelerators/SKILL.md before giving final advice.references/api-reference.md: Fabric imports, constructor, core methods, wrappers, launch CLI, logging, and checkpoint APIs.references/workflows.md: raw PyTorch conversion, gradient accumulation, custom trainer loops, dataloaders, checkpoint resume, and validation patterns.references/troubleshooting.md: install/import, optional dependencies, launch/API misuse, device/precision, dataloader, wrapping, and checkpoint failures.scripts/fabric_smoke.py: self-contained CPU-safe tiny Fabric training loop with synthetic tensors and optional checkpoint round-trip.