An open API service indexing awesome lists of open source software.

https://github.com/atticuszeller/pytorch-lightning-uv

๐Ÿ“ฆ Zero-config Deep Learning template with PyTorch Lightning, UV package manager, W&B tracking, and modern Python tooling ๐Ÿš€
https://github.com/atticuszeller/pytorch-lightning-uv

classification cuda deep-learning machine-learning mnist-classification python pytorch pytorch-lightning typer uv

Last synced: 7 months ago
JSON representation

๐Ÿ“ฆ Zero-config Deep Learning template with PyTorch Lightning, UV package manager, W&B tracking, and modern Python tooling ๐Ÿš€

Awesome Lists containing this project

README

          

# ๐Ÿงช Pytorch Lightning UV Template

A modern Deep Learning experiment template with PyTorch Lightning

[![python](https://img.shields.io/badge/-Python_3.10_%7C_3.11_%7C_3.12-blue?logo=python&logoColor=white)](https://www.python.org/downloads/release/python-310/)
[![pytorch](https://img.shields.io/badge/PyTorch_2.5+-ee4c2c?logo=pytorch&logoColor=white)](https://pytorch.org/get-started/locally/)
[![lightning](https://img.shields.io/badge/-Lightning_2.5+-792ee5?logo=pytorchlightning&logoColor=white)](https://lightning.ai/)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![license](https://img.shields.io/badge/License-MIT-green.svg?labelColor=gray)](https://github.com/ashleve/lightning-hydra-template#license)
[![PRs](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/AtticusZeller/Pytorch-Lightning-uv/pulls)

Click on [Use this template](https://github.com/AtticusZeller/Pytorch-Lightning-uv/generate) to initialize new repository.

## โœจ Features

* ๐Ÿš€ **UV Environment Management** - Fast and efficient dependency management
* ๐ŸŽฏ **Typer CLI** - Modern command line interface
* โš™๏ธ **YAML Config** - Flexible experiment configuration
* ๐Ÿ”‹ **Lightning Components**
+ DataModule for clean data handling
+ Model with built-in training logic
+ Trainer with all the bells and whistles
* ๐Ÿ“Š **Weights & Biases Integration**
+ Experiment tracking and visualization
+ Hyperparameter optimization with sweeps
+ Dataset analysis and exploration
* ๐ŸŽจ **Clean Project Structure**
+ Modular and maintainable codebase
+ Easy to extend and customize

## ๐Ÿ› ๏ธ Installation

```bash
uv sync --dev
```

## ๐Ÿ“Š Dataset Analysis

Explore and analyze your dataset with built-in EDA tools:

```bash
python -m expt.main -c config/resnet.yml --eda
```

๐Ÿ“ˆ View EDA Example

![EDA Example](assets/eda.png)

## ๐Ÿš€ Training

Start training your model with a single command:

```bash
python -m expt.main -c config/resnet.yml --train
```

๐Ÿ” View Training Details

### Configuration Overview

![Config Display](assets/config_show.png)

### Training Progress

![Training Step](assets/step.png)

### Training Summary

![Training Summary](assets/summary.png)

### W&B Dashboard

![Wandb Dashboard](assets/train.png)

## ๐Ÿ“Š Evaluation

Evaluate your trained model:

```bash
python -m expt.main -c config/resnet.yml --eval --run-id n8fjnlyi
```

๐Ÿ“Š View Evaluation Results

![Evaluation Results](assets/result.png)

## ๐ŸŽ›๏ธ Hyperparameter Tuning

Optimize your model with W&B Sweeps:

```bash
python -m expt.main -c config/resnet.yml --sweep --sweep-config config/sweep/mlp.yml
```

๐Ÿ“ˆ View Sweep Results

![Sweep Results](assets/sweep.png)

## ๐Ÿ“ License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## ๐Ÿ™ Acknowledgements

* [PyTorch Lightning](https://lightning.ai/)
* [Weights & Biases](https://wandb.ai/)
* [Typer](https://typer.tiangolo.com/)
* [UV](https://github.com/astral-sh/uv)

---


Made with โค๏ธ for the ML community