Skip to main content

TrainingService.GetModelReport

Read the verified training report for the Model. Model reads also require access to the producing TrainingRun. The report records evaluation mode and final metrics. Parse reportJson as JSON to inspect the selected epoch and split metrics. The digest identifies the original verified bytes.

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

POST /prokrust.api.v1alpha1.TrainingService/GetModelReport

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​

GetArtifactRequest

JSON fieldTypeMeaning
namespacestringKubernetes workspace namespace for the operation. Use the namespace in which the selected resource lives.
namestringKubernetes metadata.name of the selected resource in this namespace.
uidstringUID of the TrainingRun or Model containing the artifact reference. Use it to reject a same-name replacement.

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/GetModelReport" \
--data-binary @- <<'JSON'
{
"namespace": "analytics",
"name": "trained-model",
"uid": "321b2231-6ace-5f7c-bbb5-c0f7d83f137a"
}
JSON

Response fields​

TrainingReportResponse

JSON fieldTypeMeaning
manifestDigeststringSHA-256 identity of the verified manifest. Keep it with file indices so they refer to the same publication.
reportDigeststringDigest of the complete verified report artifact.
trainingRunUidstringUID of the TrainingRun that produced this result. Use it to distinguish same-name runs.
evaluationModestringFull or ValidationOnly. ValidationOnly never contains test metrics.
contractVersionstringFormat version of the training report stored inside reportJson.
reportJsonstringOriginal verified JSON, at most 1 MiB. Integers remain exact in the text.

Example response​

{
"manifestDigest": "sha256:a0e12bb74ea98aa832ec34f24819defe41dcb19e2a6b51a89263502e3dae0d6c",
"reportDigest": "sha256:a78ee3a0329c8c36807c042bdead1a9282d57a480229f82b717e500840a54ef4",
"trainingRunUid": "91c90b29-d618-5dbf-bc4b-391c5aababcd",
"evaluationMode": "ValidationOnly",
"contractVersion": "prokrust.training/v3",
"reportJson": "{\"contractVersion\":\"prokrust.training/v3\",\"evaluationMode\":\"ValidationOnly\",\"kind\":\"TrainingResult\",\"selectedEpoch\":2,\"train\":{\"count\":10,\"meanLoss\":0.3,\"secondary\":0.2},\"trainingInputDigest\":\"sha256:3687160df24be8c71552288897860d810047857e4968c55c565c3e07c4c5dca6\",\"trainingRunUID\":\"91c90b29-d618-5dbf-bc4b-391c5aababcd\",\"validation\":{\"count\":8,\"meanLoss\":0.4,\"secondary\":0.25}}"
}