Skip to main content

naw

naw logs machine-learning time-series metrics to a compressed file on disk, and gives you a CLI to read them back.

It is two things in one package:

  • a storage library (naw.rtsdb) that writes typed, columnar, compressed rows to a single .rtsdb file, and reads them back — including while the file is still being written;
  • a wandb-compatible façade (naw.wandb) so that code already instrumented with wandb.init() / run.log() keeps working with nothing but an import change.

Full documentation: https://mlacage.gitlabpages.inria.fr/naw

Installation

$ pip install naw          # or: uv add naw

naw requires Python 3.10 or newer and pulls in three small dependencies (argcomplete, pyyaml, tabulate) — no NumPy. The plot and heatmap subcommands render through uniplot and matplotlib, which are not installed by default; get them with the plot extra:

$ pip install "naw[plot]"   # or: uv add "naw[plot]"

Log a run

import naw.wandb as wandb

run = wandb.init(project="demo", config={"lr": 3e-4})
for step in range(1000):
    run.log({"loss": loss})
run.finish()

init() creates <dir>/wandb/<project>/<id>.rtsdb. A run that is never finished is still readable — you just lose the summary.

Read it back

Every subcommand takes the run filename as its first argument:

Command Description
naw metadata FILE Show the run's identity, configuration and final summary.
naw metrics FILE List the metric columns present in the run and their storage types.
naw watch FILE Print metric rows as they are written, then exit when the run closes.
naw plot FILE -y METRIC Plot one metric against another (terminal, matplotlib, SVG, PNG or CSV).
naw heatmap FILE -m METRIC Render a histogram metric as a 2-D density map over time.
$ naw plot wandb/demo/<run-id>.rtsdb -y loss --lines

How it compresses

Values are grouped by column rather than by row, and each column is encoded with a scheme suited to its type: integers as a delta against the previous row then LEB128 varint, floats as an XOR against the previous row's value then a varint over the resulting bit pattern, and float16/bfloat16 in 2 bytes. A step counter that increments by one costs a single byte per row.

The writer periodically emits a sync point carrying a schema index, so a reader that opens the file mid-run can seek to the last sync point instead of replaying the whole file. That is what makes naw watch a live tail rather than a repeated full parse.

Documentation

References

The XOR-then-varint idea is the one introduced by Gorilla and refined by Chimp and Elf; naw uses varint framing rather than these papers' bit-level framing, which keeps decoding cheap and the format simple to reason about.

  • Gorilla: A fast, scalable, in-memory time series database
  • Chimp: efficient lossless floating point compression for time series databases
  • Elf: Erasing-Based Lossless Floating-Point Compression

License

MIT — see LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

naw-0.0.7.tar.gz (37.7 kB view details)

Uploaded Source

Built Distributions

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

naw-0.0.7-py3-none-any.whl (41.7 kB view details)

Uploaded Python 3

naw-0.0.7-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (658.4 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

naw-0.0.7-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (663.2 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

naw-0.0.7-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (673.4 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

naw-0.0.7-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (633.0 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

naw-0.0.7-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (597.1 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

File details

Details for the file naw-0.0.7.tar.gz.

File metadata

  • Download URL: naw-0.0.7.tar.gz
  • Upload date:
  • Size: 37.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.33 {"installer":{"name":"uv","version":"0.11.33","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for naw-0.0.7.tar.gz
Algorithm Hash digest
SHA256 36ca3dd163ff282ad65a84debf1d0f151dbff8e6afbca678d0ab0b0ce35024f6
MD5 00559a870aa730dfc286caca589d6e68
BLAKE2b-256 e303472edd74a068d57bf03be1fe7df0c7f4e632e97f4bafbfbeed0b4245e8f1

See more details on using hashes here.

File details

Details for the file naw-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: naw-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 41.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.33 {"installer":{"name":"uv","version":"0.11.33","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for naw-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 2a979dfc7ee62e76a7d181836276cb7474d3a9f615cf0d537a2863ae37bb6a3f
MD5 1fee81353b5afa49176f754843cae0f0
BLAKE2b-256 0681a48759283a0d39c32b81f3308d985f224327fa23ee906460ddbe44e49866

See more details on using hashes here.

File details

Details for the file naw-0.0.7-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

  • Download URL: naw-0.0.7-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
  • Upload date:
  • Size: 658.4 kB
  • Tags: CPython 3.14, manylinux: glibc 2.28+ x86-64, manylinux: glibc 2.5+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.33 {"installer":{"name":"uv","version":"0.11.33","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for naw-0.0.7-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e18da86bd75a29d9df4f9438fa13b70916628cdc432a967742e62fdbc83c7020
MD5 23a56cc376cc3f4f01afdab9be49b67b
BLAKE2b-256 71d011ac3d9136ae68565f2fca6ad3ef336ca9af62f425c8d78d51e1340a5d55

See more details on using hashes here.

File details

Details for the file naw-0.0.7-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

  • Download URL: naw-0.0.7-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
  • Upload date:
  • Size: 663.2 kB
  • Tags: CPython 3.13, manylinux: glibc 2.28+ x86-64, manylinux: glibc 2.5+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.33 {"installer":{"name":"uv","version":"0.11.33","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for naw-0.0.7-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 bdb01916e47bf6de28efd681b4fce41d26bfa3245bedd5ab563814214ab1a9bf
MD5 a01982655b73c4df24ebe01ef63da123
BLAKE2b-256 0624650cba8aa03a4fd52e3776f55e3adc270de74f564941038563bb275857e8

See more details on using hashes here.

File details

Details for the file naw-0.0.7-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

  • Download URL: naw-0.0.7-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
  • Upload date:
  • Size: 673.4 kB
  • Tags: CPython 3.12, manylinux: glibc 2.28+ x86-64, manylinux: glibc 2.5+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.33 {"installer":{"name":"uv","version":"0.11.33","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for naw-0.0.7-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 0cc7f7a8f6d71a50d1a69122e12b3ac4fdbd052b058ee719a4e152e9e960a797
MD5 12be511dcb125f45861c77b45731d656
BLAKE2b-256 b7230494d6ef65b8a15073b6e42a9566534cfb017f6a453fe7d6cf37b6be52c1

See more details on using hashes here.

File details

Details for the file naw-0.0.7-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

  • Download URL: naw-0.0.7-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
  • Upload date:
  • Size: 633.0 kB
  • Tags: CPython 3.11, manylinux: glibc 2.28+ x86-64, manylinux: glibc 2.5+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.33 {"installer":{"name":"uv","version":"0.11.33","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for naw-0.0.7-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 dc85157bdc7b0dbc1083848ce2d70c4451ddaee4535c6b18f9f03165de52e9ca
MD5 5ccb31e8eade204f39034f8bc0e4f408
BLAKE2b-256 54ed4a4b75428a4e58c490bc6a2d9267c0efe74a1750cf9492f51dc702e6f454

See more details on using hashes here.

File details

Details for the file naw-0.0.7-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

  • Download URL: naw-0.0.7-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
  • Upload date:
  • Size: 597.1 kB
  • Tags: CPython 3.10, manylinux: glibc 2.28+ x86-64, manylinux: glibc 2.5+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.33 {"installer":{"name":"uv","version":"0.11.33","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for naw-0.0.7-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 7f2f1fba1c070148bd55c745e3e2e1ca6a10a81935d689db523d109f1b41ca3c
MD5 0c7b9b00357d948b0543dbe6f7757020
BLAKE2b-256 7141e58a4f942ee0a80f3e3ea26a3d297a92b449b6a5d320a80ad84e15e35112

See more details on using hashes here.

Release history Release notifications | RSS feed

0.0.10

7 files

0.0.8

7 files

This release

0.0.7 This release

7 files

0.0.4

7 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page