model_metrics
Report a model's best training epoch and metrics for private or public projects, separating best-epoch values from top-level reported metrics and flagging mismatches.
Instructions
Report a model's best training epoch and its reported metrics, labelled so neither can be mistaken for the other (works for private and public projects). bestEpoch, bestFitness, and bestEpochMetrics are stated only when exactly one trainResults record has the reported bestEpoch and that record's fitness exactly equals the reported bestFitness; otherwise all three are null and bestEpochNote keeps the platform's raw values and says why (older Ultralytics versions reported the last epoch as bestEpoch). reportedMetrics is the model's top-level metrics field verbatim; the API does not say which evaluation produced it (on finished Platform-trained runs observed live it matches the post-training evaluation of the best checkpoint, not the last training epoch), so it makes no epoch claim. resultRecordCount counts trainResults records, not epochs. include_train_args adds the full trainArgs object (111 keys observed live), omitted by default. include_history adds the last N records in API order and always states the window it covers, with record counts, the min/max reported epoch, and duplicate and missing epoch numbers in that range.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | Model ref by owner/project/model, ul:// URI, or slug (requires project). | |
| project | No | Project ref required when model is given by slug. | |
| history_last_n | No | Limit the history to the last N records in API order (default 20). Truncates a long run to its tail; the response always reports the window it covers (record counts and the min/max reported epoch), so a flat tail is not mistaken for a converged run. | |
| include_history | No | Include the trainResults history (per-record epoch and metrics); omitted by default. | |
| include_train_args | No | Include the full trainArgs object; off by default because the platform returns roughly a hundred keys. |