Share via


Fine Tuning - Get Checkpoints

Gets the checkpoints for the fine-tune job specified by the given fine-tune-id. Checkpoints are created at the end of successful epochs during training.

GET {endpoint}/openai/fine_tuning/jobs/{fine-tuning-job-id}/checkpoints?api-version=2024-10-21
GET {endpoint}/openai/fine_tuning/jobs/{fine-tuning-job-id}/checkpoints?after={after}&limit={limit}&api-version=2024-10-21

URI Parameters

Name In Required Type Description
endpoint
path True

string (url)

Supported Cognitive Services endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace "aoairesource" with your Azure OpenAI account name).

fine-tuning-job-id
path True

string

The identifier of the fine-tune job.

api-version
query True

string

The requested API version.

after
query

string

Identifier for the last checkpoint ID from the previous pagination request.

limit
query

integer (int32)

Number of checkpoints to retrieve. Defaults to 10.

Request Header

Name Required Type Description
api-key True

string

Provide your Cognitive Services Azure OpenAI account key here.

Responses

Name Type Description
200 OK

FineTuningJobCheckpointList

Success

Other Status Codes

ErrorResponse

An error occurred.

Security

api-key

Provide your Cognitive Services Azure OpenAI account key here.

Type: apiKey
In: header

Examples

Getting checkpoints of a fine tuning job.

Sample request

GET https://aoairesource.openai.azure.com/openai/fine_tuning/jobs/ftjob-72a2792ef7d24ba7b82c7fe4a37e379f/checkpoints?api-version=2024-10-21

Sample response

{
  "has_more": false,
  "data": [
    {
      "id": "ftckpt_qtZ5Gyk4BLq1SfLFWp3RtO3P",
      "created_at": 1646126127,
      "fine_tuned_model_checkpoint": "gpt-35-turbo-0613.ft-72a2792ef7d24ba7b82c7fe4a37e379f:ckpt-step-10",
      "step_number": 10,
      "metrics": {
        "step": 10,
        "train_loss": 0.478,
        "train_mean_token_accuracy": 0.924,
        "valid_loss": 10.112,
        "valid_mean_token_accuracy": 0.145,
        "full_valid_loss": 0.567,
        "full_valid_mean_token_accuracy": 0.944
      },
      "fine_tuning_job_id": "ftjob-72a2792ef7d24ba7b82c7fe4a37e379f",
      "object": "fine_tuning.job.checkpoint"
    },
    {
      "id": "ftckpt_frtXDR2453C4FG67t03MLPs5",
      "created_at": 1646126137,
      "fine_tuned_model_checkpoint": "gpt-35-turbo-0613.ft-72a2792ef7d24ba7b82c7fe4a37e379f:ckpt-step-20",
      "step_number": 20,
      "metrics": {
        "step": 20,
        "train_loss": 0.355,
        "train_mean_token_accuracy": 0.947,
        "valid_loss": 11.32,
        "valid_mean_token_accuracy": 0.122,
        "full_valid_loss": 0.317,
        "full_valid_mean_token_accuracy": 0.955
      },
      "fine_tuning_job_id": "ftjob-72a2792ef7d24ba7b82c7fe4a37e379f",
      "object": "fine_tuning.job.checkpoint"
    },
    {
      "id": "ftckpt_agLk6Gio560ORp14gl123fgd",
      "created_at": 1646126147,
      "fine_tuned_model_checkpoint": "gpt-35-turbo-0613.ft-72a2792ef7d24ba7b82c7fe4a37e379f:ckpt-step-30",
      "step_number": 30,
      "metrics": {
        "step": 30,
        "train_loss": 0.155,
        "train_mean_token_accuracy": 0.975,
        "valid_loss": 9.31,
        "valid_mean_token_accuracy": 0.092,
        "full_valid_loss": 0.114,
        "full_valid_mean_token_accuracy": 0.963
      },
      "fine_tuning_job_id": "ftjob-72a2792ef7d24ba7b82c7fe4a37e379f",
      "object": "fine_tuning.job.checkpoint"
    }
  ],
  "object": "list"
}

Definitions

Name Description
Error

Error

ErrorCode

ErrorCode

ErrorResponse

ErrorResponse

FineTuningJobCheckpoint

FineTuningJobCheckpoint

FineTuningJobCheckpointList

FineTuningJobCheckpointList

InnerError

InnerError

InnerErrorCode

InnerErrorCode

TypeDiscriminator

TypeDiscriminator

Error

Error

Name Type Description
code

ErrorCode

ErrorCode
Error codes as defined in the Microsoft REST guidelines (https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses).

details

Error[]

The error details if available.

innererror

InnerError

InnerError
Inner error as defined in the Microsoft REST guidelines (https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses).

message

string

minLength: 1

The message of this error.

target

string

The location where the error happened if available.

ErrorCode

ErrorCode

Value Description
conflict

The requested operation conflicts with the current resource state.

invalidPayload

The request data is invalid for this operation.

forbidden

The operation is forbidden for the current user/api key.

notFound

The resource is not found.

unexpectedEntityState

The operation cannot be executed in the current resource's state.

itemDoesAlreadyExist

The item does already exist.

serviceUnavailable

The service is currently not available.

internalFailure

Internal error. Please retry.

quotaExceeded

Quota exceeded.

jsonlValidationFailed

Validation of jsonl data failed.

fileImportFailed

Import of file failed.

tooManyRequests

Too many requests. Please retry later.

unauthorized

The current user/api key is not authorized for the operation.

contentFilter

Image generation failed as a result of our safety system.

ErrorResponse

ErrorResponse

Name Type Description
error

Error

Error
Error content as defined in the Microsoft REST guidelines (https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses).

FineTuningJobCheckpoint

FineTuningJobCheckpoint

Name Type Description
created_at

integer (unixtime)

The Unix timestamp (in seconds) for when the checkpoint was created.

fine_tuned_model_checkpoint

string

minLength: 1

The name of the fine-tuned checkpoint model that is created.

fine_tuning_job_id

string

minLength: 1

The name of the fine-tuning job that this checkpoint was created from..

id

string

The identity of this checkpoint.

metrics

object

Dictionary`2
The metrics at the step number during the fine-tuning job.

object

TypeDiscriminator

TypeDiscriminator
Defines the type of an object.

step_number

integer (int32)

The step number that the checkpoint was created at.

FineTuningJobCheckpointList

FineTuningJobCheckpointList

Name Type Description
data

FineTuningJobCheckpoint[]

The list of items.

has_more

boolean

A value indicating whether the list contains more elements than returned.

object

TypeDiscriminator

TypeDiscriminator
Defines the type of an object.

InnerError

InnerError

Name Type Description
code

InnerErrorCode

InnerErrorCode
Inner error codes as defined in the Microsoft REST guidelines (https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses).

innererror

InnerError

InnerError
Inner error as defined in the Microsoft REST guidelines (https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses).

InnerErrorCode

InnerErrorCode

Value Description
invalidPayload

The request data is invalid for this operation.

TypeDiscriminator

TypeDiscriminator

Value Description
list

This object represents a list of other objects.

fine_tuning.job

This object represents a fine tune job.

file

This object represents a file.

fine_tuning.job.event

This object represents an event of a fine tuning job.

fine_tuning.job.checkpoint

This object represents a checkpoint of a fine tuning job.

model

This object represents a model (can be a base model or fine tune job result).

batch

This object represents a batch.

upload

This object represents a file upload.

upload.part

This object represents part of a file upload.