trainbay
Log training metrics to a local SQLite file and watch them live in your IDE with the Trainbay extension. No account, no server, no browser.
import trainbay
trainbay.init(name="mnist-baseline", config={"lr": 3e-4, "batch_size": 64}) # optional
for step in range(1000):
loss = train_step()
trainbay.log({"train/loss": loss}, step=step)
trainbay.finish() # optional, runs automatically when the script exits
How it works
log()only puts values in memory. A background thread writes them in batches (every 50 values or 0.5 s).- Data goes to
.trainbay/trainbay.dbin the project root: the first folder that has.trainbay,.gitorpyproject.toml, walking up from the script's folder, then from the working directory. SetTRAINBAY_DIRto use another folder. - The
.trainbay/folder ignores itself in git. - On a network path (UNC,
\\wsl$, mapped network drive), SQLite cannot share the file safely, so the database goes to%LOCALAPPDATA%\Trainbay\<project>-<hash>and a warning is printed. - The run is
finishedwhen the script exits normally,stoppedon Ctrl+C andfailedon any other uncaught exception. A run killed hard (Task Manager,taskkill /F, SIGKILL) staysrunningwith a stale heartbeat; the IDE shows it as stopped. Up toflush_intervalseconds of the newest values are lost in that case; calltrainbay.flush()to write everything now. - With
torchrun, only the process withRANK=0writes. - Values must be numbers (Python numbers, NumPy scalars, 0-d tensors). NaN is stored as empty.
Requires Python 3.11+. No dependencies besides the standard library.
Development
uv run pytest
Metadata
Release files for trainbay 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| trainbay-0.0.1.tar.gz | 572.8 kB | Without provenance | Details for trainbay-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| trainbay-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for trainbay-0.0.1-py3-none-any.whl |
Total release size: 582.7 kB
Release files / trainbay-0.0.1.tar.gz
| Download URL | trainbay-0.0.1.tar.gz |
|---|---|
| Size | 572.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
87e5c947042888ac24f04b3514d4f8b229687bd7e18621e02f474db3634254eb
|
|
BLAKE2b-256 checksum How to use checksums |
b44d67890aa89ca905be537e77255dd4d7cd245fa7efd9709b005e36f042b947
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / trainbay-0.0.1-py3-none-any.whl
| Download URL | trainbay-0.0.1-py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b884b2f65252d41ab3e0189328f4fb8597f88334d294c1e7c2d72fe92a4f6549
|
|
BLAKE2b-256 checksum How to use checksums |
29e6aa5b9b6ce3eea8587659e2b6c97eafbe6fd3bffa5d836f80185fd2635f3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for trainbay 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.