Experiments
An experiment is a named bundle of parameter values for a project. Each save creates an immutable version identified by a content hash.
Properties
| Property | Type | Description |
|---|---|---|
id | str | Unique identifier |
name | str | Display name |
description | str | Optional description |
project_id | str | Parent project ID |
visibility | str | "private" (default) or "shared" |
versions_count | int | Number of committed versions |
latest_version | str | Content hash of the most recent version |
Creating experiments
Committing values
Each commit creates an immutable version. Pass bare Python values — the SDK wraps them using the project schema:
Chain versions using parent_version:
Sharing and promoting
Only shared experiments can be promoted to an environment.
One-liner publish
publish() does create, commit, share, and promote in a single call:
Version history
Running experiments
Execute a test set with this experiment’s parameters using run():
This is equivalent to test_set.execute(endpoint, experiment=exp). See Test Execution for the full execution API.
Results
Retrieve aggregated test-run statistics for an experiment. Results can be grouped by individual run or by parameter version:
Each run includes a stats object with total, passed, failed, and errors counts.
Fetching experiments
Deleting experiments
Deleting an experiment automatically unbinds any environments that point to it:
Method reference
| Method | Returns | Description |
|---|---|---|
push() | dict | Create or update the experiment header |
pull() | Experiment | Refresh from the server |
delete() | bool | Delete (auto-unbinds environments) |
commit(values, *, message, parent_version) | dict | Append an immutable version |
list_versions() | list[dict] | All versions, oldest to newest |
latest_version_data() | dict | None | Most recent version entry |
get_version(version) | dict | Single version by content hash |
share() | None | Set visibility to shared |
unshare() | None | Set visibility to private |
promote(environment) | None | Bind latest version to environment |
run(test_set, endpoint, *, parameters, ...) | dict | None | Execute a test set with this experiment’s parameters |
results(*, group_by, limit) | dict | Aggregated test-run statistics |
publish(*, name, project_id, values, ...) | Experiment | Class method: create, commit, share, promote |
Next Steps
- Parameters & Experiments SDK guide for the full workflow
- Parameters schema for defining typed slots
- Experiments concepts for the mental model