Query the details of a specific model fine-tuning task.
Prerequisites
- Applicable region: The features described in this topic are available only in the China (Beijing) region, and you must use the API Key of that region.
- Applicable region: The features described in this topic are available only in the Singapore region, and you must use the API Key of that region.
- You have successfully obtained an API Key and configured it in an environment variable.
- You have created a fine-tuning job by calling the Create fine-tuning job operation.
Query fine-tuning job status
Query the detailed information and running status of a specified fine-tuning job.
Endpoint
Request example
Request parameters
Field | Type | Parameter passing | Required | Description |
|---|---|---|---|---|
job_id | String | Url Path | Yes | The ID of the fine-tuning job to query. It is the job_id in the response parameters for creating a fine-tuning job. |
Response example
- Text generation model
- Video generation model
- Image generation model
Response parameters
Parameter Name | Type | Description |
|---|---|---|
request_id | String | The ID of the request. |
output | Object | The details of the fine-tuning job. |
output.job_id | String | The ID of the fine-tuning job. You can use this ID to query the job status later. Generation rule: |
output.jobs_name | String | Same as |
output.status | String | The job status of this fine-tuning job. |
output.finetuned_output | String | This parameter appears only when the fine-tuning job status is SUCCEED. It returns the ID of the fine-tuned model. |
output.model | String | The ID of the model used for the fine-tuning job. |
output.base_model | String | The ID of the foundation model that corresponds to the model used for the fine-tuning job. For example, the foundation model used by the fine-tuning job |
output.training_file_ids | Array | A field for compatibility. New jobs always return an empty array. Use training_datasets instead. |
output.validation_file_ids | Array | A field for compatibility. New jobs always return an empty array. Use validation_datasets instead. |
output.training_datasets | Array of Dataset | A list of training datasets. |
output.validation_datasets | Array of Dataset | A list of test datasets. |
output.hyper_parameters | Object | The explicitly declared hyperparameters. |
output.training_type | String | The fine-tuning method. |
output.create_time | String | The time when the fine-tuning job was created. |
output.workspace_id | String | The ID of the workspace to which the fine-tuning job belongs. |
output.user_identity | String | The UID of the primary account to which the fine-tuning job belongs. |
output.modifier | String | The UID of the account that last operated on the fine-tuning job. (For example, if a RAM user cancels the job, the UID of the RAM user is displayed here.) |
output.creator | String | The UID of the user who created the fine-tuning job. |
output.end_time | String | The time when the fine-tuning job ended. This parameter appears when the job status is SUCCEED, FAILED, or CANCELED. |
output.group | String | The task type of the model fine-tuning. |
output.usage | Integer | The number of tokens (count) consumed by the fine-tuning job. For the billing formula, see Billing. This parameter appears when the job status is SUCCEED or CANCELED. |
output.output_cnt | Integer | The number of Checkpoints that the current job has generated. This parameter is returned only for models that support multiple Checkpoint outputs (such as |
output.max_output_cnt | Integer | The maximum number of Checkpoints that a single job can generate. The part of |
Cancel a fine-tuning job
Cancels a running fine-tuning job. Only jobs in the running state can be canceled.
Endpoint
Request example
Request parameters
Field | Type | Parameter passing | Required | Description |
|---|---|---|---|---|
job_id | String | Url Path | Yes | The ID of the fine-tuning job to cancel. You can obtain this ID by calling the create training job or list training jobs operation. |
Response example
Response parameters
Parameter Name | Type | Description |
|---|---|---|
request_id | String | The ID of the request. |
output | Object | The details returned for the cancel operation. |
Delete a fine-tuning job
Deletes the record of a specified fine-tuning job.
Endpoint
Request example
Request parameters
Field | Type | Parameter passing | Required | Description |
|---|---|---|---|---|
job_id | String | Url Path | Yes | The ID of the fine-tuning job to delete. You can obtain this ID by calling the create training job or list training jobs operation. |
Response example
Response parameters
Parameter Name | Type | Description |
|---|---|---|
request_id | String | The ID of the request. |
output | Object | The details returned for the delete operation. |
Query the list of fine-tuning jobs
Queries the list of fine-tuning jobs under the current account in a paginated manner.
Endpoint
Request example
Request parameters
Parameter Name | Type | Parameter passing | Required | Description |
|---|---|---|---|---|
page_no | Integer | Query | No | Default value: 1. |
page_size | Integer | Query | No | Default value: 10. Maximum: 1000. Minimum: 1. |
model | String | Query | No | The model ID. If you specify this parameter, only fine-tuning jobs based on this model are listed. |
Response example
Response parameters
| Parameter Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| request_id | String | The ID of the request. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| output | Object | The details returned for the query. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| output.page_no | Integer | The page number. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| output.page_size | Integer | The number of entries displayed per page. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| output.total | Integer | The total number of fine-tuning jobs. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| output.jobs | Array | The details of multiple fine-tuning jobs.
Click here to view the fine-tuning job details object
|
Query fine-tuning job logs
Queries the training logs of a specified fine-tuning job.
Endpoint
Request example
Request parameters
Field | Type | Parameter passing | Required | Description |
|---|---|---|---|---|
job_id | String | Url Path | Yes | The ID of the fine-tuning job for which to print logs. You can obtain this ID by calling the create training job or list training jobs operation. |
offset | Number | Query | No | Skips the first |
line | Number | Query | No | Reads |
Response example
Response parameters
Parameter Name | Type | Description |
|---|---|---|
request_id | String | The ID of the request. |
output | Object | The details returned for the query. |
output.total | Integer | The total number of log lines. |
output.logs | Array | The output logs. |
Error responses
Response example
Response parameters
Field | Type | Description | Example value |
|---|---|---|---|
code | String | The error code. | NotFound |
request_id | String | The unique system code of the request. | 6332fb02-3111-43f0-bf79-f9e8c5ffa7f9 |
message | String | The error message. | Not Found! |
HTTP status code | Error code | Sample error message | Meaning | Solution |
|---|---|---|---|---|
400 | InvalidParameter | Missing training files | A parameter is invalid. For example, a parameter is missing or has an incorrect format. | Correct your parameters based on the error message. |
400 | UnsupportedOperation | The fine-tune job can not be canceled because it is succeeded or failed | The operation cannot be performed on the resource in its current state. | Perform the operation after the resource enters an operable state. |
400 | UnsupportedOperation | The fine-tune job can not be deleted because it is succeeded,failed or canceled | The operation cannot be performed on the resource in its current state. | Perform the operation after the resource enters an operable state. |
404 | NotFound | Not found! | The resource to query/operate does not exist. | Check whether the resource ID to query/operate is incorrect. |
409 | Conflict | Model instance xxxxx already exists, please specify a suffix | A deployment instance with the deployed_model name xxxxx already exists. You must specify a suffix to distinguish it. | Specify a unique suffix for the deployment. |
429 | Throttling |
| The resource creation triggered a platform limit. |
|
500 | InternalError | Internal server error! | An internal error occurred. | Record the request_id and contact Alibaba Cloud engineers by submitting a ticket for troubleshooting. |