Skip to main content

Simple AI Logging

Project description

onelog

onelog is the simplest AI training logging library in the world. Just drop in a few log statements and immediately see your results in a single html file.

Installation

pip install onelog

Usage

Basic Scalar Logging 📊

import onelog

onelog = onelog.Logger()

for dummy_loss in range(20, 1, 0.1):
    onelog.log_scalar(dummy_loss, "dummy_loss")

onelog.finish()

Advanced Logging with Hyperparameters and Images 🖼️

import onelog
from PIL import Image

onelog = onelog.Logger()

# Log hyperparameters ⚙️
onelog.log_hyperparameters({
    "learning_rate": 0.001,
    "batch_size": 32,
    "epochs": 100
})

# Log scalar values 📈
for epoch in range(10):
    loss = 1.0 / (epoch + 1)
    accuracy = 0.8 + epoch * 0.02
    onelog.log_scalar(loss, "training_loss")
    onelog.log_scalar(accuracy, "accuracy")

# Log images 🖼️
sample_image = Image.new('RGB', (100, 100), color='red')
onelog.log_image(sample_image, "sample_output")

# Save as HTML report 📄
onelog.save_html("training_report.html")

Available Methods

  • log_scalar(value, name) 📊 - Log numeric values (int/float)
  • log_image(image, name) 🖼️ - Log PIL Image objects
  • log_hyperparameters(params) ⚙️ - Log training hyperparameters
  • finish(html_path=None) ✅ - Finish logging and optionally save HTML
  • save_html(target_path) 💾 - Save current data as HTML report

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

onelog-0.2.0.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

onelog-0.2.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file onelog-0.2.0.tar.gz.

File metadata

  • Download URL: onelog-0.2.0.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.25.4 CPython/3.13.5 Linux/6.11.0-1015-azure

File hashes

Hashes for onelog-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f19096e648f58f0943b6b510744da1280c73ca39378b20f7a8ca53dd1a8beab9
MD5 4617512b09f25f0c47d0613a43a05928
BLAKE2b-256 12aa8ff905469ad8b6f92c9d93c8bdca76816e9beea8e01e8df841f73ae1b975

See more details on using hashes here.

File details

Details for the file onelog-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: onelog-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.25.4 CPython/3.13.5 Linux/6.11.0-1015-azure

File hashes

Hashes for onelog-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4e587a8d5f684c3e68ed98331da32da1b77f758a65de16cb8d84613161ace321
MD5 e81b98fa88a5bf488ca3913aebb0eb89
BLAKE2b-256 aa58727beda5fe42b24890b1e57747a5e854f070432423ee1bc888cfd5b0d964

See more details on using hashes here.

Supported by

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