ml-lightning-basics

Community

Build PyTorch Lightning training from scratch.

Authornishide-dev
Version1.0.0
Installs0

System Documentation

What problem does it solve?

It solves the complexity of structuring PyTorch training code by showing how to implement LightningModule, LightningDataModule, and Trainer in a way that supports scalable, reproducible ML workflows.

Core Features & Use Cases

  • LightningModule patterns: Encapsulates model architecture and training/validation logic with required hooks like training_step, validation_step, and configure_optimizers.
  • LightningDataModule for reproducible data: Centralizes prepare_data, setup, and dataloader definitions for consistent loading across distributed runs.
  • Trainer orchestration: Demonstrates automatic hardware/distributed configuration (DDP/FSDP/DeepSpeed), callbacks, logging, and mixed-precision settings.
  • PyTorch 2.0 optimization: Covers practical torch.compile integration (modes, best practices, and handling graph breaks).
  • Production best practices: Emphasizes hyperparameter saving, correct logging via self.log, and guidance for common issues like NaNs, OOM, and slow training.

Quick Start

Use the ml-lightning-basics skill to design your model as a LightningModule and your data as a LightningDataModule, then train it with Trainer using the configuration patterns shown in the skill.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: ml-lightning-basics
Download link: https://github.com/nishide-dev/claude-code-ml-research/archive/main.zip#ml-lightning-basics

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.