Skip to main content
Use a value from metrics[].key returned by GET /api/v2-beta/training-runs/{trainingRunId}/metrics as metricKey. Set resolution to choose the number of sampled history points; the default is 200. Returns 404 if the run or metric is unavailable.

Signature

Method signature on client.trainings:

Parameters

string
required
ID of the training run, with prefix trn..
string
required
Metric key from metrics[].key returned by the latest-metrics endpoint.
number
default:"200"
Requested number of sampled history points, from 2 to 500; defaults to 200.

Returns

Promise<TrainingRunMetricHistory> The history of one training run metric, sampled to the requested resolution.
string
required
Metric key accepted by the metric-history endpoint.
"training_loss" | "validation_loss" | "learning_rate" | "training_token_accuracy" | "validation_token_accuracy" | null
required
Normalized metric name, or null when this key has no recognized metric name.
object[]
required
Metric values sampled to the requested resolution.
boolean
required
Whether metric points were omitted from this response.

Errors

HTTP errors throw PotatoApiError. The endpoint documents these error responses: HTTP endpoint: GET /training-runs/{trainingRunId}/metrics/{metricKey}.