
# 查询精调训练任务产物列表 - ListFtArtifacts
#### 功能介绍
查询精调训练任务产物列表。
#### 调试
您可以在[API Explorer](https://console.huaweicloud.com/apiexplorer/#/openapi/ModelArts/doc?api=ListFtArtifacts)中调试该接口，支持自动认证鉴权。API Explorer可以自动生成SDK代码示例，并提供SDK代码示例调试功能。
#### 授权信息
账号具备所有API的调用权限，如果使用账号下的IAM用户调用当前API，该IAM用户需具备调用API所需的权限。
- 如果使用角色与策略授权，具体权限要求请参见[权限和授权项](https://support.huaweicloud.com/api-modelarts/modelarts_03_0138.html)。
- 如果使用身份策略授权，需具备如下身份策略权限。
  
  | 授权项                               | 访问级别 | 资源类型（\*为必须） | 条件键                   | 别名 | 依赖的授权项 |
  |:---|:---|:---|:---|:---|:---|
  | modelarts:trainJob:getFtArtifacts | Read | trainJob \* | g:EnterpriseProjectId | -  | -      |
     
  
 
#### URI
GET /v2/{project_id}/training-jobs/{training_job_id}/ft-artifacts
表1路径参数 
| 参数              | 是否必选 | 参数类型   | 描述                                                                                                                                                                                                                                                                                                                                                                                                                     |
|:---|:---|:---|:---|
| project_id      | 是    | String | **参数解释** ：用户项目ID。获取方法请参见[获取项目ID和名称](https://support.huaweicloud.com/api-modelarts/modelarts_03_0147.html)。 **约束限制**：不涉及。 **取值范围**：1 - 64字符，字母、数字和中划线。 **默认取值**：不涉及。             |
| training_job_id | 是    | String | **参数解释** ：训练作业ID。获取方法请参见[查询训练作业列表](https://support.huaweicloud.com/api-modelarts/ListTrainingJobs.html#ZH-CN_TOPIC_0000002711554840)。 **约束限制**：不涉及。 **取值范围**：不涉及。 **默认取值**：不涉及。 |
   
表2Query参数 
| 参数                       | 是否必选 | 参数类型    | 描述                                                                                                                                                                                                                                                                                                  |
|:---|:---|:---|:---|
| steps                    | 否    | Integer | 步数。                                                                                                                                                                                                                                                                                                 |
| epoch                    | 否    | Integer | 轮数。                                                                                                                                                                                                                                                                                                 |
| loss                     | 否    | Double  | loss值。                                                                                                                                                                                                                                                                                              |
| status                   | 否    | String  | 状态。                                                                                                                                                                                                                                                                                                 |
| order_by_create_time_asc | 否    | Boolean | 是否按照创建时间排序。                                                                                                                                                                                                                                                                                         |
| limit                    | 否    | Integer | **参数解释**：返回的数据条目数。 **约束限制**：不涉及。 **取值范围**：不涉及。 **默认取值**：不涉及。 |
| offset                   | 否    | Integer | **参数解释**：数据条目偏移量。 **约束限制**：不涉及。 **取值范围**：不涉及。 **默认取值**：不涉及。  |
   
#### 请求参数
无
#### 响应参数
**状态码：200**
表3响应Body参数 
| 参数            | 参数类型                                                                                                               | 描述           |
|:---|:---|:---|
| total         | Integer                                                                                                            | 本次查询到的数据条目数。 |
| artifact_info | Array of [ArtifactInfo] objects | 产物信息。        |
   
 表4ArtifactInfo 
| 参数                  | 参数类型                                                                                                                         | 描述                                 |
|:---|:---|:---|
| artifact_type       | String                                                                                                                       | 产物类型，可选值：final(最终产物)、middle(中间产物)。 |
| is_best             | Boolean                                                                                                                      | 是否最优。                              |
| artifact_id         | String                                                                                                                       | 产物id。最终产物为模型ID，中间产物为断点ID。          |
| continue_train_nums | Integer                                                                                                                      | 续训任务数量。                            |
| asset_id            | String                                                                                                                       | 产物发布成功后的资产id。                      |
| asset_name          | String                                                                                                                       | 产物发布成功后的资产名称。                      |
| status              | String                                                                                                                       | 发布状态。                              |
| epoch               | Integer                                                                                                                      | 轮数。                                |
| steps               | Integer                                                                                                                      | 步数。                                |
| loss                | Double                                                                                                                       | loss值                              |
| create_time         | String                                                                                                                       | 创建时间。                              |
| publish_error_msg   | String                                                                                                                       | 产物发布失败的错误信息。                       |
| task_infos          | Array of [ContinueTrainTask] objects | 相关任务信息                             |
   
 表5ContinueTrainTask 
| 参数                  | 参数类型    | 描述                                                                                                 |
|:---|:---|:---|
| checkpoint_id       | String  | 中间产物id。                                                                                            |
| continue_task_id    | String  | 续训任务id。                                                                                            |
| continue_task_name  | String  | 续训任务名称。                                                                                            |
| continue_train_type | String  | 续训训练类型。                                                                                            |
| skipped_steps       | Integer | 跳过步数，0表示不跳过。                                                                                       |
| restore_training    | Integer | 是否续训任务。 0: 非续训, 1:续训。 |
| create_time         | String  | 创建时间。                                                                                              |
| checkpoint_config   | String  | 中间产物配置信息。                                                                                          |
   
**状态码：400**
表6响应Body参数 
| 参数             | 参数类型   | 描述      |
|:---|:---|:---|
| error_msg      | String | 错误信息。   |
| error_code     | String | 错误码。    |
| error_solution | String | 错误解决建议。 |
   
#### 请求示例
如下以查询uuid为3faf5c03-aaa1-4cbe-879d-24b05d997347的训练作业为例。
```
GET https://{endpoint}/v2/{project_id}/training-jobs/3faf5c03-aaa1-4cbe-879d-24b05d997347/ft-artifacts
```
#### 响应示例
**状态码：200**
调用成功
```
{
  "total" : 1,
  "artifact_info" : [ {
    "artifact_type" : "final",
    "is_best" : true,
    "artifact_id" : "28f61af50fc9452aa0ed5ea25c3cc3d3",
    "continue_train_nums" : 1,
    "asset_id" : "e7a05012-6b97-44ef-a3a4-ebc2eed1faf0",
    "asset_name" : "Pangu-NLP-N2-32K-SFT-20250401220401",
    "status" : "published",
    "epoch" : 3,
    "steps" : 10000,
    "loss" : 0.235,
    "create_time" : "2026-08-28T10:30:00Z",
    "publish_error_msg" : "",
    "task_infos" : [ {
      "checkpoint_id" : "checkpoint-10000",
      "continue_task_id" : "3faf5c03-aaa1-4cbe-879d-24b05d997347",
      "continue_task_name" : "pangu-sft-continue-job",
      "continue_train_type" : "continue_train",
      "skipped_steps" : 0,
      "restore_training" : 1,
      "create_time" : "2026-08-28T11:00:00Z",
      "checkpoint_config" : "{\"save_steps\":1000,\"checkpoint_path\":\"/output/checkpoint-10000\"}"
    } ]
  } ]
}
```
**状态码：400**
通用的错误应答消息体格式；如下为id是3f5d6706-7b67-408d-8ba0-ec08048c45ee的训练作业未找到时的返回信息。
```
{
  "error_msg" : "Job not found.",
  "error_code" : "ModelArts.2755",
  "error_solution" : "Check whether the training job in the request is valid."
}
```
#### 状态码
| 状态码 | 描述                                                                     |
|:---|:---|
| 200 | 调用成功                                                                   |
| 400 | 通用的错误应答消息体格式；如下为id是3f5d6706-7b67-408d-8ba0-ec08048c45ee的训练作业未找到时的返回信息。 |
   
#### 错误码
请参见[错误码](https://support.huaweicloud.com/api-modelarts/modelarts_03_0095.html)。
