Fine Tuning - Cancel
Cancels the processing of the fine-tune job specified by the given fine-tune-id.
POST {endpoint}/openai/fine_tuning/jobs/{fine-tuning-job-id}/cancel?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 |
The fine tune has been successfully canceled |
|
Other Status Codes |
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
Canceling a fine tuning job.
Sample request
POST https://aoairesource.openai.azure.com/openai/fine_tuning/jobs/ft-72a2792ef7d24ba7b82c7fe4a37e379f/cancel?api-version=2024-08-01-preview
Sample response
{
"hyperparameters": {
"n_epochs": -1
},
"status": "cancelled",
"model": "curie",
"training_file": "file-181a1cbdcdcf4677ada87f63a0928099",
"finished_at": 1646127311,
"id": "ft-72a2792ef7d24ba7b82c7fe4a37e379f",
"created_at": 1646126127,
"object": "fine_tuning.job"
}
Definitions
Name | Description |
---|---|
Error |
Error |
Error |
ErrorCode |
Error |
ErrorResponse |
Fine |
FineTuningHyperParameters |
Fine |
FineTuningJob |
Fine |
FineTuningJobError |
Fine |
FineTuningState |
Inner |
InnerError |
Inner |
InnerErrorCode |
Type |
TypeDiscriminator |
Error
Error
Name | Type | Description |
---|---|---|
code |
ErrorCode |
|
details |
Error[] |
The error details if available. |
innererror |
InnerError |
|
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 |
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 |
|
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 |
|
id |
string |
The identity of this item. |
model |
string |
The identifier (model-id) of the base model used for the fine-tune. |
object |
TypeDiscriminator |
|
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 |
|
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 |
|
innererror |
InnerError |
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. |