package modelkit

  1. Overview
  2. Docs
Portable classical machine learning workflows for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

modelkit-0.3.2.tbz
sha256=a0335f799da12302a0568320b5f5c4c26c531a336740fea07f326cb2729ae8ac
sha512=bc692df9c0a868f99c14159c03c0c975d6fd51d6283a0e8491197abde8cebcd04f26ba990b66dc3ac711ab01bc8f7c2a4279fdf5b30a64ded5f622e0b2bcc630

doc/modelkit/Modelkit/Error/index.html

Module Modelkit.Error

Structured failures for public machine learning operations.

Routine data, validation, numerical, convergence, compatibility, and artifact failures use this type. Exceptions are reserved for programmer defects such as violating a documented bounds precondition.

type context =
  1. | Stage of string
  2. | Fold of int
  3. | Candidate of int
  4. | Feature of Feature_name.t
type kind =
  1. | Data of Data_error.t
  2. | Shape_mismatch of {
    1. name : string;
    2. expected : int list;
    3. observed : int list;
    }
  3. | Feature_schema_mismatch of {
    1. expected : Feature_schema.t;
    2. observed : Feature_schema.t;
    }
  4. | Validation of {
    1. name : string;
    2. reason : string;
    }
  5. | Numerical of {
    1. operation : string;
    2. reason : string;
    }
  6. | Convergence of {
    1. algorithm : string;
    2. reason : string;
    }
  7. | Compatibility of {
    1. component : string;
    2. reason : string;
    }
  8. | Artifact of {
    1. operation : string;
    2. reason : string;
    }
  9. | Cancelled
type t
val make : ?context:context list -> remediation:string -> kind -> t
val of_data_error : ?context:context list -> remediation:string -> Data_error.t -> t
val kind : t -> kind
val context : t -> context list
val remediation : t -> string
val with_context : context -> t -> t

with_context outer error records outer before existing context.

val pp : Format.formatter -> t -> unit
val to_string : t -> string