Skip to main content

Exp Log - A Minimal Experiment Logger

Installation

pip install explog

Then, import explog as xl.

Logging

Use exp = xl.exp(config) to initialize an experiment and exp.log(...) to log statistics.

import explog as xl
import random

config = {'num_epochs': 100, 'learning_rate': 1e-3, 'batch_size': 32}

exp = xl.exp(config)

for epoch in range(config['num_epochs']):
    loss = random.random() * 1.05 ** (- epoch)
    exp.log(epoch=epoch, loss=loss)
  • NB: Using xl.log(...) instead of exp.log(...) automatically logs to the latest experiment.
  • NB: Both xl.exp(...) and xl.log(...) accept dictionary or kwargs arguments.

Exploring runs

Retrieve dataframe of experiments using xl.exps().

> xl.exps()
          num_epochs  learning_rate  batch_size
_id
w1gf6deg         100          0.001          32
6mwn9cno         100          0.001          32
hdakmy0l         100          0.001          32

Exploring logs

Retrieve dataframe of logs using xl.logs().

> xl.logs()
                epoch      loss  num_epochs  learning_rate  batch_size
_id      _step
w1gf6deg 0          0  0.901695         100          0.001          32
         1          1  0.676328         100          0.001          32
         2          2  0.194963         100          0.001          32
         3          3  0.345743         100          0.001          32
         4          4  0.645544         100          0.001          32
...               ...       ...         ...            ...         ...
hdakmy0l 95        95  0.003342         100          0.001          32
         96        96  0.000132         100          0.001          32
         97        97  0.003763         100          0.001          32
         98        98  0.008314         100          0.001          32
         99        99  0.004589         100          0.001          32

Plotting

Use dataframe of logs from xl.logs() to make your plots.

import explog as xl
import matplotlib.pyplot as plt

logs = xl.logs('epoch', 'loss')
logs = logs.groupby('epoch').mean()

plt.plot(logs.index, logs['loss'])
plt.show()

Weights & Biases users

Use aliases run = xl.init(config) for exp = xl.exp(config) and xl.runs for xl.exps.

> run = xl.init(config)
> run.log(step=0)
> xl.runs()
          num_epochs  learning_rate  batch_size
_id
z5y6tdm5         100          0.001          32

Metadata

Release files for explog 0.0.3

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

Source distribution (sdist)

Source distribution for explog 0.0.3
File Size Uploaded Provenance Actions
explog-0.0.3.tar.gz 4.5 kB Without provenance Details for explog-0.0.3.tar.gz

Built distribution (wheel)

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

Total release size: 9.3 kB

Release files / explog-0.0.3.tar.gz

Download URL explog-0.0.3.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d36815dbf4e66da4db251cce15158c08d1ff17a3969db28ff0159d834d63faa6
BLAKE2b-256 checksum
How to use checksums
64c0900f5c27f5a1f0beb34fbdb52a037a63cca5c6ff8e252bef2b92a5e84bbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.13

Release files / explog-0.0.3-py3-none-any.whl

Download URL explog-0.0.3-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
04bec80cfd0631040e2b0ac1804fb7d92ff040bfcdbe0a00388330a5d2e5acc3
BLAKE2b-256 checksum
How to use checksums
9de50549fc94fee0878d4b871df21bcf57be98d3a6b4d4bb6596dfa8819f1c85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.13

Security for explog 0.0.3

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