Skip to main content

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).

for deep learning

There is now a new progress bar available for deep learning purposes (I guess it could be leveraged for other stuff as well...). Say, you want to train a model using a dataset $D$ over $e$ epochs. Using TrainBaryou can get a double progress bar (first for the epochs and second for the steps in the current epoch) on a single line. you can check the test or this simple example:

from loadingpy import TrainBar

for data in TrainBar(
        trainloader,
        num_epochs=e,
        base_str="training",
    ):
        inputs, labels = data

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

Metadata

Release files for loadingpy 0.1.4

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

Source distribution (sdist)

Source distribution for loadingpy 0.1.4
File Size Uploaded Provenance
loadingpy-0.1.4.tar.gz 6.2 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 14.7 kB

Release files / loadingpy-0.1.4.tar.gz

Download URL loadingpy-0.1.4.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3447dacb40d4747840182cfc8eb8247f29e6882fdf3c63d71a73d32085c83c8e
BLAKE2b-256 checksum
How to use checksums
48e4354b303627ba1db9be80e68505c1fed7d0812d60a3a4927135415a423eed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.8.18 Darwin/23.2.0

Release files / loadingpy-0.1.4-py3-none-any.whl

Download URL loadingpy-0.1.4-py3-none-any.whl
Size 8.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ff380f06b9f2eff89a1584a4e67ebe505d3981bfa241e0ec374ce75337263571
BLAKE2b-256 checksum
How to use checksums
85ad54d90f189d4248bc3addaced86628e0b58df50137fbe8c013c8bca1d2c2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.8.18 Darwin/23.2.0

Security for loadingpy 0.1.4

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.

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