Skip to main content

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

ParameterTypeDescription
model_idstringUnique identifier of the model

Query Parameters

ParameterTypeDefaultDescription
run_idstringSpecific training run ID. Defaults to the most recent run
levelstringinfoLog level filter: debug, info, warning, error
limitinteger500Maximum number of log lines to return (max: 5000)
offsetinteger0Line offset for pagination through large log files
tailbooleanfalseIf 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 .txt artifact, use Download Logs instead.
  • Alias path /training/metrics/logs is fully supported.
  • Returns HTTP 404 if 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" }
]
}