Numba-progress
A progress bar implementation for numba functions using tqdm.
The module provides the class ProgressBar that works as a wrapper around the
tqdm.tqdm progress bar.
It works by spawning a separate thread that updates the tqdm progress bar
based on an atomic counter which can be accessed and updated in a numba nopython function.
The progress bar works with parallel as well as sequential numba functions.
Installation
Using pip
pip install numba-progress
From source
git clone https://github.com/mortacious/numba-progress.git
cd numba-progress
python setup.py install
Usage
from numba import njit
from numba_progress import ProgressBar
num_iterations = 100
@njit(nogil=True)
def numba_function(num_iterations, progress_proxy):
for i in range(num_iterations):
#<DO CUSTOM WORK HERE>
progress_proxy.update(1)
with ProgressBar(total=num_iterations) as progress:
numba_function(num_iterations, progress)
The ProgressBar also works within parallel functions out of the box:
from numba import njit, prange
from numba_progress import ProgressBar
num_iterations = 100
@njit(nogil=True, parallel=True)
def numba_function(num_iterations, progress_proxy):
for i in prange(num_iterations):
#<DO CUSTOM WORK HERE>
progress_proxy.update(1)
with ProgressBar(total=num_iterations) as progress:
numba_function(num_iterations, progress)
Refer to the examples folder for more usage examples.
Metadata
Release files for numba-progress 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| numba_progress-1.2.0.tar.gz | 14.4 kB | Without provenance | Details for numba_progress-1.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| numba_progress-1.2.0-py3-none-any.whl | Python 3 | none | any | Details for numba_progress-1.2.0-py3-none-any.whl |
Total release size: 21.8 kB
Release files / numba_progress-1.2.0.tar.gz
| Download URL | numba_progress-1.2.0.tar.gz |
|---|---|
| Size | 14.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c6189119ae901ad106b0cae3796319024d20bbbb3b7ae027b9bfcb08802585a8
|
|
BLAKE2b-256 checksum How to use checksums |
a2ae3f8e5e757badaf8e2fe6c596f183c6709c4e7af51cd4bdcbaec61c2c27ca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / numba_progress-1.2.0-py3-none-any.whl
| Download URL | numba_progress-1.2.0-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9404c437d55f6454d907ebad28717baf64593405c68446675c1d0d10c833b21f
|
|
BLAKE2b-256 checksum How to use checksums |
ec4f71b6d8605d46fdf629f0e3f595a6bfd50ad6b731550cbd70ef79d0e3b692
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Security for numba-progress 1.2.0
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.