package kaun-board

  1. Overview
  2. Docs

Module Kaun_board.EventSource

Training events.

Events are discrete observations recorded during training. They are stored as JSON lines in a run's events.jsonl file.

See Kaun_board.Log for writing events and Kaun_board.Run for reading them.

Types

Sourcetype t =
  1. | Scalar of {
    1. step : int;
      (*

      Training step (iteration count).

      *)
    2. epoch : int option;
      (*

      Training epoch, if any.

      *)
    3. tag : string;
      (*

      Metric name (e.g. "train/loss").

      *)
    4. value : float;
      (*

      Metric value.

      *)
    5. wall_time : float;
      (*

      Unix timestamp of the observation.

      *)
    }
    (*

    A scalar metric observation.

    *)

Converting

Sourceval of_json : Jsont.json -> (t, string) result

of_json json is the event represented by json.

Errors if json is not a valid event object or has an unknown type field.

Sourceval to_json : t -> Jsont.json

to_json ev is the JSON representation of ev.