The
experiments client methods are currently in BETA. The API may change without notice. A one-time warning is emitted on first use.TaskFields to identify the example_id and output columns, and EvaluatorColumns to remap evaluator-result columns to the eval.<name>.<field> wire schema. The Get, Delete, and ListRuns methods accept either an experiment name or an ID — when a name is passed, either Dataset or Space (name or ID) is required to scope the lookup, and Space is also required when Dataset is passed as a name. Empty experiments are not allowed: Create requires at least one run (otherwise experiments.ErrNoRuns) and exactly one of Dataset or Space (otherwise experiments.ErrNoDatasetOrSpace).
List Experiments
List returns a paginated list of experiments, narrowed by whichever scope is given: Dataset (name or ID) returns only experiments run on that dataset; Space (name or ID) returns every experiment in that space, both those associated with a dataset and those without one; passing neither returns every experiment across all spaces the caller can read. Passing both applies the narrower dataset scope, with Space used only to resolve a dataset name.
Signature:
Get an Experiment
Get returns a single experiment, resolving by name or ID. Either Dataset or Space is required when Experiment is a name; Space is also required when Dataset is passed as a name. Resolving by Space alone returns arize.AmbiguousNameError when the name matches more than one experiment in that space — pass Dataset or an experiment ID to disambiguate.
Signature:
Create an Experiment
Create creates a new experiment, either against a dataset or directly in a space. Exactly one of Dataset or Space is required (both accept a name or ID); passing neither returns experiments.ErrNoDatasetOrSpace. Each entry of Runs is a row of user data; TaskFields names the columns holding the task output (required) and the dataset example ID (TaskFields.ExampleID is required only for a dataset-backed experiment), and EvaluatorColumns optionally renames evaluator result columns to the eval.<name>.<field> wire schema. At least one run is required; an empty Runs slice returns experiments.ErrNoRuns without contacting the server.
Signature:
Append Runs
AppendRuns appends new runs to an existing experiment by ID and returns the updated experiment along with the generated IDs for the inserted runs in input order. Between 1 and 1000 runs may be appended per request; each ExperimentRunInput must include ExampleId and Output. Additional user-defined fields can be set via AdditionalProperties.
Signature:
Delete an Experiment
Delete removes an experiment, resolving by name or ID. Either Dataset or Space is required when Experiment is a name; Space is also required when Dataset is passed as a name. It returns only an error.
Signature:
List Runs
ListRuns returns a paginated list of runs for an experiment, resolving the experiment by name or ID. Either Dataset or Space is required when Experiment is a name; Space is also required when Dataset is passed as a name.
Signature: