Simple and composable metric tracking and logging for ML
Project description
Demetric
Dead simple standard for metric logging
Logging
import demetric as dm
metrics = dm.Metrics.new('metrics/gpt2-3')
metrics.log('loss', value=loss, step=step)
metrics.log('accuracy', value=acc, step=step)
# ...
Creates:
runs/
gpt2-3/
loss.csv
accuracy.csv
Statistics
# single metrics
metrics = dm.Metrics('metrics/run1.0')
metrics.read('loss') # pd.Series
# comparing runs
runs = { run: dm.Metrics(run) for run in ['metrics/version1', 'metrics/version2'] }
df = dm.compare(runs, 'loss') # pd.DataFrame with columns ("run1.0", "run1.1", ...)
# concatenating runs (i.e. they're the same experiment but trained by steps or something)
runs = [dm.Metrics(run) for run in ['metrics/part1', 'metrics/part2']]
df = dm.concat(runs, 'loss') # pd.Series with cumulative step indices
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
demetric-0.1.10.tar.gz
(3.0 kB
view hashes)
Built Distribution
Close
Hashes for demetric-0.1.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8035db1cf1067a0d03e6b35437aa2773652de8d53aabe27de386e906215c60c5 |
|
MD5 | 41b1a5c8317b870365071e981aa43275 |
|
BLAKE2b-256 | 71b9171b1b1208611ac6d050dec9bd20eb755c555366ebf8e58023da5e9a65c5 |