Experiment Logger
Project description
ExpLog - A Minimal Experiment Logger
Installation
pip install explog
Logging
Use run = explog.init(config) to initialize an experiment and run.log(...) to log statistics.
import explog
import random
config = {'num_epochs': 100, 'learning_rate': 1e-3, 'batch_size': 32}
exp = explog.init(config)
for epoch in range(config['num_epochs']):
loss = random.random() * 1.05 ** (- epoch)
exp.log(epoch=epoch, loss=loss)
Exploring runs
Retrieve dataframe of experiments using explog.exps().
> explog.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 explog.logs().
> explog.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 explog.logs() to make your plots.
import explog
import matplotlib.pyplot as plt
df = explog.logs('epoch', 'loss')
df = df.groupby('epoch').mean()
plt.plot(df.index, df['loss'])
plt.show()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
explog-0.0.1.tar.gz
(3.8 kB
view details)
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 explog-0.0.1.tar.gz.
File metadata
- Download URL: explog-0.0.1.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf0ed9d842845e1b10114c149f781adbf81d097807989c794cfe334fcbb3de00
|
|
| MD5 |
5aa88893c0da64b1f0adfd4df85672e3
|
|
| BLAKE2b-256 |
1f8ffcda9303d320f5505f7556229eb4f8116d1dbba2ad90fc26de5ad26b0ff3
|
File details
Details for the file explog-0.0.1-py3-none-any.whl.
File metadata
- Download URL: explog-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a0e881505fad9a5761123c1c8ff3f6b75c43f654933d9bd151085c0872241eb
|
|
| MD5 |
6326ce98b7a401385b0b836732016fe3
|
|
| BLAKE2b-256 |
0011336ba5937144e8be184e05a96dc46fd79d231686cbbc9380c21054c0281a
|