Skip to main content
Use this when you already have analysis code and want to log results directly — no folder watcher, no pipeline.

braven.init()

Creates a new Experiment and sets it as the active run.
str | None
Experiment name shown in the UI.
str | None
Optional free-text description.
str | None
Project name as shown in the app. Required if you belong to more than one project.
str | None
Company name — only needed to disambiguate when the same project name exists under two companies.
Returns a Run. Raises RuntimeError if neither company nor project is given, or if the name doesn’t match anything you have access to.
braven.init() is dual-purpose: called with name=/project=/company= (or no pipeline-specific kwargs) it does direct logging. Called with experiment_id=/api_url=/etc. (the shape the worker uses) it instead does pipeline-mode setup — see Pipeline scripts. You won’t hit this ambiguity in your own scripts; it only matters if you’re reading the SDK source.

Run methods

Everything below works identically as a module-level call (braven.config(...)) against the currently active run, or as a method on the Run object init() returns.
→ None
Log an input/configuration parameter, experiment-level.
→ None
Log an output metric, experiment-level.
→ Device
Return a device-scoped handle — see Devices. Memoised per run: repeated calls with the same key return the same handle, and the first call’s type wins.
→ None
Log a labeled data series as an interactive plot. Call again with the same name and a different y_label to group multiple traces onto one chart.
→ None
Upload a file, or a live matplotlib Figure. For a Figure: saves the PNG (same as fig.savefig()) and best-effort extracts an interactive companion from its line/scatter data — see Series vs. Figures.
→ None
Flush metadata. Idempotent — safe to call once at the end via braven.finish().

Device methods

Obtained via run.device(key) or module-level braven.device(key).
dev.* calls are tagged with that device’s key; the same metric name ("SNR") stays identical across every device — the device is a separate coordinate, never a name suffix like SNR_dev1.

Multiple devices in one experiment

Full cheat sheet