start_experiment_run
Scores selected or time-windowed pipeline Sessions with a Metric Group outside an experiment; preview the judged cells, then queue and poll the run.
Instructions
Scores a pipeline's Sessions with a Metric Group, outside any Experiment. Costs money.
Every Evaluator of the Metric Group judges every chosen Session, so the run has Sessions times
Evaluators cells, and an Evaluator that judges with a model is billed per judged turn on the
customer's provider. Name the Sessions in session_ids (find them with list_sessions), or
give a window of time: window_from and window_to together, optionally narrowed by
origin, deployment_id, pipeline_version_id and revision_id, judge every Session
whose last activity falls in it. The server resolves the window to its Sessions when the run
starts. Give session_ids or a window, never both. A window run is always SAMPLED and cannot take
focus; it is refused when it has more Sessions or cells than the ceiling.
Preview first: preview=True with a window starts nothing and returns sessions,
evaluators and cells (the judge calls it would make) against the ceiling. Show that to
the user and get a yes before starting for real. There is no preview for named Sessions: their
cells are the number of Sessions times the Metric Group's Evaluators.
The run is queued, not finished: poll it with get_experiment_run (counts, then the grid),
and find earlier runs with list_experiment_runs. reuse REUSE_SUCCEEDED judges only
what this Metric Group has not already judged successfully, which makes re-running after a
partial failure cheap; RERUN_ALL judges everything again. selection HAND_PICKED marks Sessions
chosen because they looked wrong, which keeps the run out of trends and exports; use it
for named Sessions that are not a sample of the traffic. A focus makes it HAND_PICKED.
:param pipeline_name: Name of the pipeline whose Sessions are judged.
:param metric_group_id: The Metric Group to judge with (see list_metric_groups).
:param session_ids: The Sessions to judge: search_session_id values, or a single-turn run's query_id.
:param window_from: Window start, ISO 8601 with a timezone: last activity at or after it.
:param window_to: Window end, ISO 8601 with a timezone, not in the future: last activity at or before it.
:param origin: Window filter: only Sessions from SERVICE, PIPELINE_RUN or PLAYGROUND.
:param deployment_id: Window filter: only Sessions this Service served.
:param pipeline_version_id: Window filter: only Sessions this pipeline version served.
:param revision_id: Window filter: only Sessions this Service revision served.
:param reuse: RERUN_ALL (default) or REUSE_SUCCEEDED.
:param selection: SAMPLED (default) or HAND_PICKED.
:param focus: Per Session id, the turns to judge by query_id; a Session left out is judged on every turn.
:param preview: True counts what the window would judge and starts nothing.
:returns: The queued run (pipeline_experiment_run_id, cells), or with preview the counts, or an error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| focus | No | ||
| reuse | No | RERUN_ALL | |
| origin | No | ||
| preview | No | ||
| selection | No | SAMPLED | |
| window_to | No | ||
| revision_id | No | ||
| session_ids | No | ||
| window_from | No | ||
| deployment_id | No | ||
| pipeline_name | Yes | ||
| metric_group_id | Yes | ||
| pipeline_version_id | No |