Skip to contents

Updates only the mutable label metadata for a stored run. The immutable run_id and experiment identity hashes are not changed.

Usage

ledgr_run_label(snapshot, run_id, label = NULL)

Arguments

snapshot

A sealed ledgr_snapshot object. Use ledgr_snapshot_load(db_path, snapshot_id) to resume from a durable DuckDB file in a new R session.

run_id

Run identifier.

label

Human-readable label. Use NULL or "" to clear the label.

Value

The input ledgr_snapshot, invisibly.

Examples

bars <- subset(ledgr_demo_bars, instrument_id == "DEMO_01")
snapshot <- ledgr_snapshot_from_df(utils::head(bars, 10))
strategy <- function(ctx, params) ctx$flat()
exp <- ledgr_experiment(snapshot, strategy, opening = ledgr_opening(cash = 1000))
bt <- ledgr_run(exp, params = list(), run_id = "flat")
ledgr_run_label(snapshot, bt$run_id, "baseline")
close(bt)
ledgr_snapshot_close(snapshot)