Skip to main content

A lightweight Python package that supplies batteries-included abstractions for PyTorch workflows

Project description

torch-batteries

PyPI version License: MIT

torch-batteries
Image generated by AI

A lightweight Python package that supplies batteries-included abstractions for:

  • Data loading pipelines
  • Model training loops
  • Evaluation workflows
  • Metrics computation
  • Experiment tracking (Weights & Biases)

Designed to reduce boilerplate and standardize experiment code.

Installation

pip install torch-batteries

Optional Dependencies

For experiment tracking with Weights & Biases:

pip install torch-batteries[wandb]

Examples

Explore practical examples demonstrating torch-batteries features:

Example Description Notebook Colab
Function Fitting with MLP Train a neural network to approximate a polynomial function using the event-driven training approach function_fitting.ipynb Open In Colab
Image Classification with CNN Train a Convolutional Neural Network (CNN) for image classification image_classification.ipynb Open In Colab
Learning Rate Sweep with Early Stopping Conduct a learning rate sweep on MNIST classification with aggressive early stopping and log results to Weights & Biases lr_sweep_early_stopping.ipynb Open In Colab

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

torch_batteries-0.5.2.tar.gz (29.5 kB view details)

Uploaded Source

Built Distribution

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

torch_batteries-0.5.2-py3-none-any.whl (38.0 kB view details)

Uploaded Python 3

File details

Details for the file torch_batteries-0.5.2.tar.gz.

File metadata

  • Download URL: torch_batteries-0.5.2.tar.gz
  • Upload date:
  • Size: 29.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for torch_batteries-0.5.2.tar.gz
Algorithm Hash digest
SHA256 e2629f085bbd48b5e9c47c9e48cf7428fa7eb9709a7fe137f078488482bd8fe0
MD5 f15ec2288b16d48c9d306d749d374d7b
BLAKE2b-256 2233c5488bf085dd8c1f23febd899d71ba0d220a846c694fa9532c4f17e90b01

See more details on using hashes here.

File details

Details for the file torch_batteries-0.5.2-py3-none-any.whl.

File metadata

File hashes

Hashes for torch_batteries-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 860d00c0d674c81e99fa24922258796833444945ad8dbd8f511c7f0a997e85c2
MD5 49685a4430253d4dbcbf2a366e3c2fd1
BLAKE2b-256 5d3cc1bfc1cecefe33982274fb7c71837f33c34ce26b400d9c6e8b2873b05672

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