Tune.Demo (Tune v0.5.0)

Copy Markdown View Source

One demonstration: complete inputs and outputs for a signature.

Demonstrations are learnable predictor data. Both maps are validated against the signature they are used with.

Summary

Functions

Normalizes one demonstration against a signature.

Normalizes a list of demonstrations, stopping at the first invalid one.

Types

t()

@type t() :: %Tune.Demo{inputs: map(), outputs: map()}

Functions

new(signature, demo)

@spec new(Tune.Signature.t(), t() | map()) :: {:ok, t()} | {:error, Exception.t()}

Normalizes one demonstration against a signature.

new_list(signature, demos)

@spec new_list(Tune.Signature.t(), list()) :: {:ok, [t()]} | {:error, Exception.t()}

Normalizes a list of demonstrations, stopping at the first invalid one.