MLog
A minimal logging utility for machine learning experiments.
Installation
> pip install pymlog
Logging
import mlog
import random
CONFIG = {'num_epochs': 100}
# Create a new run with an associated configuration
run = mlog.start(run='run_name', config=CONFIG, save='*.py')
# Log seamlessly
for epoch in range(CONFIG['num_epochs']):
loss = random.random() * (1.05 ** (- epoch))
run.log(epoch=epoch, loss=loss)
metric = random.random()
run.log(epoch=epoch, metric=metric)
Quick preview
> mlog plot epoch loss
> mlog plot epoch loss --aggregate median
> mlog plot epoch loss --aggregate median --intervals max
> mlog plot loss metric --scatter
Manage runs
> mlog list
_name num_epochs learning_rate batch_size
_run_id
1 run 100 0.001 32
2 run 100 0.001 32
3 run 100 0.001 32
4 run 100 0.001 32
5 run 100 0.001 32
6 run 100 0.001 32
7 run 100 0.001 32
8 run 100 0.001 32
9 run 100 0.001 32
10 run 100 0.001 32
This command starts an interactive interface where you can use commands like:
hjklto navigate left, down, up and right,gGto go up and down,dto delete run,spaceto preview plot,qto exit.
Plotting
import mlog
import pandas as pd
import matplotlib.pyplot as plt
# Retrieve data
df = mlog.get('epoch', 'loss')
df = df.groupby('epoch').aggregate(['mean', 'min', 'max'])
# Plot data
fig, ax = plt.subplots()
ax.plot(df.index, df.loss['mean'])
ax.fill_between(df.index, df.loss['min'], df.loss['max'], alpha=0.4)
plt.show()
Metadata
Release files for pymlog 0.0.26
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pymlog-0.0.26.tar.gz | 8.2 kB | Without provenance | Details for pymlog-0.0.26.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pymlog-0.0.26-py3-none-any.whl | Python 3 | none | any | Details for pymlog-0.0.26-py3-none-any.whl |
Total release size: 16.4 kB
Release files / pymlog-0.0.26.tar.gz
| Download URL | pymlog-0.0.26.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4388d50e7146045f896f281243657cc9fdd78ef989ced3356d6388476acae150
|
|
BLAKE2b-256 checksum How to use checksums |
aac8123d3d41094212615e06b62834e836c5bf78f0fa18642dabc069f3bbc71a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / pymlog-0.0.26-py3-none-any.whl
| Download URL | pymlog-0.0.26-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
325ee99dc9b3392976f335f6b9d1c5546efdfa628068193fe13d43608574b9d0
|
|
BLAKE2b-256 checksum How to use checksums |
4eb7908944f87e2d5653c41f1adaac0cc688ebf23cedba8f22748b5a3f1f53a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Security for pymlog 0.0.26
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.