Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Lightning extension: Horovod

CI testing General checks Documentation Status pre-commit.ci status

Horovod allows the same training script to be used for single-GPU, multi-GPU, and multi-node training.

Like Distributed Data Parallel, every process in Horovod operates on a single GPU with a fixed subset of the data. Gradients are averaged across all GPUs in parallel during the backward pass, then synchronously applied before beginning the next step.

The number of worker processes is configured by a driver application (horovodrun or mpirun). In the training script, Horovod will detect the number of workers from the environment, and automatically scale the learning rate to compensate for the increased total batch size.

Horovod can be configured in the training script to run with any number of GPUs / processes as follows:

# train Horovod on GPU (number of GPUs / machines provided on command-line)
trainer = Trainer(strategy="horovod", accelerator="gpu", devices=1)

# train Horovod on CPU (number of processes / machines provided on command-line)
trainer = Trainer(strategy="horovod")

When starting the training job, the driver application will then be used to specify the total number of worker processes:

# run training with 4 GPUs on a single machine
horovodrun -np 4 python train.py

# run training with 8 GPUs on two machines (4 GPUs each)
horovodrun -np 8 -H hostname1:4,hostname2:4 python train.py

See the official Horovod documentation for details on installation and performance tuning.

Tests / Docs notes

Metadata

Release files for lightning-Horovod 0.1.0.dev0

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

Source distribution (sdist)

Source distribution for lightning-Horovod 0.1.0.dev0
File Size Uploaded Provenance
lightning-Horovod-0.1.0.dev0.tar.gz 11.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for lightning-Horovod 0.1.0.dev0
File Interpreter ABI Platform
lightning_Horovod-0.1.0.dev0-py3-none-any.whl Python 3 none any Details

Total release size: 22.9 kB

Release files / lightning-Horovod-0.1.0.dev0.tar.gz

Download URL lightning-Horovod-0.1.0.dev0.tar.gz
Size 11.8 kB
Tags Source
SHA-256 checksum
How to use checksums
fd00a4b80066658061b96e8b5b01bc44d75cdc48c48ed63022003ccd66f8ab78
BLAKE2b-256 checksum
How to use checksums
0e32ea4fdfb432f5d53f1093bc84271d5afa55f1b904eaf77a8b7f615190810d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / lightning_Horovod-0.1.0.dev0-py3-none-any.whl

Download URL lightning_Horovod-0.1.0.dev0-py3-none-any.whl
Size 11.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a5c53dd7e6e08377ba68c32778b903090f2eed9cc5cb2a799d6892bafaa86f1a
BLAKE2b-256 checksum
How to use checksums
34fdc595efb2d7b627538d62100af9922eb5b2743a247a8ec6ff8659f65e6dde
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Security for lightning-Horovod 0.1.0.dev0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
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