Skip to main content

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.

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


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.0.tar.gz (4.7 kB view hashes)

Uploaded Source

Built Distribution

loadingpy-0.0.0-py3-none-any.whl (6.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page