Skip to main content

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

Reading

# single metrics
metrics = dm.Metrics('metrics/run1.0')
metrics.read('loss') # pd.DataFrame

# all metrics
metrics.read() # pd.DataFrame with a column per metric

# comparing runs
runs = { run: dm.Metrics(run) for run in ['metrics/version1', 'metrics/version2'] }
df = dm.compare(runs, 'loss') # pd.DataFrame with columns ("loss_run1.0", "loss_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.DataFrame with cumulative step indices

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.13.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

demetric-0.1.13-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file demetric-0.1.13.tar.gz.

File metadata

  • Download URL: demetric-0.1.13.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.6

File hashes

Hashes for demetric-0.1.13.tar.gz
Algorithm Hash digest
SHA256 5c610885f9dd0ac0280c8e787acac4c4e1290f6623ed4a207a7a17da7e2a3017
MD5 b6dd19479077b46005923a7c977ed068
BLAKE2b-256 61ecadb598c898665c1d9d8576f5475c4f3f329de72d2b7e10748744079d5486

See more details on using hashes here.

File details

Details for the file demetric-0.1.13-py3-none-any.whl.

File metadata

  • Download URL: demetric-0.1.13-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.6

File hashes

Hashes for demetric-0.1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 2bc3bcf352dd9b5b4448b139d3ee9076302c98dbe585aa6cc3056bc4bb06ba7d
MD5 3682a20e43bda5c79c467c4dc870815e
BLAKE2b-256 829e84908304f7dfdb10d4052d09ca4e910d0eb8ecc1391fa13030820d2f1a80

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.13 This release

2 files

0.1.12

2 files

0.1.11

2 files

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

1 file

0.1.4

2 files

0.1.3

1 file

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page