Page
Library
Module
Module type
Parameter
Class
Class type
Source
Kaun_board.RunSourceTraining runs.
A run is a directory on disk containing a run.json manifest and an append-only events.jsonl log. Runs are created by Log and read back here for dashboards and analysis.
Run IDs follow the format YYYY-MM-DD_HH-MM-SS_XXXX where XXXX is a random hex suffix. When an experiment name is given, it is appended: YYYY-MM-DD_HH-MM-SS_XXXX_experiment.
The type for training run handles.
total_epochs r is r's expected total number of epochs, if specified in the manifest.
val create :
?base_dir:string ->
?experiment:string ->
?tags:string list ->
?config:(string * Jsont.json) list ->
unit ->
tcreate () is a new run with a unique ID and an on-disk directory containing a run.json manifest.
base_dir defaults to the value of RAVEN_RUNS_DIR, or XDG_CACHE_HOME/raven/runs when unset. experiment is appended to the run ID when given. tags defaults to []. config defaults to [] and is written to the manifest as-is.
Raises Sys_error if the directory or manifest cannot be created.
See also load.
latest base_dir is the most recent run in base_dir, determined by reverse-sorting directory entries and loading the first valid manifest. Returns None if base_dir does not exist or contains no valid runs.
See also load.
append_event r ev appends ev as a JSON line to r's events.jsonl.
The type for incremental event readers. Tracks the file position and detects log rotation or truncation.
open_events r is a stream positioned at the beginning of r's event log.
See also close_events.
read_events stream is the list of events appended since the last call, or the empty list when no new data is available.
Automatically resets to the beginning if the underlying file has been rotated or truncated.
last_mtime stream is the last observed modification time of the event log file, as recorded by read_events. Returns 0.0 before the first successful read.
close_events stream releases the stream's file descriptor. Safe to call multiple times.