ypereirars / progress-bar

A simple progress bar for training models

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A Simple Progress Bar

It's a simple progress bar similar to the one in Tensorflow.

Motivation

Learn how to write and overwrite to console and config setup of a project.

How to Use

First clone the project then install it:

$ git clone https://github.com/ypereirars/progress-bar.git 
$ pip install .

Then import the bar and use it:

from progress_bar import ProgressBar

bar = ProgressBar(100)
for _ in range(100):
    bar.update()

Once it's bar is fully filled, the update method calls finish, producing the following output:

100/100 [===============================] - 9.93s 0.0993s/sample

When passing extra info to update, it will append data to the end of bar:

from progress_bar import ProgressBar

bar = ProgressBar(100)
for _ in range(100):
    bar.update("loss: 3.0319 accuracy: 0.8784")
100/100 [===============================] - 9.93s 0.0993s/sample - loss: 3.0319 accuracy: 0.8784

Any comments and suggestions are welcome!

About

A simple progress bar for training models

License:MIT License


Languages

Language:Python 100.0%