Skip to main content

Update Model Configuration

Page Outline

Replaces or partially updates the training configuration for a model. Changes take effect on the next training run.

Base Path: /api/v1/models

Method: PUT

Path: /{model_id}/config

Auth: Requires a valid Bearer token (Authorization: Bearer <JWT>)

Path Parameters

ParameterTypeDescription
model_idstringUnique identifier of the model

Request Body

{
"algorithm": "lightgbm",
"target_column": "churned",
"feature_columns": ["age", "tenure", "monthly_spend", "support_tickets"],
"hyperparameters": {
"n_estimators": 300,
"max_depth": 8,
"learning_rate": 0.03
},
"preprocessing": {
"handle_missing": "median",
"scale_features": true
}
}
FieldTypeDescription
algorithmstringAlgorithm override: xgboost, lightgbm, random_forest, logistic_regression, auto
target_columnstringColumn name to predict
feature_columnsstring[]List of input feature column names
hyperparametersobjectKey-value pairs passed directly to the algorithm
preprocessingobjectPreprocessing pipeline configuration

Behavior

  • Uses PUT semantics — the entire config is replaced. Use Get Config first to ensure you preserve any fields you do not intend to change.
  • Config updates are blocked while the model is in training status; returns HTTP 409.
  • Validates that target_column and feature_columns do not overlap.
  • An audit log entry is written with action model.config_updated, recording the previous and new config.

Response

Returns the full updated ModelConfig object (same schema as Get Config).