LQF_Machine_Learning_E…
LQF Machine Learning Expert Guide - Routed skill for ML/Statistical Modeling with Critical Discussion Mode. Triggers on: machine learning, modeling,…
Deep learning framework (PyTorch Lightning). Organize PyTorch code into LightningModules, configure Trainers for multi-GPU/TPU, implement data pipelines, callbacks, logging (W&B, TensorBoard), distributed training (DDP, FSDP, DeepSpeed), for scalable neural network training.
$ npx -y skills add foryourhealth111-pixel/Vibe-Skills --skill pytorch-lightning --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/pytorch-lightningContext preview
The summary Claude sees to decide when to auto-load this skill.
Deep learning framework (PyTorch Lightning). Organize PyTorch code into LightningModules, configure Trainers for multi-GPU/TPU, implement data pipelines, callbacks, logging (W&B, TensorBoard), distributed training (DDP, FSDP, DeepSpeed), for scalable neural network training.
name: pytorch-lightning description: "Deep learning framework (PyTorch Lightning). Organize PyTorch code into LightningModules, configure Trainers for multi-GPU/TPU, implement data pipelines, callbacks, logging (W&B, TensorBoard), distributed training (DDP, FSDP, DeepSpeed), for scalable neural network training."
PyTorch Lightning is a deep learning framework that organizes PyTorch code to eliminate boilerplate while maintaining full flexibility. Automate training workflows, multi-device orchestration, and implement best practices for neural network training and scaling across multiple GPUs/TPUs.
This skill should be used when:
Organize PyTorch models into six logical sections:
1. **Initialization** - `__init__()` and `setup()` 2. **Training Loop** - `training_step(batch, batch_idx)` 3. **Validation Loop** - `validation_step(batch, batch_idx)` 4. **Test Loop** - `test_step(batch, batch_idx)` 5. **Prediction** - `predict_step(batch, batch_idx)` 6. **Optimizer Configuration** - `configure_optimizers()`
**Quick template reference:** See `scripts/template_lightning_module.py` for a complete boilerplate.
**Detailed documentation:** Read `references/lightning_module.md` for comprehensive method documentation, hooks, properties, and best practices.
The Trainer automates the training loop, device management, gradient operations, and callbacks. Key features:
**Quick setup reference:** See `scripts/quick_trainer_setup.py` for common Trainer configurations.
**Detailed documentation:** Read `references/trainer.md` for all parameters, methods, and configuration options.
Encapsulate all data processing steps in a reusable class:
1. `prepare_data()` - Download and process data (single-process) 2. `setup()` - Create datasets and apply transforms (per-GPU) 3. `train_dataloader()` - Return training DataLoader 4. `val_dataloader()` - Return validation DataLoader 5. `test_dataloader()` - Return test DataLoader
**Quick template reference:** See `scripts/template_datamodule.py` for a complete boilerplate.
**Detailed documentation:** Read `references/data_module.md` for method details and usage patterns.
Add custom functionality at specific training hooks without modifying your LightningModule. Built-in callbacks include:
**Detailed documentation:** Read `references/callbacks.md` for built-in callbacks and custom callback creation.
Integrate with multiple logging platforms:
Log metrics using `self.log("metric_name", value)` in any LightningModule method.
**Detailed documentation:** Read `references/logging.md` for logger setup and configuration.
Choose the right strategy based on model size:
Configure with: `Trainer(strategy="ddp", accelerator="gpu", devices=4)`
**Detailed documentation:** Read `references/distributed_training.md` for strategy comparison and configuration.
**Detailed documentation:** Read `references/best_practices.md` for common patterns and pitfalls.
1. **Define model:**
class MyModel(L.LightningModule):
def __init__(self):
super().__init__()
self.save_hyperparameters()
self.model = YourNetwork()
def training_step(self, batch, batch_idx):
x, y = batch
loss = F.cross_entropy(self.model(x), y)
self.log("train_loss", loss)
return loss
def configure_optimizers(self):
return torch.optim.Adam(self.parameters())2. **Prepare data:**
# Option 1: Direct DataLoaders train_loader = DataLoader(train_dataset, batch_size=32) # Option 2: LightningDataModule (recommended for reusability) dm = MyDataModule(batch_size=32)
3. **Train:**
trainer = L.Trainer(max_epochs=10, accelerator="gpu", devices=2) trainer.fit(model, train_loader) # or trainer.fit(model, datamodule=dm)
Executable Python templates for common PyTorch Lightning patterns:
Intelligent Skill routing and workflow orchestration for AI agents — +21.12 pp reward, −29.6% tokens on SkillsBench with DeepSeekV4Flash-VE.
Repo: foryourhealth111-pixel/Vibe-Skills
LQF Machine Learning Expert Guide - Routed skill for ML/Statistical Modeling with Critical Discussion Mode. Triggers on: machine learning, modeling,…
Cloud laboratory platform for automated protein testing and validation. Use when designing proteins and needing experimental validation including binding…
This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting, anomaly detection,…
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code,…
Access real-time and historical stock market data, forex rates, cryptocurrency prices, commodities, economic indicators, and 50+ technical indicators via the…
Implement proven backend architecture patterns including Clean Architecture, Hexagonal Architecture, and Domain-Driven Design. Use when architecting complex…