Skip to contents

read_trials_jsonl() reads the trial records written by write_trials_jsonl() or kept in a TrialLog's trials.jsonl.

Usage

read_trials_jsonl(path)

Arguments

path

Path of the JSON Lines file.

Value

A list of trial records.

Examples

trials <- list(
  create_trial("my-search", params = list(k = 2L)),
  create_trial("my-search", params = list(k = 4L))
)
path <- tempfile(fileext = ".jsonl")
# Shared temporary directories can be unsuitable for private logs.
tryCatch({
  write_trials_jsonl(trials, path)
  read_trials_jsonl(path)[[1]]
}, dsprrr_trial_log_trust_error = function(e) message(conditionMessage(e)))
#> 
#> ── Trial: trial_20261126_011041_ncnyz0 
#> • Status: pending
#> Optimizer: my-search
#> Params: k
#> Started: 2026-11-26 01:10:41