Fine Tuning - Get

Gets details for a single fine-tune job specified by the given fine-tune-id. The details contain the base model, training and validation files, hyper parameters, time stamps, status and events. Events are created when the job status changes, e.g. running or complete, and when results are uploaded.

GET {endpoint}/openai/fine_tuning/jobs/{fine-tuning-job-id}?api-version=2024-08-01-preview

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.

Responses

Name Type Description
200 OK

FineTuningJob

Success

Other Status Codes

ErrorResponse

An error occurred.

Security

api-key

API key authentication

Type: apiKey
In: header

OAuth2Auth

OAuth2 authentication

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize

Scopes

Name Description
https://cognitiveservices.azure.com/.default

Examples

Getting a fine tuning job.

Sample request

GET https://aoairesource.openai.azure.com/openai/fine_tuning/jobs/ft-72a2792ef7d24ba7b82c7fe4a37e379f?api-version=2024-08-01-preview

Sample response

{
  "hyperparameters": {
    "n_epochs": -1
  },
  "status": "succeeded",
  "model": "curie",
  "fine_tuned_model": "curie.ft-72a2792ef7d24ba7b82c7fe4a37e379f",
  "training_file": "file-181a1cbdcdcf4677ada87f63a0928099",
  "result_files": [
    "file-181a1cbdcdcf4677ada87f63a0928099"
  ],
  "finished_at": 1646127311,
  "trained_tokens": 2342,
  "id": "ft-72a2792ef7d24ba7b82c7fe4a37e379f",
  "created_at": 1646126127,
  "object": "fine_tuning.job"
}

Definitions

Name Description
Error

Error

ErrorCode

ErrorCode

ErrorResponse

ErrorResponse

FineTuningHyperParameters

FineTuningHyperParameters

FineTuningJob

FineTuningJob

FineTuningJobError

FineTuningJobError

FineTuningState

FineTuningState

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

The message of this error.

target

string

The location where the error happened if available.

ErrorCode

ErrorCode

Name Type Description
conflict

string

The requested operation conflicts with the current resource state.

contentFilter

string

Image generation failed as a result of our safety system.

fileImportFailed

string

Import of file failed.

forbidden

string

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

internalFailure

string

Internal error. Please retry.

invalidPayload

string

The request data is invalid for this operation.

itemDoesAlreadyExist

string

The item does already exist.

jsonlValidationFailed

string

Validation of jsonl data failed.

notFound

string

The resource is not found.

quotaExceeded

string

Quota exceeded.

serviceUnavailable

string

The service is currently not available.

tooManyRequests

string

Too many requests. Please retry later.

unauthorized

string

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

unexpectedEntityState

string

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

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).

FineTuningHyperParameters

FineTuningHyperParameters

Name Type Description
batch_size

integer

The batch size to use for training. The batch size is the number of training examples used to train a single forward and backward pass. In general, we've found that larger batch sizes tend to work better for larger datasets. The default value as well as the maximum value for this property are specific to a base model.

learning_rate_multiplier

number

The learning rate multiplier to use for training. The fine-tuning learning rate is the original learning rate used for pre-training multiplied by this value. Larger learning rates tend to perform better with larger batch sizes. We recommend experimenting with values in the range 0.02 to 0.2 to see what produces the best results.

n_epochs

integer

The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.

FineTuningJob

FineTuningJob

Name Type Description
created_at

integer

A timestamp when this job or item was created (in unix epochs).

error

FineTuningJobError

FineTuningJobError
For fine-tuning jobs that have failed, this will contain more information on the cause of the failure.

estimated_finish

integer

The Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value will be null if the fine-tuning job is not running.

fine_tuned_model

string

The identifier (model-id) of the resulting fine tuned model. This property is only populated for successfully completed fine-tune runs. Use this identifier to create a deployment for inferencing.

finished_at

integer

A timestamp when this job or item has finished successfully (in unix epochs).

hyperparameters

FineTuningHyperParameters

FineTuningHyperParameters
The hyper parameter settings used in a fine tune job.

id

string

The identity of this item.

model

string

The identifier (model-id) of the base model used for the fine-tune.

object

TypeDiscriminator

TypeDiscriminator
Defines the type of an object.

organisation_id

string

The organisation id of this fine tune job. Unused on Azure OpenAI; compatibility for OpenAI only.

result_files

string[]

The result file identities (file-id) containing training and evaluation metrics in csv format. The file is only available for successfully completed fine-tune runs.

seed

integer

The seed used for the finetuning job.

status

FineTuningState

FineTuningState
The state of a finetunes object or fine tuning job.

suffix

string

The suffix used to identify the fine-tuned model. The suffix can contain up to 40 characters (a-z, A-Z, 0-9,- and _) that will be added to your fine-tuned model name.

trained_tokens

integer

The total number of billable tokens processed by this fine tuning job.

training_file

string

The file which is used for training.

validation_file

string

The file which is used to evaluate the fine tuned model during training.

FineTuningJobError

FineTuningJobError

Name Type Description
code

string

The machine-readable error code..

message

string

The human-readable error message.

param

string

The parameter that was invalid, usually training_file or validation_file. This field will be null if the failure was not parameter-specific.

FineTuningState

FineTuningState

Name Type Description
cancelled

string

The operation has been cancelled and is incomplete. It can be categorized as a terminal state.

created

string

The operation was created. This state is not returned by Azure OpenAI and exposed only for compatibility. It can be categorized as an inactive state.

failed

string

The operation has completed processing with a failure and cannot be further consumed. It can be categorized as a terminal state.

pending

string

The operation is not yet queued to be processed in the future. It can be categorized as an inactive state.

running

string

The operation has started to be processed. It can be categorized as an active state.

succeeded

string

The operation has successfully be processed and is ready for consumption. It can be categorized as a terminal state.

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

Name Type Description
invalidPayload

string

The request data is invalid for this operation.

TypeDiscriminator

TypeDiscriminator

Name Type Description
file

string

This object represents a file.

fine_tuning.job

string

This object represents a fine tune job.

fine_tuning.job.checkpoint

string

This object represents a checkpoint of a fine tuning job.

fine_tuning.job.event

string

This object represents an event of a fine tuning job.

list

string

This object represents a list of other objects.

model

string

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

upload

string

This object represents a file upload.

upload.part

string

This object represents part of a file upload.