u1234x1234 / itertab

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

itertab: pretty printed table

Coverage Status

Description

itertab is a pretty printed table with cell highlighting and automatic relative difference calculation.

The main purpose of this package is a basic understanding of the learning process (or any other iterative processes), without leaving the terminal and not relying on more advanced metric loggers (such as Tensorboard)

Usage

Suppose you have a python script example.py with the following content:

import time
import numpy as np
from itertab import PrettyTable

table = PrettyTable()
for epoch in range(15):
    metrics = {
        'epoch': epoch,
        'train': {
            'Train_Accuracy': np.random.uniform(),
            'Train_LogLoss': np.random.uniform(),
        },
    }
    table.add_row(metrics)
    table.clear_screen_and_print()

    time.sleep(0.3)

If you run example.py in the terminal you will get output similar to the one above.

Installation

pip install git+ssh://git@github.com/u1234x1234/itertab.git

About

License:MIT License


Languages

Language:Python 100.0%