fancy progress bar
Project description
loadingpy
In this repository, we provide a custom made progress bar for python iterables. This library can be used as is or modified for any purposes (see licence).
Example
You can install with pip pip install loadingpy
and use as follows
from loadingpy import pybar
loss = 0.0
accuracy = 0.0
for inputs, labels in pybar(dataset, monitoring=[loss, accuracy], naming=["loss", "accuracy"], base_str="training"):
# do whatever you please
loss += 0.0 # update monitoring variables in place
accuracy += 0.0 # update monitoring variables in place
For a more detailed exampel (in torch) check this tutorial. You can use a global argument in order to disable the verbatim from the loading bars as follows:
from loadingpy import BarConfig
BarConfig["disable loading bar"] = True
Arguments
Here is a list of the arguments and their description
argument | description | type |
---|---|---|
iterable | python object that can be iterated over | can be a list, tuple, range, np.ndarray, torch.Tensor, dataset,... |
monitoring | a python object (or list of python objects) that will be printed after each iteration using the following format f'{monitoring}'. IF they are updated during the loop, make sure to update inplace, in order to see the changes | an be a tensor, float or list of these |
naming | if you want to add a descritpion prefix to the monitoring variables | str or list of str |
total_steps | number of iterations to perform (if you set it to a lower value than the length of the iterable, then the process will stop after the given total_steps) | int |
base_str | prefix description of the loop we are iterating over | str |
color | which color to use for the loading bar | str |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
loadingpy-0.0.5.tar.gz
(6.1 kB
view hashes)
Built Distribution
Close
Hashes for loadingpy-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2874d079db026f1d2f20ec2d3f89b60f12f955f676dfd7e6dedf4721b98688e |
|
MD5 | 3d48320c5ca2da25e0c21aef6db97438 |
|
BLAKE2b-256 | 5ee508c0176b594b9ead91bd745181271837d4333f60f0f5a631c8f4d168b411 |