Compare experiments
const url = 'http://localhost:8080/api/v1/projects/example/experiments/compare?ids=example&only=regressed&limit=50';const options = {method: 'GET', headers: {cookie: 'cetra_session=<cetra_session>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'http://localhost:8080/api/v1/projects/example/experiments/compare?ids=example&only=regressed&limit=50' \ --cookie cetra_session=<cetra_session>Project members, a read personal access token or a read key (D-J-5). Two to four experiments of one dataset, the first the baseline: their summaries, the deltas of each candidate to the baseline, and one page of items with a cell per experiment.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Project UUID, URL-encoded org-slug/project-slug, or current.
Query Parameters
Section titled “Query Parameters”Two to four distinct experiment ids, comma-separated; the first is the baseline.
The regression threshold, absolute, 0 to 1000 (default 0.1).
only of GET …/experiments/compare: keep the items with a cell of this kind.
Keep only the items with a regressed, improved or changed cell. Omitted keeps every item.
Page size. Default 50, accepted range 1–1000.
Spec 09 § Conventions.
Maximum number of items to return (1–1000, default 50).
Opaque cursor from a previous page.
Responses
Section titled “Responses”The comparison and one page of its items.
GET …/experiments/compare: two to four experiments of one dataset, the first the baseline.
object
The deltas of each candidate.
The deltas of one candidate, per score name.
object
The candidate.
The items the baseline also has whose candidate cell improved (see CompareCell).
The items the baseline also has whose candidate cell regressed (see CompareCell).
One delta per score name with at least one compared item.
object
One score’s delta of a candidate to the baseline.
object
The candidate’s mean minus the baseline’s, over the items both ran without error.
The compared items whose candidate value is higher by more than the threshold.
The items that were compared.
The compared items whose candidate value is lower by more than the threshold.
The experiments in request order; the first is the baseline.
The results of one experiment, aggregated.
object
The sum of the traces’ costs. Omitted when no trace has a cost.
Results with an error.
The experiment.
object
Creation time. JSON is RFC 3339.
The dataset. Omitted once the dataset is deleted.
The dataset’s name when the experiment was created.
The dataset version the experiment is pinned to.
Free text. Omitted when unset.
The error the experiment finished with. Omitted when none.
When the experiment finished. Omitted while it runs. JSON is RFC 3339.
Experiment id.
Live items of the pinned version.
object
Not unique. 1 to 200 characters.
Repetitions of every item, 1 to 20.
Results stored so far.
running, completed or failed.
The mean latency. Omitted when no result has one.
The median latency, by nearest rank. Omitted when no result has one.
The 95th percentile latency, by nearest rank. Omitted when no result has one.
Results stored.
One entry per score name, sorted by name.
One score of an experiment, over its rows.
object
Rows with at least one score of this name.
The data type the experiment’s scores of this name mostly carry.
Numeric scores only: the rows per bucket, 10 equal-width buckets from min to max (one
bucket when min equals max); empty for other types.
Categoricals only: the rows per label.
object
The largest value. Omitted when none.
Numeric and categorical scores: the mean over the rows that have a value. Omitted when none.
The median of the same values. Omitted when none.
The smallest value. Omitted when none.
The score’s name.
Booleans only: the share of rows that passed (the mean of 0 and 1). Omitted otherwise.
The cursor of the next page, or null on the last page. Always present.
One page of items, by item id.
One dataset item, with each experiment’s cell.
object
One cell per experiment that has a result for the item, in request order. Match cells by
experiment_id, never by position (D-J-13).
One experiment’s answer for one item.
object
The error of the item, from its lowest repetition or another one. Omitted when none.
The experiment.
Whether this cell improved on the baseline’s cell of the same item. Always false for the baseline.
The latency of the item’s lowest repetition, in nanoseconds. Omitted when unknown.
Any JSON value.
Whether this cell regressed against the baseline’s cell of the same item. Always false for the baseline.
The mean over repetitions, per score name.
object
The trace of the item’s lowest repetition. Omitted when none.
The dataset item.
Any JSON value.
Any JSON value.
Notes on the comparison, such as differing dataset versions or items left out of the deltas.
Example
{ "experiments": [ { "experiment": { "status": "running" }, "scores": [ { "data_type": "numeric" } ] } ]}The request is malformed or a filter is invalid.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}No credentials, or the credentials are invalid.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}The credentials do not allow this operation, or the organization’s plan does not include it (code plan_required).
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}The resource does not exist.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}The query took longer than its time limit, needed more memory or temporary disk space than allowed, a filter deletion matched more than 100,000 traces, or the owner cannot be that user (code owner_not_allowed).
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}Too many requests.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}The server is busy or a dependency is unavailable. Retry later.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}