Get Training Logs
Page Outline
Returns the textual training log stream for a specific training run, including pipeline stages, warnings, and algorithm output.
Base Path: /api/v1/models
Method: GET
Path: /{model_id}/training-metrics/logs
Alias: /{model_id}/training/metrics/logs
Auth: Requires a valid Bearer token (Authorization: Bearer <JWT>)
Path Parameters
| Parameter | Type | Description |
|---|---|---|
model_id | string | Unique identifier of the model |
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
run_id | string | — | Specific training run ID. Defaults to the most recent run |
level | string | info | Log level filter: debug, info, warning, error |
limit | integer | 500 | Maximum number of log lines to return (max: 5000) |
offset | integer | 0 | Line offset for pagination through large log files |
tail | boolean | false | If true, returns the last limit lines (most recent), ignoring offset |
Behavior
- For in-progress runs, returns all log lines captured up to the moment of the request.
- Log lines are returned in chronological order unless
tail=true. - To download the full log file as a
.txtartifact, use Download Logs instead. - Alias path
/training/metrics/logsis fully supported. - Returns
HTTP 404if the model or run is not found.
Response
Returns a TrainingLogs object.
{
"model_id": "mdl-7f3a19bc",
"run_id": "run-20260313-a4b9c2",
"total_lines": 1842,
"lines": [
{ "line": 1, "level": "info", "message": "[Pipeline] Starting preprocessing...", "timestamp": "2026-03-13T16:10:05Z" },
{ "line": 2, "level": "info", "message": "[Preprocessing] Handling missing values (strategy=mean)", "timestamp": "2026-03-13T16:10:06Z" },
{ "line": 3, "level": "warning", "message": "[Preprocessing] Column 'support_tickets' has 12% missing values", "timestamp": "2026-03-13T16:10:06Z" },
{ "line": 4, "level": "info", "message": "[Training] Starting XGBoost with n_estimators=200...", "timestamp": "2026-03-13T16:10:09Z" }
]
}