Skip to main content

Learn, Train, Deploy: An Academic-friendly DL Toolkit for Accelerated Learning and Prototyping

Project description

SoundByte โ€“ Learn, Train, Deploy: An Academic-friendly DL Toolkit for Accelerated Learning and Prototyping

Python PyTorch License Build Status Documentation

Downloads GitHub Stars Contributors Issues

A powerful, modular, and lightweight Python toolkit for training deep neural networks with minimal code and maximum flexibility.

๐Ÿš€ Quick Start โ€ข ๐Ÿ“– Documentation โ€ข ๐ŸŽฏ Examples โ€ข ๐Ÿค Contributing


โœจ Key Features

๐Ÿงฉ Modular Design ๐Ÿ“ Minimal Code โš™๏ธ JSON Configuration ๐Ÿ“Š Lightweight Dashboard ๐Ÿ”ง Easy Integration
Plug-and-play components for maximum flexibility Run complex experiments with just a few lines of code Control everything through intuitive JSON configs Track experiments with built-in visualization Seamlessly integrate custom models

๐Ÿ—๏ธ Ultra-Modular Architecture

  • Mix & Match Components: Pre-built modules for data loading, model architectures, optimizers, and training loops
  • Custom Pipeline Builder: Create unique training pipelines by combining modular components
  • Plugin System: Extend functionality with custom plugins without modifying core code

๐ŸŽฏ Experiment-Ready Design

  • One-Line Experiments: Launch complex training with a single command
  • Hyperparameter Sweeps: Built-in support for automated hyperparameter optimization
  • Reproducible Results: Automatic seed management and deterministic training

๐Ÿ“‹ JSON-Driven Configuration

  • No Code Changes: Modify experiments entirely through JSON configuration files
  • Schema Validation: Built-in validation ensures configuration correctness
  • Template Library: Pre-made configs for common architectures and tasks

๐Ÿ“ˆ Built-in Experiment Tracking

  • Real-time Monitoring: Live training metrics and visualizations
  • Model Comparison: Side-by-side comparison of different experiments
  • Resource Monitoring: GPU/CPU utilization and memory tracking

๐Ÿ”— Seamless Model Integration

  • Auto-Discovery: Automatically detect and register custom model classes
  • Multi-Framework Support: Works with PyTorch, Hugging Face Transformers, and more
  • Zero-Boilerplate: Add new models with minimal wrapper code

๐Ÿš€ Quick Start

Installation

# Install from PyPI (recommended)
pip install deepnet-toolkit

# Install with additional dependencies
pip install deepnet-toolkit[vision,nlp,audio]

# Install from source
git clone https://github.com/yourusername/deepnet-toolkit.git
cd deepnet-toolkit
pip install -e .

30-Second Example

from deepnet import Trainer, load_config

# Load configuration
config = load_config("configs/image_classification.json")

# Initialize trainer
trainer = Trainer(config)

# Train model
trainer.fit()

# Evaluate
results = trainer.evaluate()
print(f"Test Accuracy: {results['accuracy']:.2%}")

Configuration Example

{
  "experiment": {
    "name": "resnet50_cifar10",
    "seed": 42
  },
  "model": {
    "type": "ResNet50",
    "num_classes": 10
  },
  "data": {
    "dataset": "CIFAR10",
    "batch_size": 32,
    "num_workers": 4
  },
  "training": {
    "optimizer": "AdamW",
    "learning_rate": 1e-3,
    "epochs": 100,
    "scheduler": "CosineAnnealingLR"
  },
  "logging": {
    "dashboard": true,
    "save_checkpoints": true
  }
}

๐Ÿ›๏ธ Architecture Overview

graph TB
    A[JSON Config] --> B[Config Parser]
    B --> C[Data Module]
    B --> D[Model Module]
    B --> E[Trainer Module]
    B --> F[Logger Module]
    
    C --> G[DataLoader]
    D --> H[Neural Network]
    E --> I[Training Loop]
    F --> J[Dashboard]
    
    G --> I
    H --> I
    I --> J
    I --> K[Checkpoints]
    J --> L[Metrics & Visualizations]
    
    style A fill:#e1f5fe
    style B fill:#f3e5f5
    style I fill:#e8f5e8
    style J fill:#fff3e0

๐ŸŽฏ Examples

Image Classification

# Train ResNet on CIFAR-10
deepnet train --config configs/vision/resnet_cifar10.json

# Custom dataset
deepnet train --config configs/vision/custom_dataset.json --data.path ./my_dataset

Natural Language Processing

# Fine-tune BERT for text classification
deepnet train --config configs/nlp/bert_classification.json

# Custom tokenizer
deepnet train --config configs/nlp/custom_tokenizer.json --model.tokenizer ./my_tokenizer

Computer Vision

# Object detection with YOLO
deepnet train --config configs/vision/yolo_detection.json

# Semantic segmentation
deepnet train --config configs/vision/unet_segmentation.json

๐Ÿ“Š Dashboard Preview

Real-time experiment tracking with built-in dashboard

Metrics Visualization Model Comparison Resource Monitoring
๐Ÿ“ˆ Loss curves, accuracy plots ๐Ÿ”„ Side-by-side experiment comparison ๐Ÿ’ป GPU/CPU utilization graphs
๐Ÿ“Š Custom metric tracking ๐Ÿ“‹ Hyperparameter analysis ๐Ÿ’พ Memory usage monitoring

๐Ÿ”ง Custom Model Integration

Adding your custom model is as simple as:

from deepnet import BaseModel
import torch.nn as nn

class MyCustomModel(BaseModel):
    def __init__(self, num_classes: int = 10, **kwargs):
        super().__init__()
        self.backbone = nn.Sequential(
            nn.Linear(784, 256),
            nn.ReLU(),
            nn.Linear(256, num_classes)
        )
    
    def forward(self, x):
        return self.backbone(x.view(x.size(0), -1))

# Auto-registration - no additional code needed!
# Use in config: {"model": {"type": "MyCustomModel", "num_classes": 10}}

๐Ÿ“š Documentation & Tutorials

Resource Description
๐Ÿ“– Documentation Complete API reference and guides
๐ŸŽ“ Tutorials Step-by-step examples and best practices
๐Ÿ”ฌ Examples Ready-to-run example scripts
๐Ÿ“ Configuration Guide JSON configuration reference
๐Ÿงฉ Plugin Development Create custom components

๐Ÿ› ๏ธ Advanced Features

Multi-GPU Training

# Data parallel training
deepnet train --config config.json --gpus 0,1,2,3

# Distributed training
torchrun --nproc_per_node=4 deepnet/cli.py train --config config.json

Hyperparameter Optimization

{
  "hyperopt": {
    "method": "bayesian",
    "trials": 50,
    "search_space": {
      "training.learning_rate": ["log_uniform", 1e-5, 1e-1],
      "model.dropout": ["uniform", 0.1, 0.5],
      "training.batch_size": ["choice", [16, 32, 64]]
    }
  }
}

Custom Callbacks

from deepnet.callbacks import Callback

class CustomCallback(Callback):
    def on_epoch_end(self, epoch, logs):
        if logs['val_accuracy'] > 0.95:
            self.trainer.stop_training = True
            print("๐ŸŽ‰ Target accuracy reached!")

๐Ÿ”— Ecosystem Integrations

PyTorch Hugging Face Weights & Biases TensorBoard MLflow


๐Ÿš€ Performance Benchmarks

Model Dataset Training Time Memory Usage Accuracy
ResNet50 CIFAR-10 45 min 3.2 GB 94.2%
BERT-base IMDB 2.1 hours 8.1 GB 91.8%
YOLOv5 COCO 8.3 hours 11.4 GB 65.1 mAP

Benchmarks run on NVIDIA RTX 3080, PyTorch 2.0


๐Ÿค Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Setup

# Clone repository
git clone https://github.com/yourusername/deepnet-toolkit.git
cd deepnet-toolkit

# Install in development mode
pip install -e ".[dev]"

# Run tests
pytest

# Run linting
pre-commit run --all-files

๐Ÿงช Testing

# Run all tests
pytest tests/

# Run with coverage
pytest --cov=deepnet tests/

# Run specific test categories
pytest tests/test_models.py -v

๐Ÿ“ฆ Installation Options

๐Ÿณ Docker Installation
# Pull the Docker image
docker pull yourusername/deepnet-toolkit:latest

# Run with GPU support
docker run --gpus all -it -v $(pwd):/workspace yourusername/deepnet-toolkit:latest

# Build from source
git clone https://github.com/yourusername/deepnet-toolkit.git
cd deepnet-toolkit
docker build -t deepnet-toolkit .
๐Ÿ“ฆ Conda Installation
# Create conda environment
conda create -n deepnet python=3.8
conda activate deepnet

# Install from conda-forge
conda install -c conda-forge deepnet-toolkit

# Or install with pip in conda environment
pip install deepnet-toolkit
๐Ÿ”ง Development Installation
# Clone and install for development
git clone https://github.com/yourusername/deepnet-toolkit.git
cd deepnet-toolkit

# Install in editable mode with dev dependencies
pip install -e ".[dev,test,docs]"

# Install pre-commit hooks
pre-commit install

๐Ÿ† Comparison with Other Frameworks

Feature DeepNet Toolkit PyTorch Lightning FastAI Keras
JSON Configuration โœ… Full Support โŒ Limited โŒ No โŒ No
Zero-Code Experiments โœ… Yes โŒ Code Required โŒ Code Required โŒ Code Required
Built-in Dashboard โœ… Lightweight โŒ External Tools โŒ External Tools โŒ External Tools
Auto Model Discovery โœ… Yes โŒ Manual Registration โŒ Manual โŒ Manual
Multi-Framework Support โœ… PyTorch + HF โœ… PyTorch Only โœ… PyTorch Only โœ… TensorFlow Only

๐Ÿ“œ License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.


๐Ÿ™ Acknowledgments


๐Ÿ“ž Support & Community

Documentation Discord GitHub Discussions Email

Questions? Open an issue or start a discussion

Found a bug? Please report it on our issue tracker

Want to contribute? Check out our contribution guidelines


โญ Star us on GitHub โ€” it motivates us a lot!

Star History Chart

Made with โค๏ธ by the DeepNet Team

โฌ† Back to Top

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

soundbyte-0.1.0.tar.gz (25.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

soundbyte-0.1.0-py3-none-any.whl (25.4 kB view details)

Uploaded Python 3

File details

Details for the file soundbyte-0.1.0.tar.gz.

File metadata

  • Download URL: soundbyte-0.1.0.tar.gz
  • Upload date:
  • Size: 25.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for soundbyte-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3bce7829c50d5743f96b4cd49fe0fa6801ef95cc65e0629596ad217915030fd2
MD5 451156a87c39461ba11c4a82fce7b8c6
BLAKE2b-256 e84f056dcc38027013a258f68cd9e51ec4922655c9281d6d1e97c271c6036d33

See more details on using hashes here.

File details

Details for the file soundbyte-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: soundbyte-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 25.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for soundbyte-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b702a97cf6dd1bd90aaddeaeb8650b404043db0844149549f00173a34f1bbc59
MD5 2b52c45202448b331f17eeeb136f83f5
BLAKE2b-256 ac9819f3b156077b8b92f286fd43fa2e5b662585bfc809246e1630d4bb168c54

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page