curl --request POST \
--url https://api.baseten.co/v1/training_projects/{training_project_id}/jobs/{training_job_id}/metrics \
--header "Authorization: Api-Key $BASETEN_API_KEY" \
--data '{
  "end_epoch_millis": null,
  "start_epoch_millis": null
}'
{
  "training_job": {
    "id": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "current_status": "<string>",
    "error_message": "<string>",
    "instance_type": {
      "id": "<string>",
      "name": "<string>",
      "memory_limit_mib": 123,
      "millicpu_limit": 123,
      "gpu_count": 123,
      "gpu_type": "<string>",
      "gpu_memory_limit_mib": 123
    },
    "updated_at": "2023-11-07T05:31:56Z",
    "training_project_id": "<string>",
    "training_project": {
      "id": "<string>",
      "name": "<string>"
    }
  },
  "gpu_memory_usage_bytes": {},
  "gpu_utilization": {},
  "cpu_usage": [
    {
      "value": 123,
      "timestamp": "2023-11-07T05:31:56Z"
    }
  ],
  "cpu_memory_usage_bytes": [
    {
      "value": 123,
      "timestamp": "2023-11-07T05:31:56Z"
    }
  ],
  "ephemeral_storage": {
    "usage_bytes": [
      {
        "value": 123,
        "timestamp": "2023-11-07T05:31:56Z"
      }
    ],
    "utilization": [
      {
        "value": 123,
        "timestamp": "2023-11-07T05:31:56Z"
      }
    ]
  },
  "cache": {
    "usage_bytes": [
      {
        "value": 123,
        "timestamp": "2023-11-07T05:31:56Z"
      }
    ],
    "utilization": [
      {
        "value": 123,
        "timestamp": "2023-11-07T05:31:56Z"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

You must specify the scheme 'Api-Key' in the Authorization header. For example, Authorization: Api-Key <Your_Api_Key>

Path Parameters

training_project_id
string
required
training_job_id
string
required

Body

application/json

A request to fetch metrics. Allows the user to request metrics over a period of time.

Response

200 - application/json

A response to fetch training job metrics. The outer list for each metric represents that metric across time.