Skip to main content

TrainingService.ExportTrainingDiagnostics

Export bounded UTF-8 JSON Lines pages for a fixed committed revision. Preserve the cursor between requests to continue the same export. The example shows a later page with a single diagnostic record. The first page begins with the diagnostics definition.

TrainingService · Installed Web API. Use the HTTPS origin of your Prokrust installation and credentials authorized for this operation.

POST /prokrust.api.v1alpha1.TrainingService/ExportTrainingDiagnostics

Request headers​

HeaderValue and purpose
AuthorizationUse Bearer $PROKRUST_TOKEN for a Kubernetes caller authorized for this operation. Browser calls use the signed-in session.
Content-Typeapplication/json selects ProtoJSON for this unary request.
Connect-Protocol-Version1 selects version 1 of the Connect protocol.

Request fields​

ExportTrainingDiagnosticsRequest

JSON fieldTypeMeaning
scopeTrainingDiagnosticScopeResource and attempt selection for this diagnostics read.
cursorstringOpaque state for the same caller, attempt, and query. Preserve it between requests and restart if resync is true.

Example request​

Set PROKRUST_URL to the installation’s HTTPS origin and PROKRUST_TOKEN to your caller token. Replace the sample values with values from your installation.

curl --fail-with-body --silent --show-error \
-H "Authorization: Bearer $PROKRUST_TOKEN" \
-H 'Content-Type: application/json' \
-H 'Connect-Protocol-Version: 1' \
"$PROKRUST_URL/prokrust.api.v1alpha1.TrainingService/ExportTrainingDiagnostics" \
--data-binary @- <<'JSON'
{
"scope": {
"resourceKind": "TrainingRun",
"namespace": "analytics",
"name": "train-values",
"uid": "91c90b29-d618-5dbf-bc4b-391c5aababcd",
"attemptUid": "02c42918-e4a6-5009-a3fd-cf5ec3ec60cd"
}
}
JSON

Response fields​

TrainingDiagnosticsExportResponse

JSON fieldTypeMeaning
resourceUidstringUID of the resource named in the request, including when a Model points to a TrainingRun.
attemptUidstringIdentifier of a training attempt. Use the UID reported by the summary to select the same attempt on subsequent reads.
revisionuint64Monotonic diagnostics revision for this attempt. Compare revisions only within the same attempt.
jsonlstringBounded UTF-8 JSON Lines pages from a fixed committed revision. The first page includes the exact metric descriptors, provenance and sampling policy.
cursorstringOpaque state for the same caller, attempt, and query. Preserve it between requests and restart if resync is true.
resyncboolTrue when the saved cursor can no longer continue the requested history. Restart from the current summary or first page.
hasMoreboolTrue when another page is available. Continue with the returned offset or cursor for this operation.

Example response​

{
"resourceUid": "91c90b29-d618-5dbf-bc4b-391c5aababcd",
"attemptUid": "02c42918-e4a6-5009-a3fd-cf5ec3ec60cd",
"revision": "4",
"jsonl": "{\"sequence\":3,\"recordedAt\":\"2026-05-12T10:00:00Z\",\"position\":{\"elapsedMs\":12000,\"epoch\":2,\"optimizerStep\":8},\"event\":{\"type\":\"stage\",\"stage\":\"Training\"}}\n"
}