All Products
Search
Document Center

Alibaba Cloud Model Studio:Query fine-tuning logs

Last Updated:Jun 06, 2026

Retrieves the training logs for a specified model fine-tuning job.

Get fine-tuning job logs

In Windows CMD, replace ${DASHSCOPE_API_KEY} with %DASHSCOPE_API_KEY%. In PowerShell, replace it with $env:DASHSCOPE_API_KEY.
curl --location --request GET "https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes/<your-fine-tuning-job-id>/logs?offset=10&line=10" \
      --header "Authorization: Bearer ${DASHSCOPE_API_KEY}" \
      --header 'Content-Type: application/json' 

Input parameters

Parameter

Type

Location

Required

Description

job_id

String

Path

Yes

The fine-tuning job ID. You can obtain this ID by calling the Create training job or List training jobs API.

offset

Number

Query

No

Skips the first offset lines of output and starts reading from line offset+1. This value cannot exceed the total number of existing output lines. If the value is exceeded, no output is returned. The default value is 0.

line

Number

Query

No

Reads line lines of output starting from line offset+1 (inclusive). If fewer than line lines are available, all available lines are returned. The default value is 100 and the maximum value is 1000.

Response example

{
          "request_id": "ce49b45d-fe46-474e-9e1b-3e7427ffdf5a",
          "output": {
              "total": 20,
              "logs": [
                  "{'train_runtime': 216.3999, 'train_samples_per_second': 2.066, 'train_steps_per_second': 0.014, 'train_loss': 0.9122632344563802, 'epoch': 0.8571428571428571}",
                  " Actual number of consumed tokens is 279808!",
                  " Uploaded checkpoint!",
                  " Fine-tune succeeded!",
                  " use checkpoint-3 as final checkpoint",
                  "2024-10-29 17:03:47,719 - INFO - transfer for inference succeeded, start to deliver it for inference",
                  "2024-10-29 17:09:43,322 - INFO - start to save checkpoint",
                  "2024-10-29 17:11:24,689 - INFO - finetune-job succeeded",
                  "2024-10-29 17:11:25,130 - INFO - training usage 279808",
                  "2024-10-29 17:11:25,175 - INFO - ##FT_COMPLETE##"
              ]
          }
      }

Response parameters

Parameter

Type

Description

request_id

String

The request ID.

output

Object

The object containing the log data.

output.total

Integer

The total number of log lines available for the fine-tuning job.

output.logs

Array

An array of strings, where each string is a log line.

Error codes

This table describes the errors returned when a request fails.

Field

Type

Description

Example

code

String

The error code.

NotFound

request_id

String

The unique ID for the request.

6332fb02-3111-43f0-bf79-f9e8c5ffa7f9

message

String

A human-readable description of the error.

Not Found!

The following is an example of an error response.

{
        "code": "NotFound",
        "request_id": "BE213CDD-8A5C-59EE-9A67-055EAB0CB59B",
        "message": "Not Found!"
      }

The following table lists common error codes.

HTTP status code

Error code

Example message

Description

Solution

400

InvalidParameter

Missing training files

An input parameter is invalid, either because it is missing or incorrectly formatted.

Check the error message and correct the specified parameter.

400

UnsupportedOperation

The fine-tuning job cannot be deleted because it has succeeded, failed, or been canceled.

The operation cannot be performed on the resource in its current state.

Wait for the resource to enter a state that permits this operation.

404

NotFound

Not found!

The requested resource does not exist.

Verify that the resource ID is correct.

409

Conflict

Model instance xxxxx already exists, please specify a suffix

A deployment instance with the specified name already exists. You must provide a suffix to create a unique name.

Specify a unique suffix for the deployment.

429

Throttling

  • Too many fine-tuning jobs are running. Please retry later.

  • Only 20 running or succeeded fine-tuning jobs are allowed per user.

The request was rejected due to platform rate limits.

  • Delete unused models.

500

InternalError

Internal server error!

An internal error occurred.

Record the request ID. To troubleshoot, submit a ticket to Alibaba Cloud support.