RunRaccoon 🦝
Local-only, drop-in replacement for the parts of Weights & Biases you actually look at.
RunRaccoon keeps wandb's API and file layout but has no cloud, no login, and no sync. Runs
are written to a runraccoon/ folder inside the output directory your training script
already uses. Each run gets the files wandb would write, plus publication-ready figures:
- a progress plot refreshed every epoch,
- QC images saved exactly where wandb saves them,
- summary figures when the run ends,
- QC contact sheets every epoch for Ultralytics training (no code needed), and a
ContactSheethelper for anything else, - training-progress GIFs of every QC image when the run ends, one for the whole sheet and one per panel,
- an optional localhost dashboard that shows every run on the machine, live and past.
- import wandb
+ import runraccoon as wandb
That one-line change is all most scripts need, including scripts that rely on Ultralytics' built-in wandb integration.
Contents
- Install
- Quick start
- Demos
- What you get on disk
- The figures
- QC contact sheets
- Training-progress GIFs
- The dashboard
- Ultralytics / YOLO
- Multi-GPU training and subprocesses
- PyTorch, DINOv2 and UNet (semantic segmentation)
- Image classification
- Binary masks (BiRefNet, background removal)
- TensorBoard
- Swapping an existing wandb script
- API compatibility
- Settings and environment variables
- Command line
- How it works
- Limitations
- Development
- Releasing to PyPI
Install
Option 1: from PyPI
Install
pip install runraccoon
Upgrade
pip install --upgrade runraccoon
Option 2: from source (editable)
git clone https://github.com/Gene-Weaver/RunRaccoon.git
cd RunRaccoon
pip install -e . # into the environment you train in
Requirements: Python ≥ 3.9, numpy, matplotlib, pillow, pyyaml. The dashboard uses
only the standard library and works fully offline.
Quick start
import runraccoon as wandb
wandb.init(project="leaf-segmentation", name="unet-baseline", config={"lr": 3e-4, "epochs": 50},
dir="outputs/unet-baseline") # your output dir; RunRaccoon adds runraccoon/ inside it
for epoch in range(50):
...
wandb.log({"train/loss": train_loss, "val/loss": val_loss, "val/iou": val_iou, "epoch": epoch})
if epoch % 5 == 0:
wandb.log({"qc/overlay": wandb.Image(overlay, caption=f"epoch {epoch}")}, commit=False)
wandb.summary["test/iou"] = test_iou
wandb.finish()
When the run starts, RunRaccoon prints where everything goes:
runraccoon: started run unet-baseline (k3x9q2ab) -> outputs/unet-baseline/runraccoon/run-20261002_105640-k3x9q2ab
runraccoon: live dashboard -> http://127.0.0.1:8473/#run=k3x9q2ab
finish() prints a short wandb-style summary with sparklines and the paths to the plots.
Runnable examples are in examples/:
| Example | What it shows |
|---|---|
minimal.py |
No framework needed |
pytorch_loop.py |
A plain PyTorch loop |
ultralytics_yolo.py |
YOLO training through Ultralytics' wandb integration |
Demos
Three real Ultralytics trainings, each 50 epochs with a yolo26n model on full datasets. Each
used an unmodified copy of its project's training script; the only change was
import wandb → import runraccoon as wandb. The training ran on RunRaccoon 0.1.0
installed from PyPI; the figures below were re-rendered with 0.1.2 (runraccoon replot).
| Task | Data | Report card |
|---|---|---|
| Pose (4 frame corners) | Honey frames, 821 train images | |
| Detection (rulers) | FieldPrism, 14,447 train images | |
| Segmentation (leaf, petiole, hole) | LM3 leaves, 13,480 train images |
Plain PyTorch, no Ultralytics:
- DINOv2 weak supervision. The Honey PSSS pipeline (frozen DINOv2 ViT-S/14 probe trained on sparse points → CRF pseudo-masks → ResUNet-34/50) was instrumented with the helpers described below and run on all 6,516 train tiles. Validation uses the 1,577 val tiles' labeled points.
- UNet that already used wandb. The LM3 ruler-segmentation UNet (
train_unet.py) ran with only the import changed, on 2% of its 480k images. It logs a new image key every epoch (val/preds_epoch7), and RunRaccoon folds those into one series, so they get a step slider and GIFs.
| Run | Report card |
|---|---|
| DINOv2 linear probe (sparse points) | |
| LM3 UNet (wandb script, import changed) |
The probe learning one val tile: sparse labeled points on the left, the probe's patch-grid prediction on the right, one frame per epoch.
DINOv2 patch embeddings: PCA→RGB maps next to each tile, and labeled val points in 2-D (colors match the QC overlays).
The training-progress GIF of one leaf segmentation QC image: ground truth on the left, prediction on the right, one frame per epoch.
The popup image viewer (step slider, ←/→ steps, ↑/↓ images) and the GIF controller with its color picker:
What you get on disk
Runs go in a runraccoon/ folder inside the directory passed as init(dir=...). Without
dir, they go in the current working directory. Ultralytics passes its own output folder
(project/name), so YOLO runs land next to weights/ and results.csv.
Inside the run folder, the layout and file names are the same as wandb's:
<dir>/runraccoon/
├── debug.log -> latest run's logs/debug.log
├── latest-run -> run-20260924_083909-t0rb91yy
└── run-20260924_083909-t0rb91yy/
├── files/
│ ├── config.yaml wandb format: {key: {value: ...}}
│ ├── wandb-summary.json final / best value of every key
│ ├── wandb-metadata.json host, GPUs, git commit, argv, python, ...
│ ├── wandb-history.jsonl every logged step, one JSON object per line
│ ├── output.log captured stdout/stderr (progress bars collapsed)
│ ├── requirements.txt pip freeze of the environment
│ ├── media/
│ │ ├── images/<key>_<step>_<sha20>.<ext> e.g. qc/contact_sheet_73_fff6edfaacd84552d328.jpg
│ │ └── table/<key>_<step>_<sha20>.table.json e.g. curves/F1-Confidence(B)_table_302_....table.json
│ └── plots/ <- RunRaccoon's figures (next section)
├── logs/debug.log, logs/plots.log
└── artifacts/<name>/manifest.json
wandb stores history in a binary .wandb file. RunRaccoon writes wandb-history.jsonl
instead, the plain-text name older wandb versions used. You can open it with any tool, or
use plots/history.csv.
The figures
All figures go in files/plots/:
| File | When | What |
|---|---|---|
progress.png |
about once per epoch while training | The important metrics only: paired train/val/test losses, validation scores, your QC numbers. Learning rates, counters and model info are left out. |
summary/run_summary.png |
at finish() |
A report card: headline numbers on top (test results, best validation scores and the epoch they occurred), key curves below. |
summary/<section>.png |
at finish() |
Every chart, one figure per wandb panel section (loss, performance, metrics, lr, val_px, ...). |
charts/<key>.png |
when logged | Custom charts: wandb.plot.* and plot_table, e.g. Ultralytics' PR/F1 curves and confusion matrices. |
history.csv |
at finish() |
Every scalar, one row per step, for Excel / pandas / R. |
gifs/<key>.gif, gifs/<key>/panel_NN.gif |
at finish() |
Training-progress GIFs (next sections). |
How the plots are put together:
- Pairing.
train/loss,val/lossandtest/lossshare one panel, and so do Keras-styleloss/val_lossandtrain_acc/val_acc. - Colors and line styles. Train is blue solid, val is orange dashed, test is green dotted. The colors are checked to be colorblind-safe, and the dashes keep the figure readable in grayscale print. Curves with many points are drawn solid and thinner so dashes don't turn into noise.
- Best point. For each metric whose direction is known, the best value is circled and
labeled, e.g.
min 0.108 @ epoch 278. Losses and errors are minimized; accuracy, mAP, IoU, F1 and similar are maximized. You can override this withdefine_metric. - Scales. Losses that span more than ~30× switch to a log axis. Series longer than 400 points get light smoothing drawn over the faint raw line.
- Typography. Text stays in vector form in PDF/SVG output (
pdf.fonttype 42), so journal checks and Illustrator edits work. Addplot_formats=("png", "pdf")to get vector copies.
To re-render the figures at any time, for example after a crash or after changing settings:
runraccoon replot path/to/outputs/unet-baseline --formats png,pdf
QC contact sheets
A contact sheet shows the same validation images every epoch, so you can watch a model learn.
Ultralytics runs get one automatically. With RunRaccoon imported, after every validation
it predicts with the newest weights on 12 fixed val images and logs a grid as
runraccoon/qc_contact_sheet. Training code doesn't change. In each tile:
- ground truth is drawn as white outlines with a dark halo,
- predictions are drawn on top in per-class colors: boxes, masks, keypoints with their skeleton, and oriented boxes,
- a caption gives the image name and
N pred / M gt.
The header shows the epoch and mAP50-95. After training, one more sheet is made from
best.pt.
Classification training gets a sheet too. The fixed images are spread over the classes. Each tile has a blue frame and a check mark when the top-1 class is right. A wrong tile gets an orange frame and a cross, and its banner names the true class.
Predicting the sheet loads a second copy of the model, so the GPU cache is emptied first. If a
large training batch leaves no room, set qc_device (RUNRACCOON_QC_DEVICE=cpu, or another GPU).
An out-of-memory error skips that epoch's sheet, and three in a row turn the sheet off.
RunRaccoon also saves the overlay data each epoch (normalized boxes, polygons, keypoints)
next to the images. That is what lets the dashboard redraw the GIFs in another style later.
Set qc_sheet=False to turn it off; the other qc_* settings are in the table below.
Anything else: log a grid of your own images:
wandb.log({"qc/samples": runraccoon.ContactSheet(images, captions=names, title=f"epoch {epoch}")})
images can be file paths, PIL images, numpy arrays, or tensors. The sheet records where
each tile sits, so its per-panel GIFs are cut exactly.
Training-progress GIFs
When a run finishes, every image key logged at three or more steps becomes a GIF, one frame per step:
files/plots/gifs/<key>.gif the whole image, e.g. the full contact sheet
files/plots/gifs/<key>/panel_01.gif ... one GIF per panel of it
Frames. Every frame is exactly 1920×1080 (or 1080×1920 in portrait). Each one carries a small title, the step or epoch, and a progress bar along the bottom. Each step shows for 0.25 s, and the last frame is held for 1.5 s before the GIF loops.
Panels. Each item of an image list is a panel, and so is each tile of a contact sheet. RunRaccoon's own sheets record their tile positions. For sheets drawn by your own code, the tiles are found by detecting the background-colored gutters between them.
Size. The GIFs stay small: one 255-color palette per GIF, position-stable ordered dithering, light temporal denoising, and only the changed pixels stored per frame. In testing that came to about 4–5 MB for 50 frames at 1080p.
Speed. GIFs are built in parallel: one process per GIF, plus threads inside each for composing frames, building the palette, and quantizing. The worker budget defaults to max(physical cores, threads) − 2. The result is byte-identical to a single-threaded build; on a 32-core machine, 13 GIFs of 51 frames at 1080p take about 8 s instead of 106 s.
To make or remake them for any run:
runraccoon gif path/to/run --seconds 0.5 --orientation portrait --resolution 1080 --keys "qc/*"
In the dashboard, the GIFs tab has the same controls:
- speed, final-frame hold, orientation, resolution, and per-panel GIFs on or off;
- for RunRaccoon QC sheets, also line width, point size, opacity, mask fill, ground truth / predictions / labels on or off, and a color for every class, keypoint, skeleton, and the ground truth.
A live preview updates as you change settings, and Regenerate GIFs rebuilds them with a progress bar.
The dashboard
The first run on the machine starts a small server on http://127.0.0.1:8473 (localhost only).
Every later run, in any process or environment, registers with it.
Left panel
- Active lists every run currently training, so several GPUs or jobs each get their own entry.
- Past lists finished, failed, and crashed runs.
- Each run shows
Start: YYYY/MM/DD HH:MM End: …, orestEnd: …while training. The estimate appears once the first epoch, including its validation, has finished. It projects the remaining epochs from the median duration of recent epochs.- The planned epoch count comes from the run config:
epochsor a usual alias (max_epochs,num_epochs,num_train_epochs, ...), also nested, as inargs.epochsortrainer.max_epochs. - Progress comes from a logged epoch counter:
epoch, or a key ending in/epochsuch asTrainer/epoch. It can be 0-based, 1-based, or absolute (a fine-tune that resumes at epoch 131 and logs 131, 132, ...). Without a counter, each row with validation results counts as one epoch.
- The planned epoch count comes from the run config:
Tabs for the selected run
- Charts: the same panels as the figures, with hover tooltips, a smoothing slider, a
metric filter, and a table view on every chart. Live runs update every few seconds.
- A magenta line marks the best checkpoint so far, and it moves whenever a later step
becomes the best. It follows, in order: a metric you declare with
define_metric(key, summary="min"|"max"); Ultralytics' ownbest.ptrule; or the lowestval/loss. - The Ultralytics rule depends on the version: from 8.3.198 on it is mAP50-95 summed over
box and mask/pose; before that, 0.1·mAP50 + 0.9·mAP50-95. RunRaccoon reads the version
from the run's
requirements.txt.
- A magenta line marks the best checkpoint so far, and it moves whenever a later step
becomes the best. It follows, in order: a metric you declare with
- Media: every logged image with a step slider, like wandb's image panels.
- Plots: the rendered PNGs from
files/plots/. - GIFs: the training-progress GIFs, autoplaying, with the controller described above.
- Popup viewer: clicking any image opens it large. The step slider comes along, ←/→ change steps, ↑/↓ change images within a step, and Esc closes it.
- Summary / Config: searchable key/value tables.
- Logs: the tail of
output.log.
The auto-started server shuts itself down after an hour with no active runs. To browse past runs at any time:
runraccoon dashboard # opens your browser
The dashboard follows your system's light/dark setting. Set RUNRACCOON_DASHBOARD=0 to turn
off the auto-start.
Ultralytics / YOLO
Ultralytics' wandb callback runs import wandb internally. Importing RunRaccoon registers it
as the wandb module, so the callback logs to RunRaccoon instead:
- per-epoch losses, metrics and learning rates,
train_batch*.jpg,val_batch*_pred.jpg,labels.jpgandresults.png,- confusion matrices and PR/F1/P/R curves (saved as tables and rendered to
plots/charts/), - the best weights, recorded as an artifact manifest.
import runraccoon as wandb # before model.train()
from ultralytics import YOLO, settings
settings.update({"wandb": True})
YOLO("yolo11n.pt").train(data="coco8.yaml", epochs=10, project="runs", name="exp")
resume=True continues the RunRaccoon run of the interrupted training. Ultralytics itself looks
for the previous run in save_dir/wandb/latest-run, so RunRaccoon reopens the run in
save_dir/runraccoon/latest-run first. As with wandb, the resumed run gets a new
run-<time>-<same id> folder that carries the earlier history.
For the best-checkpoint line, classification runs use Ultralytics' own rule: (top1 + top5) / 2.
Multi-GPU training and subprocesses
Child Python processes import RunRaccoon too. This covers multi-GPU DDP workers, torchrun and
accelerate launchers, and any subprocess. import runraccoon puts a small startup hook
(runraccoon/_bootstrap/sitecustomize.py) on PYTHONPATH, and every child interpreter runs it.
In the child, import wandb then resolves to RunRaccoon. This matters for Ultralytics DDP: its
workers re-import the trainer and never run your script's import runraccoon line, but they
still log through RunRaccoon and still get the QC sheets.
- Nothing is imported in a child until it imports
wandb(or Ultralytics' wandb callbacks), so children that never log pay nothing. - A child whose environment has no RunRaccoon falls back to the installed wandb, which stays
offline: children also get
WANDB_MODE=disabled. - An existing
sitecustomize(Debian and Ubuntu Pythons ship one) still runs. - Set
RUNRACCOON_SUBPROCESS_SHIM=0to leave children alone.
Only rank 0 logs. In a distributed job (RANK or LOCAL_RANK set, as torchrun, accelerate
and Ultralytics DDP do), init() returns a disabled run on every other rank. Calls on it are
no-ops, so training code needs no rank checks. Set all_ranks=True (RUNRACCOON_ALL_RANKS=1)
to log every rank.
PyTorch, DINOv2 and UNet (semantic segmentation)
Hand-written training loops have no callbacks to hook into, so RunRaccoon provides helpers that produce the same outputs an Ultralytics run gets. Each needs a line or two in the loop.
import runraccoon as wandb
from runraccoon.integrations.segmentation import SegMetrics, semantic_qc_sheet
from runraccoon.integrations.dino import EmbeddingPCA, pca_scatter
wandb.init(project="leaf-seg", name="resunet34", config=cfg)
wandb.define_metric("val/mIoU", summary="max") # the dashboard's best-checkpoint line follows it
metrics = SegMetrics(num_classes, class_names, ignore_index=255)
for epoch in range(1, epochs + 1):
...train...
metrics.reset()
for images, masks in val_loader:
metrics.update(model(images), masks) # logits (N,C,H,W) or label maps
wandb.log({"train/loss": loss, "qc/val": semantic_qc_sheet(qc_images, qc_masks, qc_preds, class_names,
mean=IMAGENET_MEAN, std=IMAGENET_STD)},
step=epoch, commit=False)
metrics.log(prefix="val", step=epoch) # val/mIoU, val/pixel_acc, val/mDice, val/mean_acc + charts
What you get:
- Metrics:
SegMetricsaccumulates a confusion matrix and logs pixel accuracy, mean class accuracy, mIoU and mean Dice. It also logs a per-class IoU bar chart and a row-normalized confusion matrix, rendered toplots/charts/. - QC sheets:
semantic_qc_sheetmakes a contact sheet with ground truth and prediction side by side for each tile. Label maps are stored as small PNGs, so the GIF controller can change every class's color, hide classes, and change line width and fill opacity. More than 8 classes get extra distinct hues automatically. - Weak supervision: when the only ground truth is sparse points, pass the predictions at those
points (
metrics.update(pred_at_points, point_labels)) and givesemantic_qc_sheetthe points (points=[[(x, y, class), ...], ...]). The points are drawn as class-colored dots on both halves. - DINOv2 embeddings:
EmbeddingPCA().fit(tokens)turns patch tokens (backbone.forward_features(x)["x_norm_patchtokens"]) into PCA→RGB maps withpca.sheet(...). The PCA is fit once, so colors stay stable across epochs and a fine-tuned backbone makes a meaningful GIF.pca_scatter(tokens, labels, class_names)plots labeled embeddings in 2-D, one color per class.
examples/semantic_segmentation.py runs the whole thing with
numpy only.
Example: the Honey weak-supervision pipeline. The Honey PSSS trainer
(train_psss_Dinov2_CRF_allResNetOptions.py) has three stages:
- A frozen DINOv2 ViT-S/14 linear probe, trained on sparse points.
- Pseudo-masks from that probe, refined with CRF.
- A ResUNet sweep, trained on the pseudo-masks.
Instrumented with these helpers, it logs one run per stage, grouped together:
| Stage | What is logged |
|---|---|
| Probe | Train/val loss. Val mIoU, accuracy and Dice on the val split's labeled points. Per-class IoU and confusion charts. A per-epoch QC sheet (points vs. the probe's patch-grid prediction). DINOv2 PCA maps and the labeled-embedding scatter. |
| Pseudo-masks | A sheet of pseudo-masks, the fraction of pixels per class, and the count and time. |
| Each ResUNet | Train loss. Val metrics on the labeled points. A per-epoch QC sheet. |
Image classification
The same pair of helpers exists for classifiers (DINOv2 probes, fine-tuned backbones, any loop that ends in class scores):
from runraccoon.integrations.classification import ClsMetrics, classification_qc_sheet
metrics = ClsMetrics(num_classes, class_names)
for epoch in range(1, epochs + 1):
...train...
metrics.reset()
for images, labels in val_loader:
metrics.update(model(images), labels) # logits / probabilities (N, C), or class ids (N,)
metrics.log(prefix="val", step=epoch) # val/accuracy, val/balanced_accuracy, val/macro_f1, ...
wandb.log({"qc/val": classification_qc_sheet(qc_images, qc_labels, model(qc_batch), class_names)},
step=epoch, commit=False)
- Metrics: accuracy, balanced accuracy (mean recall), macro and weighted F1, and top-5 accuracy when scores are given and there are more than five classes. Definitions follow scikit-learn. Charts: F1 per class and a row-normalized confusion matrix.
- QC sheet: the same blue / orange frames as the Ultralytics classification sheet, with the predicted class and its probability on each tile.
Binary masks (BiRefNet, background removal)
Foreground / background models (BiRefNet, salient-object and matting models, a 1-channel UNet) have soft outputs, and the mean of per-image scores is what their benchmarks report:
from runraccoon.integrations.segmentation import BinarySegMetrics, binary_qc_sheet
metrics = BinarySegMetrics(threshold=0.5)
metrics.update(probs, masks, groups=["hard" if s in hard else "normal" for s in stems]) # logits=True for logits
metrics.log(prefix="val", step=epoch) # val/dice, val/iou, val/mae, val/precision, val/recall, val/dice_hard, ...
wandb.log({"qc/val": binary_qc_sheet(images, masks, probs, name="specimen")}, step=epoch, commit=False)
- Metrics: Dice, IoU, precision and recall at the threshold, and MAE on the soft output,
each averaged over images. An image with an empty mask and an empty prediction scores 1.
groupsadds the Dice, IoU and MAE of each group. A histogram of the per-image Dice shows the failures. - QC sheet: ground truth | thresholded prediction | probability heatmap for each image. The
masks are stored like
semantic_qc_sheet's, so the dashboard can restyle them. - Predictions can be any size; they are resized to the image. Values outside [0, 1] are taken as
logits. If your logits might all fall inside that range, pass
logits=True.
TensorBoard
Code written for TensorBoard logs to RunRaccoon in one of two ways.
A drop-in SummaryWriter:
from runraccoon.integrations.tensorboard import SummaryWriter
writer = SummaryWriter("runs/exp1") # uses the active run, or starts one in runs/exp1/runraccoon/
writer.add_scalar("Loss/train", loss, step)
writer.add_image("qc/sample", img_chw, step)
writer.close()
It supports add_scalar(s), add_image(s), add_figure, add_text, add_histogram,
add_hparams and add_pr_curve. tensorboard=True also writes the usual event files.
Existing writers: pass wandb.init(..., sync_tensorboard=True), or call
runraccoon.tensorboard.patch() after init(). Every torch.utils.tensorboard and tensorboardX
SummaryWriter then logs to the active run as well, including writers that already exist. This
covers trainers that create their own writers, like SAM 2 / SAM 3, detectron2 and Lightning's
TensorBoardLogger. wandb.tensorboard.patch() works too.
Steps. TensorBoard keeps one step axis per tag, and trainers mix several: epoch indices,
and iteration counters that differ between train and val. RunRaccoon stores each scalar's
TensorBoard step in a global_step column, and that column is the tag's x-axis in every chart.
Name the column per tag pattern to get readable axes:
SummaryWriter(step_metrics={"Losses/*": "epoch"}), or patch(step_metrics=...). The first
matching pattern wins.
Keys shaped like SAM's (Losses/train_all_loss, Losses/val_all_loss) pair train with val.
Live plots leave out optimizer settings such as Optim/*/lr and weight decay, step statistics,
and DETR-style auxiliary losses (*_aux_<n>). The summary figures and the dashboard still show
them.
Swapping an existing wandb script
Most scripts need only the import change. For example, here is
Honey/annotation_app_build/train_yolo26_pose.py:
- import wandb
+ import runraccoon as wandb
Everything else in that script works unchanged:
wandb.init(..., dir=run_dir),- the custom
EpochQCcallback loggingqc/contact_sheetimages andval_px/*atstep=epoch, - Ultralytics finishing the run, then
wandb.init(id=..., resume="must")reopening it to addtest/*to the summary.
Resuming creates a new run-<time>-<same id> directory, as wandb does. RunRaccoon carries the
earlier history and media into it, so the figures cover the whole run.
To switch every script in an environment without editing each import, add this near the start of your entry point:
import runraccoon # noqa: F401 (registers itself as `wandb`)
From then on, any import wandb in that process returns RunRaccoon.
API compatibility
| wandb | RunRaccoon |
|---|---|
init(project, name, config, dir, id, group, job_type, tags, notes, resume, reinit, mode, settings, ...) |
✓ (entity and cloud-only options are accepted and ignored; on ranks other than 0 of a distributed job the run is disabled) |
init(sync_tensorboard=True), wandb.tensorboard.patch() |
✓ TensorBoard writers also log to the run (TensorBoard) |
log(data, step=, commit=) |
✓ same step semantics; a late write to an already-committed step is kept, where wandb would drop it |
run.config, wandb.config.update(...), argparse Namespace |
✓ |
run.summary[...], summary.update(...) |
✓ |
define_metric(name, step_metric=, summary=, goal=, hidden=) |
✓ also controls the plots (x-axis, best marker, hidden) |
Image (path, PIL, numpy HW/HWC/CHW, torch tensor, matplotlib figure; caption) |
✓ (boxes=/masks= overlays are accepted but not drawn) |
lists of Image under one key |
✓ (images/separated, as wandb) |
Table, plot.line, plot.line_series, plot.scatter, plot.bar, plot.histogram, plot.pr_curve, plot.roc_curve, plot.confusion_matrix, plot_table |
✓ saved as tables and rendered to PNG |
Histogram, raw arrays |
✓ stored in history (not plotted) |
runraccoon.ContactSheet(images, captions=...) |
RunRaccoon addition: a captioned grid of images that records its tile positions |
Artifact, log_artifact, log_model |
✓ local manifest (files referenced, optionally copied) |
save(glob), alert, finish(exit_code), run.dir, run.id, run.name, run.step, context manager |
✓ |
login, watch, unwatch, Settings(...) |
accepted, no-op |
Video, Audio, Html |
✓ from a file path |
Api(), use_artifact(...).download() from a server, sweeps, reports |
✗ local-only; these raise a clear error |
Settings and environment variables
Pass settings in code with wandb.init(settings=wandb.Settings(plot_every_s=30)) (or a plain
dict), or set them through the environment:
| Setting | Env var | Default | Meaning |
|---|---|---|---|
dashboard |
RUNRACCOON_DASHBOARD |
1 |
auto-start the localhost dashboard |
dashboard_port |
RUNRACCOON_PORT |
8473 |
dashboard port (also used by runraccoon dashboard) |
live_plots |
RUNRACCOON_LIVE_PLOTS |
1 |
refresh progress.png during training |
plot_every_s |
RUNRACCOON_PLOT_EVERY_S |
10 |
minimum seconds between refreshes (at most once per epoch either way) |
final_plots |
RUNRACCOON_FINAL_PLOTS |
1 |
render the summary figures in finish() |
plot_formats |
RUNRACCOON_PLOT_FORMATS |
png |
e.g. png,pdf,svg for the final figures |
live_metrics |
RUNRACCOON_LIVE_METRICS |
auto | glob patterns choosing the progress-plot metrics, e.g. train/*,val/* |
dirname |
RUNRACCOON_DIRNAME |
runraccoon |
name of the run folder created inside the output dir |
console |
RUNRACCOON_CONSOLE |
wrap |
off to skip output.log capture |
artifact_copy |
RUNRACCOON_ARTIFACT_COPY |
0 |
copy artifact files instead of referencing them |
quiet |
RUNRACCOON_QUIET |
0 |
silence RunRaccoon's console messages |
all_ranks |
RUNRACCOON_ALL_RANKS |
0 |
log from every rank of a distributed job, not only rank 0 |
gifs |
RUNRACCOON_GIFS |
1 |
make training-progress GIFs in finish() |
gif_seconds_per_frame |
RUNRACCOON_GIF_SECONDS |
0.25 |
time each step is shown |
gif_orientation |
RUNRACCOON_GIF_ORIENTATION |
landscape |
landscape (1920×1080) or portrait (1080×1920) |
gif_resolution |
RUNRACCOON_GIF_RESOLUTION |
1080 |
short side of every frame, px |
gif_hold_last_s |
RUNRACCOON_GIF_HOLD |
1.5 |
pause on the final frame before looping |
gif_panels |
RUNRACCOON_GIF_PANELS |
1 |
also one GIF per panel |
gif_label |
RUNRACCOON_GIF_LABEL |
1 |
title, step and progress bar on each frame |
gif_keys |
RUNRACCOON_GIF_KEYS |
all | glob patterns of image keys to animate |
gif_workers |
RUNRACCOON_GIF_WORKERS |
cores/threads − 2 | parallel workers for GIF building |
qc_sheet |
RUNRACCOON_QC_SHEET |
1 |
automatic QC contact sheet for Ultralytics training |
qc_images |
RUNRACCOON_QC_IMAGES |
12 |
number of fixed val images |
qc_every |
RUNRACCOON_QC_EVERY |
1 |
every N epochs (the last epoch always) |
qc_cols / qc_tile_px |
RUNRACCOON_QC_COLS / _TILE_PX |
4 / 720 |
grid columns, tile width |
qc_conf |
RUNRACCOON_QC_CONF |
0.25 |
prediction confidence threshold |
qc_key |
RUNRACCOON_QC_KEY |
runraccoon/qc_contact_sheet |
media key of the sheet |
qc_device |
RUNRACCOON_QC_DEVICE |
training device | device for the QC predictions, e.g. cpu or cuda:1 |
RUNRACCOON_HOME |
~/.runraccoon |
where the run index and dashboard log live | |
RUNRACCOON_SHIM |
1 |
0 to stop import runraccoon from registering as wandb |
|
RUNRACCOON_SUBPROCESS_SHIM |
1 |
0 to stop child processes from importing RunRaccoon as wandb |
The usual wandb variables are honored as defaults: WANDB_PROJECT, WANDB_NAME,
WANDB_RUN_ID, WANDB_RUN_GROUP, WANDB_JOB_TYPE, WANDB_TAGS, WANDB_NOTES, WANDB_DIR,
WANDB_RESUME, and WANDB_MODE=disabled, which turns logging off entirely.
Command line
runraccoon dashboard [--port 8473] open the dashboard (all runs, live + past)
runraccoon ls [--all] list runs and their status
runraccoon replot <run dir | id> re-render every figure for a run [--formats png,pdf]
runraccoon register <folder>... add existing/moved run folders to the dashboard
runraccoon forget <id>... remove runs from the dashboard index (files are kept)
runraccoon gc forget runs whose folders were deleted
runraccoon gif <run dir | id> (re)make training-progress GIFs [--seconds --orientation --resolution --keys ...]
python -m runraccoon ... works the same way.
How it works
training script runraccoon/run-<time>-<id>/files/
runraccoon.init / log ── appends ─▶ history · summary · config · media
│ ▲ ▲
│ spawns ≤ 1× per epoch │ reads │ reads
▼ │ │
renderer subprocess (matplotlib) ────────────┘ │
│ writes files/plots/*.png │
│ │
└ heartbeat ─▶ ~/.runraccoon/runs/<id>.json ◀─ reads ─ dashboard server
127.0.0.1:8473
- The training process only writes files. Media is hashed and written when logged, and history rows are appended as each step is committed. Plotting runs in a short-lived subprocess, so it never competes with training for the GIL and never touches your script's matplotlib state.
- One module decides what gets plotted.
runraccoon/panels.pyhandles key pairing, sections, the x-axis, and the better direction. The PNG renderer and the dashboard both use it, so they always agree. - The dashboard is read-only. It reads the same files and the per-run heartbeat records. It therefore works across processes, Python environments, and runs that crashed.
The code is organized by job:
| Module | Job |
|---|---|
sdk.py |
Module-level wandb.* functions |
run.py |
The Run class and step semantics |
media.py |
Image, Table, ... |
plot.py |
wandb.plot |
paths.py |
Directory layout |
reader.py |
Reading a run back from disk |
registry.py |
The machine-wide run index |
plotting/ |
Style, figures, renderer, scheduler, GIFs |
qc.py |
Contact sheets and restyleable QC overlays |
shim.py, _bootstrap/ |
import wandb -> RunRaccoon, in this process and in child processes |
integrations/ultralytics.py |
The automatic per-epoch QC sheet and resume for Ultralytics |
integrations/segmentation.py, classification.py, dino.py |
Helpers for hand-written PyTorch loops |
integrations/tensorboard.py |
SummaryWriter adapter and patch() |
dashboard/ |
Server and static app |
Limitations
- Nothing is uploaded, ever. No sweeps, reports, team sharing, or
wandb.Api(). - Image overlays (
boxes=,masks=) are not drawn. Render them into the image before logging. - System metrics (GPU utilization over time) are not tracked. The GPU model and count are
recorded in
wandb-metadata.json. output.logcaptures Python-levelprint/logging. Output written directly by C extensions to file descriptor 1/2 is not captured.- If the real
wandbwas imported before RunRaccoon, code already holding that module is not redirected (RunRaccoon prints a warning). Import RunRaccoon first.
Development
pip install -e ".[dev]"
pytest
Tests cover the on-disk layout, step semantics, media naming, resume, metric pairing, rendering, and the dashboard API.
Releasing to PyPI
The release flow matches VoucherVisionGO-client: setup.py holds the package metadata, and
builds go to dist/, which is gitignored.
- Bump
__version__inrunraccoon/_version.py. This is the only place the version lives;setup.pyandrunraccoon.__version__both read it. - Add an entry to
CHANGELOG.md. - Build and upload:
pip install build twine # once
python -m build
python -m twine upload dist/* --skip-existing --verbose
--skip-existing lets dist/ keep older builds without twine failing on versions already
on PyPI. Twine asks for credentials: use __token__ as the username and a PyPI API token as
the password, or put them in ~/.pypirc.
Before the first upload you can rehearse on TestPyPI with
python -m twine upload --repository testpypi dist/*.
License: MIT.
Metadata
Release files for runraccoon 0.1.3
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 |
|---|---|---|---|---|
| runraccoon-0.1.3.tar.gz | 189.0 kB | Without provenance | Details for runraccoon-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| runraccoon-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for runraccoon-0.1.3-py3-none-any.whl |
Total release size: 341.9 kB
Release files / runraccoon-0.1.3.tar.gz
| Download URL | runraccoon-0.1.3.tar.gz |
|---|---|
| Size | 189.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9801076cc428e5efc272ef96bfad0dcc2dae687dc7f7acdaa91457b7a322ec40
|
|
BLAKE2b-256 checksum How to use checksums |
12744a54d29a01eb6ec3f3af583872ea91e2262f85fdcbca890dca8a08680957
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.5
|
Release files / runraccoon-0.1.3-py3-none-any.whl
| Download URL | runraccoon-0.1.3-py3-none-any.whl |
|---|---|
| Size | 152.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b83a8e3d1566ace389d06e4add15593505df0cae0f0c0c17fa5b25d1780b3fd4
|
|
BLAKE2b-256 checksum How to use checksums |
dbc95c9851c7be91173196a2341b56222a966e305914d03396fcad8e7f88ee95
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.5
|
Security for runraccoon 0.1.3
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.