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
Metadata
Release files for demetric 0.1.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| demetric-0.1.13.tar.gz | 3.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| demetric-0.1.13-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.1 kB
Release files / demetric-0.1.13.tar.gz
| Download URL | demetric-0.1.13.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5c610885f9dd0ac0280c8e787acac4c4e1290f6623ed4a207a7a17da7e2a3017
|
|
BLAKE2b-256 checksum How to use checksums |
61ecadb598c898665c1d9d8576f5475c4f3f329de72d2b7e10748744079d5486
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.11.6
|
Release files / demetric-0.1.13-py3-none-any.whl
| Download URL | demetric-0.1.13-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2bc3bcf352dd9b5b4448b139d3ee9076302c98dbe585aa6cc3056bc4bb06ba7d
|
|
BLAKE2b-256 checksum How to use checksums |
829e84908304f7dfdb10d4052d09ca4e910d0eb8ecc1391fa13030820d2f1a80
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.11.6
|