tboardfs
Read TensorBoard event logs as ordinary files.
tboardfs shows TensorBoard event files (events.out.tfevents*) as a read-only directory tree. Browse the typed view to
read scalars as tables, images as images, and tensors as NumPy arrays. Use the separate raw view to read the original
TFRecord frames, including records with no typed representation. Neither view needs TensorFlow or TensorBoard.
$ tboardfs runs mnt
$ ls mnt
experiment-1 experiment-2
$ ls mnt/experiment-1/scalars/train
accuracy.json accuracy.npz accuracy.tsv loss.json loss.npz loss.tsv
$ head -3 mnt/experiment-1/scalars/train/loss.tsv
epoch step wall_time relative_time value
0.0 1 1700000001.0 0.0 1.5
1.0 2 1700000002.0 1.0 0.75
tboardfs reads the logs of TensorFlow 1 and 2, Keras, PyTorch (torch.utils.tensorboard), PyTorch Lightning,
tensorboardX, and other writers of the same event format.
There are two ways to use it:
tboardfsmounts a log directory with FUSE. The mount follows a training run while it writes new events.tboardfs-filelists and copies the same virtual files without FUSE, for example in scripts, in containers, or on machines where you cannot mount.
Installation
tboardfs needs Python 3.12 or later.
Mounting requires FUSE, permission to use /dev/fuse on Linux, and a working fusermount or fusermount3. Use
tboardfs-file where mount privileges are unavailable.
On Debian or Ubuntu, install FUSE:
sudo apt install fuse3
The Python package uses puremagic's bundled signature database. It does not require the system libmagic library.
Run tboardfs directly with uv:
uvx tboardfs SOURCE MOUNTPOINT
On x86-64 Linux with GIL-enabled CPython, libfuse 2.9 and mfusepy 3.1.1, a second optional extension lets FUSE workers reuse Python thread state and copy encoded stat data directly into libfuse's reply buffer.
This does not change source validation or the size reported for an open handle.
Other builds, including libfuse 3 mounts, use the ordinary mfusepy callbacks.
To build a pure Python wheel, use TBOARDFS_PURE_PYTHON=1 uv build --wheel.
Set TBOARDFS_PURE_PYTHON=1 for a strict editable install on a machine without a C compiler.
If an installed extension cannot load, tboardfs reports the import error rather than hiding the installation problem.
Reinstall from a pure Python wheel to use the portable implementation.
Filesystem Mode
tboardfs [OPTIONS] SOURCE MOUNTPOINT
SOURCE is a log directory or a run directory. MOUNTPOINT is an existing directory. The mountpoint must not be inside SOURCE, and SOURCE must not be inside the mountpoint.
mkdir -p mnt
tboardfs runs/experiment-1 mnt
ls mnt
cat mnt/scalars/loss.json
fusermount -u mnt # unmount; with libfuse 3, use fusermount3 -u
tboardfs runs in the background by default. With --foreground, it stays in the terminal until you stop it with Ctrl+C.
| Option | Default | Meaning |
|---|---|---|
--scalar-format LIST |
json,tsv,npz |
Comma-separated table formats for scalars, histograms and distributions: json, tsv, csv, npz. |
--step-digits N |
6 |
Zero-padding width of step file names, from 1 to 20. |
--refresh-age-seconds S |
150 |
Minimum interval between local searches for new files and directories (0 to search on each access, inf to freeze each directory after its first scan). |
--source-check-seconds S |
120 |
Minimum interval between status checks of known event files in an accessed run. Accepts finite, nonnegative seconds; 0 checks on every access. |
--cache-size-mb N |
1024 |
Memory for rendered files. 0 turns the cache off. |
-j N, --index-workers N |
4 |
Maximum workers per cold file index. |
--disk-index |
off | Reuse verified per-file indexes across mounts. |
--disk-index-size-mb N |
2048 |
Disk budget in MiB for saved index payloads; does not enable the disk index by itself. |
--root-owner / --user-owner |
--root-owner |
Owner of all files and directories: root, or the user who mounts. |
--foreground / --background |
--background |
Stay in the terminal, or detach. |
--logfile FILE |
none | Write the log to FILE. |
--loglevel LEVEL |
INFO |
trace, debug, info, success, warning, error, or critical, in any case. |
In the background, the log goes only to --logfile. Without --logfile, you do not see the warnings about damaged
data; use --logfile or --foreground when you need them.
Storage: The default is $XDG_CACHE_HOME/tboardfs/indexes-v1, or ~/.cache/tboardfs/indexes-v1 when no absolute
XDG cache directory is configured.
The cache can contain training values and metadata: choose a private location outside the source and mount with no symlink components.
Entries expire 30 days after writing; subsequent writes reclaim expired entries and evict the oldest writes to fit
--disk-index-size-mb.
Deleting the cache while unmounted loses only the speedup, not the event data.
Command Mode
tboardfs-file [--logfile FILE] [--loglevel LEVEL] [--framing-only] COMMAND [OPTIONS] SOURCE ...
SOURCE is one event file, a run directory, or a log directory.
- For one event file, the tabs are at the root, for example
/scalarsand/images. - Projector, profile, Open3D and other sidecar files require a run directory as SOURCE.
- For a directory, the tree is the same as a mount of that directory.
| Command | Purpose |
|---|---|
list SOURCE [PREFIX] |
Print the virtual file paths below PREFIX, one per line. |
get SOURCE VPATH -o OUTPUT |
Write one virtual file to OUTPUT. -o - writes it to stdout. |
copy-all SOURCE OUTDIR |
Copy the selected view into OUTDIR. |
All three commands accept --scalar-format and --step-digits, with the same meaning as in filesystem mode. list and
copy-all default to typed files. Use --view raw for complete frames or --view both for both views. list with an
explicit raw prefix and get with an explicit raw path can select a frame directly.
For a single event file, tboardfs-file --framing-only list SOURCE lists raw frames without decoding summaries or
calling the payload classifier.
--framing-only also works with get and copy-all and implies the raw view.
It checks both CRCs of every frame before producing output, even when you request only the first frame.
Use the default mode when you also want warnings about malformed protobufs or typed conversions.
tboardfs-file list events.out.tfevents.123
tboardfs-file list runs /experiment-1/meshes
tboardfs-file get events.out.tfevents.123 /scalars/loss.json -o -
tboardfs-file get events.out.tfevents.123 images/sample/000001.png -o sample.png
tboardfs-file get events.out.tfevents.123 scalars/loss.tsv -o exported/
tboardfs-file copy-all runs exported-runs --skip-existing
tboardfs-file copy-all --view raw events.out.tfevents.123 frames
cat frames/raw/events.out.tfevents.123/*.tfrecord > reconstructed.events
- A virtual path can start with or without
/. - When
-ois an existing directory, or a missing path that ends in/,getwrites the file under its own name in that directory. getdoes not overwrite a file unless you give--force.copy-allcopies the files in sorted virtual-path order. When it finds a file that already exists, it stops, and tells which files it copied and which path stopped it.-f/--forceoverwrites existing files.-s/--skip-existingkeeps existing files, writes a warning for each, and copies the rest. You cannot use both.- Both commands refuse to write through destination symlinks. They publish each complete file atomically, not the entire export as one transaction.
Only file data and file lists go to stdout, so you can pipe them. Messages, warnings and errors go to stderr.
Directory Layout
A log directory has one directory for each run. A run is a directory that holds event files. The tabs of a run are directories in the run directory:
MOUNTPOINT/
├── experiment-1/ a run
│ ├── scalars/train/loss.json the tag train/loss
│ ├── images/sample/000010.png the tag sample at step 10
│ ├── ... the other tabs
│ └── eval/ a run inside the run experiment-1
│ └── scalars/...
└── experiment-2/
└── ...
When SOURCE is a run, its 16 typed tabs and its raw directory appear at the mount root. A typed tab without data is
empty. Multiple event files in a run contribute to the same typed tabs but retain separate directories under raw.
Tags and Steps
- A tag is a path below its tab: the tag
train/lossisscalars/train/loss.json. - Each empty component is
~empty, including a wholly empty tag. Thusa//bbecomesa/~empty/b, distinct froma/b. - Literal
%and~are%25and%7E. The reserved components.and.., backslashes, control characters and the reserved name-map filename use percent escapes. - Data with one value for each step has one file per step. The file name is the step, zero-padded to
--step-digitsdigits, such as000010.png. - An event without a step field is at step 0, as in TensorBoard.
Name Conflicts
Ordinary names keep their spelling. This naming scheme replaces the earlier lossy scheme; scripts that addressed unusual tags or conflicting names must use the new paths. Decode percent escapes only after splitting the virtual path into components.
- When a tag directory has the name of a file, such as the tag
loss.json/xbesidescalars/loss.json, the directory becomesloss.json~2/, and the file keeps its name. - When a run inside another run has the name of a tab, such as the run
exp/scalars, it becomesexp/scalars~2/.exp/scalars/keeps only the scalars ofexp. - A literal directory name
scalars~2becomesscalars%7E2, distinct from the generatedscalars~2. - Distinct sidecars at the same virtual path receive deterministic suffixes rather than hiding one file.
- A component longer than the host limit is shortened to at most 255 UTF-8 bytes. In an affected directory,
.tboardfs-names.jsonmaps shortened spellings to their original names.
Exported Data
| Tab | Files | Content |
|---|---|---|
scalars |
<tag>.json .tsv .csv .npz |
One table per tag, all steps |
histograms |
<tag>/<step>.json .tsv .csv .npz |
The buckets of one histogram |
distributions |
<tag>/<step>.json .tsv .csv .npz |
The 9 percentiles of the Distributions tab |
pr_curves |
<tag>/<step>.json .tsv .npy |
One row per threshold |
images |
<tag>/<step>.png (or .jpg, ...) |
The stored image |
audio |
<tag>/<step>.wav (or other type) |
The stored audio clip |
videos |
<tag>/<step>.gif (or other type) |
Animated GIFs and videos |
text |
<tag>/<step>.txt (and .json) |
Text, or a Markdown table |
meshes |
<tag>/<step>.json .npz .obj .ply |
Vertices, faces and colors |
tensors |
<tag>/<step>.npy .json |
Tensor values |
hparams |
hparams.json, hparams.yaml |
Hyperparameters and metrics |
custom_scalars |
layout.json |
The Custom Scalars layout |
graphs |
graph.pb, <tag>/<step>.* |
Model graphs and run metadata |
projector |
files of the run directory | Embedding projector files |
profile |
files of the run directory | Profiler files |
plugins |
<plugin>/<tag>/<step>.json |
Data of other plugins |
plugins/Open3D |
<tag>/<step>.manifest.json, ~assets/*.msgpack |
Native geometry ranges, references to earlier steps and original sidecar bytes |
raw |
<event-file>/<20-digit-byte-offset>.tfrecord |
One complete frame: header, payload and footer, in source order |
--scalar-format selects the table formats of scalars, histograms and distributions. The default is json,tsv,npz;
csv is also available.
Scalars
Each scalar tag is one table, sorted by integer step without loss of precision beyond $2^{53}$. Equal-step rows keep their producer order.
| Column | Meaning |
|---|---|
epoch |
The epoch scalar at that step (see below) |
step |
The global step |
wall_time |
Seconds since the Unix epoch |
relative_time |
Seconds since the first summary of the event file |
value |
The scalar value |
- The
epochcolumn is the value of the scalar tagepochat the same step, as PyTorch Lightning writes it. A step without anepochvalue has the last epoch written before it. Without an earlierepochvalue, the cell is missing (nullin JSON,nanin TSV and CSV). - In the
.npzfile, each column is an array with the same name.valuekeeps the stored type: float32 for TensorFlow 1 and PyTorch scalars, or the dtype of a tensor scalar, such as float64 or int64. - A supported one-value numeric tensor without a more specific plugin can be a scalar.
Histograms and Distributions
A histogram table has one row per bucket, with the columns step, epoch, wall_time, relative_time, bucket_left,
bucket_right and count. TensorFlow 1 and TensorFlow 2 histograms give the same table. As in TensorBoard, a
TensorFlow 1 histogram runs from its minimum to its maximum, without the empty buckets at its two ends. A histogram of
no values has no step file. Two observations with the same tag, step and timestamp retain separate bucket groups and
separate sets of percentiles in the per-step tables.
A distribution table has the values that the TensorBoard Distributions tab shows, with the columns step, epoch,
wall_time, relative_time, percentile and value. The 9 percentiles are 0, 6.68, 15.87, 30.85, 50, 69.15, 84.13,
93.32 and 100: the minimum, the maximum, and the positions of the mean and ±1, 2 and 3 standard deviations of a normal
distribution. Each value interpolates linearly inside its histogram bucket.
For small tables with identical metadata on every row, the text writer formats those fields once.
For common NPZ shapes, the mount reuses a NumPy-generated archive layout, not data from an earlier step.
PR Curves
The .json and .tsv tables have one row per threshold, with the columns threshold, true_positives,
false_positives, true_negatives, false_negatives, precision and recall. The thresholds are evenly spaced in
[0, 1], as in TensorBoard. The .npy file is the stored [6, N] tensor. A tensor of another shape has the columns
value_0, value_1, and so on.
Images, Audio and Videos
Media files contain the original bytes; tboardfs does not transcode them.
- A multi-sample image or audio summary has one file per sample, such as
000001_0.pngand000001_1.png. - Audio tensors can hold a vector of clips or
[clip, label]rows; the labels remain in the raw event. - Both single-frame and animated GIF images go under
videos/. - TensorBoardX and PyTorch
add_videowrite GIF image summaries rather than native video containers. - A custom
videoplugin can instead store a native video container. - An audio summary stays under
audio/even if the bytes identify a different format. - A TF2 image tensor must be a vector containing two dimension strings followed by the declared number of images. If its
layout is inconsistent,
plugins/images/contains the packed JSON andraw/keeps the original event.
Filename extensions identify likely content; they do not certify that it will decode. Unknown payloads keep .bin. If a
generated tensor view and an embedded file would have the same path, the generated view keeps its name. For example,
000007.npy describes the outer byte tensor and 000007.embedded.npy contains the original NPY file.
To store a GeoTIFF, put the encoded TIFF file bytes in Summary.Image.encoded_image_string (legacy) or after the
width and height strings in an images plugin tensor (TF2).
Passing a pixel array to tf.summary.image instead produces PNG without the TIFF tags.
Both classic TIFF and BigTIFF export as .tiff; a reader such as Rasterio uses the internal offsets and georeferencing.
External world files, .aux.xml files and .ovr files are not part of the encoded TIFF.
Repeated values with the same tag retain their own payloads even when a writer omits repeated plugin metadata.
Text
A text summary with one string has a .txt preview.
For multiple strings, the .txt preview is a Markdown table: a vector is one column, and a tensor with more than two
dimensions shows its first 2-D slice with a warning.
The adjacent .json preview keeps the full shape and all strings, but both previews replace invalid UTF-8 with �.
The text and JSON previews preserve trailing NUL characters.
Use the raw event frame to recover the exact string bytes.
Meshes
The path of a mesh is its tag without the _VERTEX, _FACE or _COLOR suffix, so train/cloud_VERTEX is under
meshes/train/cloud. A tag without that suffix uses the mesh name, which the .json file keeps. TensorBoard groups
meshes by the mesh name only, and thus mixes train/cloud and val/cloud; tboardfs keeps them apart.
.npzholds the arraysvertices,facesandcolors(when present), with their stored types and shapes..jsonholds the mesh name, the content types, the shape, and the JSON config of the summary..objis a Wavefront OBJ file. A batch of more than one mesh has one object (o mesh_<i>) per element. Vertex colors follow the coordinates asr g bvalues in [0, 1], which MeshLab and Blender read. A mesh without faces is a point cloud..plyis a binary PLY file that keeps the coordinates exactly: float32 coordinates asfloat, other numbers asdouble, and colors asucharred green blue. A point cloud has nofaceelement. A batch is one PLY mesh, with the faces of a later element offset by the vertices before it, and onecomment mesh_<i> vertices <start> <count>line per element. Faces that are not vertex indices, and colors that are not whole numbers from 0 to 255, are not in the PLY file; the.npzfile keeps them.
Tensors
A supported tensor has a .npy preview and a .json preview with its shape, dtype and values.
- Float16/32/64, complex64/128, boolean, and signed and unsigned integers retain their storage precision.
- Quantized integer tensors export their stored integers, not dequantized values.
- Bfloat16 widens exactly to float32.
- Use the raw frame for float8, float4, 2- and 4-bit integers, resources, variants and obsolete reference types; none has a NumPy preview.
- String tensors use a pickle-free fixed-width Unicode dtype (
U) in.npyfiles. - Use the JSON preview for decoded strings with trailing NULs because NumPy cannot distinguish them from padding.
- A numeric tensor without a plugin name is also a tensor here.
- A single repeated-field value can fill the declared shape up to 1 KiB of expanded data. Shapes requiring more expansion do not get an array preview.
- Each string member and each
uint8content field can expose a recognized file, even below 1 KiB. - Short labels and unrecognized short fields do not get extra files, even beside a larger member.
- At 1 KiB or above, a field can also have an opaque
.binor plain.txtexport. - A well-formed packed
float32tensor of 1 KiB or more keeps its raw.binexport even if the bytes match a known file format. - These files contain the original field bytes, not the enclosing record.
- Use
rawto recover the full frame, including unsupported types and plugin metadata.
HParams
hparams.json merges the experiment, the sessions and the metrics of the run.
- The metrics are the declared metric tags, or all scalar tags when the run declares no experiment, as in TensorBoard.
- Each metric has its last value, or
nullwithout data. Metrics of a sub-run group (for example the Kerasvalidationrun) have no value here; read them from the scalars of that run. sessionslists every session of the run;session_startandsession_endare the first ones, as in TensorBoard.
The hparams.yaml file that PyTorch Lightning writes in the run directory is also in hparams.
Graphs
graph.pbis theGraphDefthat TensorBoard shows: the newestgraph_defof the event files, which TensorFlow 1 and PyTorchadd_graphwrite, or else the graph of the newest TensorFlow 1 meta graph. A run with severalgraph_defgraphs also hasgraph_<i>.pbfor each one, in write order.meta_graph.pbis the newest TensorFlow 1MetaGraphDef, withmeta_graph_<i>.pbin the same way.- A TensorFlow 2 graph summary is under
graphs/<tag>/:<step>.jsonis the Keras model config that the Keras TensorBoard callback writes.<step>.run_metadata.pbis theRunMetadataoftf.summary.trace_export.<step>.conceptual.pbor<step>.pbbeside it is theGraphDefthat the Graphs tab draws for it.
- A TensorFlow 1 tagged
RunMetadata(FileWriter.add_run_metadata, PyTorchadd_graph) isgraphs/<tag>/<step>.run_metadata.pb. - Beside each
RunMetadata,<step>.run_metadata.pbtxtis the profile text that the Graphs tab shows.
The .pb files are binary protobuf messages, which TensorFlow and Netron can read. TensorBoard 2.21 cannot draw a
functional model inside a Sequential model from a Keras 3 config, because it reads the one input of the nested model as
three inputs; tboardfs gives the graph with that one input.
Projector and Profile
These files come from the run directory, not from the event files, so they are only available when SOURCE is a directory.
projectorcontains the config, the files of aprojectordirectory and the relative files named bytensor_path,metadata_path, spriteimage_pathandbookmarks_path.- Only relative paths to files of the run are followed, and only the first MiB of the config is read.
profilecontains the files below aprofiledirectory of the run, such asplugins/profile/....
The config bytes are unchanged, but the exported filenames use the filesystem's path escaping.
For example, TensorBoardX writes the tag sky/positions as sky%2fpositions, which exports as sky%252fpositions;
restore that directory name before opening the copied config in TensorBoard.
tboardfs copies profiler .xplane.pb files without decoding them; it does not extract checkpoint tensors or decode
Debugger V2 dumps.
Other Plugins
Summaries of a plugin without its own tab are JSON files under plugins/<plugin>/<tag>/<step>.json.
The Open3D plugin stores geometry
in plugins/Open3D/*.msgpack beside the event file, not inside a TensorBoard mesh tensor.
For a version 14 index, open plugins/Open3D/<tag>/<step>.manifest.json to find the sidecar, the byte ranges for each
batch item, any auxiliary ranges and the steps that supply reused properties.
The masked_crc32c fields are the checksums recorded by the writer; listing a manifest does not verify the sidecar.
The asset field is a path relative to the virtual run root, or null if no discovered file covers the recorded
ranges.
The filesystem exposes regular .msgpack files under plugins/Open3D/~assets/ without following symlinks below the run
root.
It does not convert an Open3D scene to OBJ or PLY or require an Open3D installation.
tboardfs-file get tests/data/producer-cases/open3d /plugins/Open3D/triangle_mesh/000002.manifest.json -o -
tboardfs-file get tests/data/producer-cases/open3d /plugins/Open3D/~assets/triangle_mesh.msgpack -o mesh.msgpack
File Formats
JSON
All .json files are strict JSON (RFC 8259), UTF-8, and indented with 2 spaces.
- A table is a list of row objects, with the column names as keys.
- Infinities are the strings
"Infinity"and"-Infinity". - In tables, NaN is a missing value and is
null. In other JSON files, NaN is the string"NaN", as in protobuf JSON. - A complex number is its
[real, imag]pair. - In record JSON, valid UTF-8 bytes become text and other bytes become
{"base64": "..."}. - Text and string-array previews instead decode invalid UTF-8 with replacement.
- A number reads back as the same value, but its spelling can differ from Python
repr, for example1e-5for1e-05.
TSV and CSV
The first line has the column names. Missing values and NaN are nan; infinities are inf and -inf. A cell that
contains the separator or a quote is quoted.
import pandas as pd
df = pd.read_csv("mnt/run/scalars/loss.tsv", sep="\t")
NumPy
An .npz table has one array per column, with the stored types: float32 values stay float32.
import numpy as np
table = np.load("mnt/run/scalars/loss.npz")
steps, values = table["step"], table["value"]
License
MIT
Star History
Metadata
Release files for tboardfs 0.4.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 |
|---|---|---|---|---|
| tboardfs-0.4.1.tar.gz | 432.9 kB | Without provenance | Details for tboardfs-0.4.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tboardfs-0.4.1-py3-none-any.whl | Python 3 | none | any | Details for tboardfs-0.4.1-py3-none-any.whl |
Total release size: 681.5 kB
Release files / tboardfs-0.4.1.tar.gz
| Download URL | tboardfs-0.4.1.tar.gz |
|---|---|
| Size | 432.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d7b6022fbc8bc9ac50cccccdb823002938c656d49dfbf92fcde02261d18dfdef
|
|
BLAKE2b-256 checksum How to use checksums |
6ab4623ebfe411515bb901e7b6b5c5ff24cdf78f626368bac92e1041127d2397
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.10
|
Release files / tboardfs-0.4.1-py3-none-any.whl
| Download URL | tboardfs-0.4.1-py3-none-any.whl |
|---|---|
| Size | 248.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d9b57c2da00176da769eaa3b651d124356a6ce2d89bd9d0d766b46a3203dd9b4
|
|
BLAKE2b-256 checksum How to use checksums |
4d506660a875f9f48ee4593dd65ead1f181f2369fa973b764695cb57d52d2bb2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.10
|
Security for tboardfs 0.4.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.