autoresearch
autoresearch

Start a training run

Start an asynchronous training run for this pipeline. Creates a Task/TaskRun sandbox where the autoresearch agent iterates on features and models, and returns the run immediately with status 'running'. Poll the training run until it reaches a terminal status (completed or failed). A pipeline's first run has no champion until it completes and promotion runs; on a retrain the existing champion stays live and keeps scoring until a new one is promoted.

post/api/projects/{project_id}/autoresearch/{id}/train/

Request

  • Base URL: https://us.posthog.com
  • URL: https://us.posthog.com/api/projects/{project_id}/autoresearch/{id}/train/
  • Auth: HTTP bearer

Path parameters

idstring uuid required

A UUID string identifying this autoresearch pipeline.

project_idstring required

Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

Request body

iteration_budgetinteger

Override the pipeline iteration budget for this training run.

Response

The created training run. Poll it through the training runs endpoint.

idstring uuid required

Unique UUID of this training run.

pipelinestring uuid required

Pipeline this training run belongs to.

task_idstring uuid nullable

Parent Task ID in the tasks sandbox. Null for stub runs.

task_run_idstring uuid nullable

Task sandbox run ID. Null for stub/synchronous training runs.

task_urlstring nullable required

Relative URL to the underlying sandbox Task detail page. Null for stub/synchronous training runs.

status'pending' | 'running' | 'completed' | 'failed' required
  • pending - Pending
  • running - Running
  • completed - Completed
  • failed - Failed
iteration_budgetinteger

Maximum iterations allowed for this run.

iteration_countinteger required

Number of iterations completed.

best_holdout_scorenumber double nullable required

Best holdout AUC achieved across all iterations in this run.

reader_summarystring nullable required

One or two plain sentences on what this run learned, for people. Null if not written.

next_stepsstring[] nullable required

Short plain-language next steps for people, at most 5. Null if not written.

errorstring required

Error message if the run failed.

started_atstring date-time nullable required

Timestamp when the training run started.

completed_atstring date-time nullable required

Timestamp when the training run completed or failed.

created_atstring date-time required

Example response

{
  "iterations": [
    {
      "model_spec": {
        "model_class": "sklearn.linear_model.LogisticRegression",
        "model_params": {
          "C": 1
        }
      }
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.