dashai_predict
Enqueue a prediction job using a model from a finished run. Specify an optional dataset and receive a job ID to track progress.
Instructions
Enqueues a prediction using the model of an already finished run.
Like training, it is asynchronous: it returns a job_id and the result is followed with dashai_job_status.
Collapses the two calls the GUI makes (read from DatasetPredictionPanel + createPrediction + enqueuePredictionJob, not from the docs):
POST /predict/ creates the Prediction row ({run_id, dataset_id})
POST /job/ PredictJob enqueues with {prediction_id} — NOT run_id
Passing only run_id to the job raises KeyError 'prediction_id' inside PredictJob.run. The Prediction row must exist first.
Args: params (Predict): contains: - run_id (int): id of a finished run - dataset_id (Optional[int]): dataset to score; defaults to the run's training dataset (from its model session)
Returns: str: JSON {"job_id", "run_id", "prediction_id", "dataset_id", "status": "enqueued", "next_step"}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |