stable_pretraining.web

stable_pretraining.web#

Local, dependency-free web viewer for spt runs. Reads sidecar.json + metrics.csv (and optional media.jsonl) produced by RegistryLogger and serves a wandb-like UI backed by Python’s stdlib http.server + Server-Sent Events. NFS-safe by design (mtime polling, no inotify), no external dependencies (uPlot is loaded from a CDN).

Launch with spt web — see CLI reference for command-line flags. The Python entry point serve() is exposed for embedding in custom scripts (e.g. launching alongside training).

Entry point#

serve(directory[, host, port, poll_interval])

Internals#

These are useful when extending the viewer (custom endpoints, alternate scanners) but normal users only need serve().

scan.RunScanner(root[, poll_interval])

Polls a directory tree for sidecar+metrics changes and fans out events.