Progress Table
Lightweight utility to display the progress of your process as a pretty table in the command line.
- Alternative to TQDM whenever you want to track metrics produced by your process
- Designed to monitor ML experiments, but works for any metrics-producing process
- Allows you to see at a glance what's going on with your process
- Increases readability and simplifies your command line logging
- Is efficient: redraws only the modified rows
Change this:
Into this:
Examples
From examples/ directory:
- Neural network training
- Progress of multi-threaded downloads
- Simulation and interactive display of Brownian motion
- Display of a game board
Quick start code
import random
import time
from progress_table import ProgressTable
# Create table object:
table = ProgressTable(num_decimal_places=1)
# You can (optionally) define the columns at the beginning
table.add_column("x", color="bold red")
for step in range(10):
x = random.randint(0, 200)
# You can add entries in a compact way
table["x"] = x
# Or you can use the update method
table.update("x", value=x, weight=1.0)
# Display the progress bar by wrapping an iterator or an integer
for _ in table(10): # -> Equivalent to `table(range(10))`
# Set and get values from the table
table["y"] = random.randint(0, 200)
table["x-y"] = table["x"] - table["y"]
table.update("average x-y", value=table["x-y"], weight=1.0, aggregate="mean")
time.sleep(0.1)
# Go to the next row when you're ready
table.next_row()
# Close the table when it's finished
table.close()
Go to integrations page to see examples of integration with deep learning libraries.
Advanced usage
Go to advanced usage page for more information.
Troubleshooting
Excessive output
Progress Table works correctly in most consoles, but there are some exceptions:
-
Some cloud logging consoles (e.g. Kubernetes) do not handle live, carriage-return-based redraws properly. You can still use ProgressTable with
interactive=0. This mode prints rows when they are finalized and does not display progress bars. -
Some consoles, such as the PyCharm Python Console or IDLE, do not support moving the cursor to previous lines. You can still use ProgressTable with
interactive=1. This mode can redraw the current line and display one progress-bar position, but previous rows remain visually frozen.
When
interactiveis omitted, it defaults to1in Jupyter,0when output is redirected, and2in an interactive terminal. Set it explicitly when creating the table, or override the automatic default with thePTABLE_INTERACTIVEenvironment variable, for examplePTABLE_INTERACTIVE=1.
Other problems
If you encounter different messy outputs or other unexpected behavior: please create an issue!
Installation
Install Progress Table easily with pip:
pip install progress-table
Links
Alternatives
-
Progress bars: great for tracking progress, but they don't provide ways to display data in clear and compact way
tqdmrich.progresskeras.utils.Progbar
-
Libraries displaying data: great for presenting tabular data, but they lack the progress tracking aspect
rich.tabletabulatetexttable
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file progress_table-3.3.2.tar.gz.
File metadata
- Download URL: progress_table-3.3.2.tar.gz
- Upload date:
- Size: 29.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19a76350a7af7a2a8a8cb14a65f78bf58853466737305fcc937953a13397dca4
|
|
| MD5 |
34b780f6592a4b2dbed83ebf55ca358b
|
|
| BLAKE2b-256 |
0a373853d4e753ff240359088c3d19f0da0099b1b92cbf4e1706628705aaf4d0
|
File details
Details for the file progress_table-3.3.2-py3-none-any.whl.
File metadata
- Download URL: progress_table-3.3.2-py3-none-any.whl
- Upload date:
- Size: 21.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
118888c24d21619db2e34dc9e5c0e8ec1c5a6b6a5c58d7945372969e76d30a52
|
|
| MD5 |
dc2da6aa93461f9d08ab682c51a126b5
|
|
| BLAKE2b-256 |
30ead6d564170abf63cab1689410864c1fc7ac0d9b5f330a5da9a921f07845d9
|