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.0.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.0-py3-none-any.whl (38.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: torch_batteries-0.5.0.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.0.tar.gz
Algorithm Hash digest
SHA256 7ca86135b37d30d2999745ac8e80f3fd05061b3f14441cf89c326978b95bfdf5
MD5 4a5015824308a9b06018703b6201af12
BLAKE2b-256 08bc86cb5fde335f1dd254cbbcf0bb74cca118229b0580ffa95d22e6ed5faeec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torch_batteries-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 86c3d30d09e364ecbb8d4d4136043ca38dbd6cb64016ea8b188344cce3b2b592
MD5 55073e06efd584ecf91f7a5d3db3e9f5
BLAKE2b-256 732acf4ea9d0f6436adc643b7316a0800657f74434dceded79b70f9726186470

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