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.4.tar.gz (37.5 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.4-py3-none-any.whl (41.6 kB view details)

Uploaded Python 3

naw-0.0.4-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (658.3 kB view details)

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

naw-0.0.4-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (663.3 kB view details)

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

naw-0.0.4-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (673.5 kB view details)

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

naw-0.0.4-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.4-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.4.tar.gz.

File metadata

  • Download URL: naw-0.0.4.tar.gz
  • Upload date:
  • Size: 37.5 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.4.tar.gz
Algorithm Hash digest
SHA256 dc6d544669f164d70bd7091a4038f750cc98304b7a60bcd323087e519e464dd4
MD5 415f5a68535650bd3e1dea09a0149f4a
BLAKE2b-256 231e6c90e74831ee841c498cb32b67312deac75a65e4bdd1fa07db7113a3684d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: naw-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 41.6 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6fb8839bea014081d1c9c2b27271653142d74b70b3ebc92dbc4f303d0192d0d4
MD5 136000a7a172eafbfa3f23ca531eab95
BLAKE2b-256 2c4a78905e304bf9faad32c8a30d395d72d726c2fa8e4fef072362077de79725

See more details on using hashes here.

File details

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

File metadata

  • Download URL: naw-0.0.4-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
  • Upload date:
  • Size: 658.3 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.4-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ef144384ff0b1f9de3bedc7de518fd0f69cdd8dd651c3a4a3c736126479a0795
MD5 10567d5a987cda64eadeabeab6f3ca4e
BLAKE2b-256 db72e64228b9987bf8b9478d774129e8d7f7c9d4fed7a6a107aa5e9ec911b05e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: naw-0.0.4-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
  • Upload date:
  • Size: 663.3 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.4-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 7fc68eff0eaa7ce326c2958f5fcc20ec7d3b3f6dc94ed6b54e03cf7614e8c9d3
MD5 32f9e56235807337d2adb4df3650b89a
BLAKE2b-256 6d630e76a880586829cf5c637c4232b324ab2a5323f31c64f96e0c96b1e6bad2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: naw-0.0.4-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
  • Upload date:
  • Size: 673.5 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.4-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c8752c023740e0a5f492bbc2d6811749cec6288ec739c48fe2e04e655d192fe4
MD5 40778971df8e2f8e19a19b40ea386f12
BLAKE2b-256 91ad926c9396fe21329ae63c8577c1c058620584ede1e12a8ab83a67fc793c57

See more details on using hashes here.

File details

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

File metadata

  • Download URL: naw-0.0.4-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.4-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 42e244395d64d30a7713700498a041198859330c16e9b343ee79486c51c6aebe
MD5 d060dabddfc8ac5cc03c464a5d4aaef4
BLAKE2b-256 f47025990f21b847020b6dee5f75149d78aa731dbb484e6929f2745f5897cfd6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: naw-0.0.4-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.4-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c91fcb311dbe1bd64a743c8eade17cb94a03b19c2d9b70bf2432e5322aa1d286
MD5 426162c1da94dc53e96c179796142c03
BLAKE2b-256 b89aaf25d0e52e8fa443b735b3e1358d390b0c33e861408894ea44e94f1009e3

See more details on using hashes here.

Release history Release notifications | RSS feed

0.0.10

7 files

0.0.8

7 files

0.0.7

7 files

This release

0.0.4 This release

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