Skip to navigation

Train a model

View as Markdown

Train a new ML model on a dataset, or retrain an existing one.

To train a new model, pass name and omit ml_model_id. To retrain, pass ml_model_id and omit name; the model keeps its name and gains a new version. dataset_id and target_column are always required, and every column must exist in the dataset. Training runs in the background; check its progress with get_ml_model.

Requires an API key with the write scope.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
target_columnstringRequired
dataset_idstringRequiredformat: "uuid"
descriptionstring or nullOptional
task_typeenum or nullOptional
Allowed values:
quality_presetenumOptionalDefaults to high_quality
Allowed values:
feature_columnslist of strings or nullOptional
image_columnslist of strings or nullOptional
problem_typeenum or nullOptional
Allowed values:
ml_model_idstring or nullOptionalformat: "uuid"
namestring or nullOptional

Response

OK
idstringformat: "uuid"
namestring
task_typestring
descriptionstring or nullOptional
target_columnstring or nullOptional
feature_columnslist of strings or nullOptional
image_columnslist of strings or nullOptional
problem_typestring or nullOptional
currently_activebooleanOptionalDefaults to false
statusstring or nullOptional
version_numberinteger or nullOptional
dataset_idstring or nullOptionalformat: "uuid"
quality_presetstring or nullOptional
error_messagestring or nullOptional
training_started_atdatetime or nullOptional
training_completed_atdatetime or nullOptional
evaluation_metricsmap from strings to any or nullOptional

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
500
Internal Server Error
503
Service Unavailable Error