Query the details of a specific model fine-tuning task.
Scope
- Applicable regions: The features described in this topic are available only in the China (Beijing) region, and you must use the API Key of this region.
- You have obtained an API Key and configured it in environment variables.
- 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. This is the job_id returned 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 for the fine-tuning job |
output.training_file_ids | Array | A field for compatibility. For new jobs, this parameter always returns an empty array. Use training_datasets instead. |
output.validation_file_ids | Array | A field for compatibility. For new jobs, this parameter always returns 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 | A table of 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 Alibaba Cloud 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 type of the model fine-tuning job. |
output.usage | Integer | The number of tokens (count) consumed by the fine-tuning job. For the billing formula, see Billing instructions. 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. If the value of |
Cancel fine-tuning job
Cancel 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 fine-tuning job
Delete 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. |
List fine-tuning jobs
Query the fine-tuning jobs of the current account by page.
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 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
Query 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 whose logs you want to print. 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 the number of output lines specified by |
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 returned 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 for 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 the parameter 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 because the resource is in a specific state. | Wait for the resource to enter an operable state before performing the operation. |
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 because the resource is in a specific state. | Wait for the resource to enter an operable state before performing the operation. |
404 | NotFound | Not found! | The resource to query or operate on does not exist. | Check whether the ID of the resource to query or operate on 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 triggers 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. |