Skip to main content

PyBlaze

PyPi License

PyBlaze is an unobtrusive, high-level library for large-scale machine and deep learning in PyTorch. It is engineered to cut obsolete boilerplate code while preserving the flexibility of PyTorch to create just about any deep learning model.

Quickstart

Plenty of tutorials are available in the official documentation. The most basic tutorial builds a classifier for CIFAR10.

Installation

PyBlaze is available on PyPi and can simply be installed as follows:

pip install pyblaze

Library Design

PyBlaze revolves around the concept of an engine. An engine is a powerful abstraction for combining a model's definition with the algorithm required to optimize its parameters according to some data. Engines provided by PyBlaze are focused on generalization: while the engine encapsulates the optimization algorithm, the user must explicitly define the optimization objective (usually the loss function).

However, engines go far beyond implementing the optimization algorithm. Specifically, they further provide the following features:

  • Evaluation: During training, validation data can be used to evaluate the generalization performance of the trained model every so often. Also, arbitrary metrics may be computed.

  • Callbacks: During training and model evaluation, callbacks serve as hooks called at specific events in the process. This makes it possible to easily use some tracking framework, perform early stopping, or dynamically adjust parameters over the course of the training. Custom callbacks can easily be created.

  • GPU Support: Training and model evaluation is automatically performed on all available GPUs. The same code that works for the CPU works for the GPU ... and also for multiple GPUs.

Available Engines

Engines are currently implemented for the following training procedures:

  • pyblaze.nn.MLEEngine: This is the most central engine as it enables supervised as well as unsupervised learning. It can therefore adapt to multiple different problems: classification, regression, (variational) autoencoders, ..., depending on the loss only. In order to simplify initialization (as configuration requires toggling some settings), there exist some specialized MLE engines. Currently, the only one is pyblaze.nn.AutoencoderEngine.

  • pyblaze.nn.WGANEngine: This engine is specifically designed for training Wasserstein GANs. This class is required due to the independent training of generator and critic.

Implementing your custom engine is rarely necessary for most common problems. However, when working on highly customized machine learning models, it might be a good idea. Usually, it is sufficient to implement the train_batch and eval_batch methods to specify how to perform training and evaluation, respectively, for a single batch of data. Consult the documentation of pyblaze.nn.Engine to read about all methods available for override.

License

PyBlaze is licensed under the MIT License.

Metadata

Release files for pyblaze 2.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyblaze 2.3.2
File Size Uploaded
pyblaze-2.3.2.tar.gz 47.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyblaze 2.3.2
File Interpreter ABI Platform
pyblaze-2.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 113.2 kB

Release files / pyblaze-2.3.2.tar.gz

Download URL pyblaze-2.3.2.tar.gz
Size 47.2 kB
Tags Source
SHA-256 checksum
How to use checksums
245e286718870c39b1b4065af4e26970c281fc5436d0ed2c177b24a2d589ef5f
BLAKE2b-256 checksum
How to use checksums
5ad2c5258dac70a0ce678473f1a3c78c366c631b089d98a396c059c3842dfe09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.7.9

Release files / pyblaze-2.3.2-py3-none-any.whl

Download URL pyblaze-2.3.2-py3-none-any.whl
Size 66.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a10c02c343e45784347b8c0eb88b414529f105fe0de7b70c2ccde4b9753d0e7e
BLAKE2b-256 checksum
How to use checksums
7c996106b06fd16725af78476a83015976e117ec6274a9cbd2824974185719fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.7.9

Release history Release notifications | RSS feed

This release

2.3.2 This release

2 release files

2.3.1

2 release files

2.3.0

2 release files

2.2.6

2 release files

2.2.5

2 release files

2.2.4

2 release files

2.2.3

2 release files

2.2.2

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.9

2 release files

2.1.8

2 release files

2.1.7

2 release files

2.1.6

2 release files

2.1.5

2 release files

2.1.4

2 release files

2.1.3

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page