Skip to main content

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 = dm.runs('metrics/run1.*')
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)
df = dm.concat(runs, 'loss') # pd.Series with cumulative step indices

# whatever you want to do with the pd.Series's
ss = dm.readall(runs, 'loss') # list[pd.Series] with `metrics.id` as each name

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

demetric-0.1.8.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

demetric-0.1.8-py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 3

Supported by

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