Member Junction
    Preparing search index...

    The Training Snapshot file format: serialize, parse and fingerprint.

    Index

    Constructors

    Methods

    • The snapshot's content hash: SHA-256 of the canonical JSON of the matrix and row-manifest file hashes, the feature schema hash, PredictionUnitID, LabelVersion, FeatureSpecVersion, EvaluationProtocolID and DataCutoff. The matrix file holds the header, so the encodings, incumbent and slice columns and decision spec are covered through its hash.

      The provenance file is deliberately outside the hash: it records when each value was computed (aggregates, series and missing values carry the assembly time), so including it would give identical data a new hash on every assembly, and identical data must resolve to one snapshot. Its own hash is stored and verified on read.

      IDs are normalized, so the hash does not depend on the database's UUID casing. DataCutoff must be a YYYY-MM-DD day; any other spelling of the same cutoff would hash differently, so it is refused.

      Returns string

    • The three files back to content. Every line is checked with its store schema — a stored file is text that a hash check proves unchanged, not well-formed — and so is the structure across the files: every matrix row is as wide as the header's columns, the matrix rows, manifest lines and provenance lines are equally many, and provenance line i carries manifest line i's rowId. A violation throws SnapshotFileFormatError naming the file and line.

      Parameters

      • matrix: Uint8Array
      • manifest: Uint8Array
      • provenance: Uint8Array

      Returns SnapshotContent