文档首页/ AI开发平台ModelArts/ API参考/ 训练管理/ 查询超参搜索所有trial的结果
更新时间:2024-10-23 GMT+08:00
分享

查询超参搜索所有trial的结果

功能介绍

查询超参搜索所有trial的结果。

调试

您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。

URI

GET /v2/{project_id}/training-jobs/{training_job_id}/autosearch-trials

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

用户项目ID。获取方法请参见获取项目ID和名称

training_job_id

String

训练作业ID。获取方法请参见查询训练作业列表

project_id

String

用户项目ID。获取方法请参见获取项目ID和名称

training_job_id

String

训练作业ID。获取方法请参见查询训练作业列表

表2 Query参数

参数

是否必选

参数类型

描述

limit

Integer

返回的数据条目数。

offset

Integer

数据条目偏移量。

请求参数

响应参数

状态码: 200

表3 响应Body参数

参数

参数类型

描述

total

Integer

超参搜索所有trial结果的个数。

count

Integer

超参搜索所有trial结果的当前页展示个数。

limit

Integer

超参搜索所有trial结果的当前页展示个数最大值。

offset

Integer

超参搜索所有trial结果的当前页数。

group_by

String

分类。

items

items object

超参搜索列表。

表4 items

参数

参数类型

描述

header

Array of strings

超参搜索所有trial结果的字段信息。

data

Array<Array<String>>

超参搜索所有trial结果的每条数据列表。

请求示例

如以下查询training_job_id为5b60a667-1438-4eb5-9705-85b860e623dc的作业的所有trial的信息。

GET https://endpoint/v2/{project_id}/training-jobs/5b60a667-1438-4eb5-9705-85b860e623dc/autosearch-trials

响应示例

状态码: 200

ok

{
  "total" : 8,
  "count" : 8,
  "limit" : 50,
  "offset" : 0,
  "group_by" : "",
  "items" : {
    "header" : [ "", "done", "pid", "config", "trial_id", "training_iteration", "time_total_s", "worker_index", "reward_attr", "status", "acc", "loss", "best_reward" ],
    "data" : [ [ "0", "True", "314", {
      "batch_size" : 32,
      "learning_rate" : 0.05512301741232006,
      "trial_index" : 0,
      "param/batch_size" : 32,
      "param/learning_rate" : 0.05512301741232006
    }, "ae544174", "2", "19.477163314819336", "", "0.0625", "TERMINATED", "0.0625", "tensor(0.0754, device='cuda:0', requires_grad=True)", "0.0625" ], [ "1", "True", "315", {
      "batch_size" : 32,
      "learning_rate" : 0.0785570955603036,
      "trial_index" : 1,
      "param/batch_size" : 32,
      "param/learning_rate" : 0.0785570955603036
    }, "ae548666", "2", "3.601897954940796", "", "0.0", "TERMINATED", "0.0", "tensor(0.0760, device='cuda:0', requires_grad=True)", "0.0" ], [ "2", "True", "312", {
      "batch_size" : 16,
      "learning_rate" : 0.04015387428829642,
      "trial_index" : 2,
      "param/batch_size" : 16,
      "param/learning_rate" : 0.04015387428829642
    }, "ae54c0ea", "2", "3.5978384017944336", "", "0.1875", "TERMINATED", "0.1875", "tensor(0.1469, device='cuda:0', requires_grad=True)", "0.1875" ], [ "3", "True", "313", {
      "batch_size" : 32,
      "learning_rate" : 0.0340820322164706,
      "trial_index" : 3,
      "param/batch_size" : 32,
      "param/learning_rate" : 0.0340820322164706
    }, "ae5503c0", "2", "3.641200304031372", "", "0.25", "TERMINATED", "0.25", "tensor(0.0716, device='cuda:0', requires_grad=True)", "0.25" ], [ "4", "True", "470", {
      "batch_size" : 32,
      "learning_rate" : 0.03656488928171769,
      "trial_index" : 4,
      "param/batch_size" : 32,
      "param/learning_rate" : 0.03656488928171769
    }, "bef46590", "2", "3.6120550632476807", "", "0.09375", "TERMINATED", "0.09375", "tensor(0.0740, device='cuda:0', requires_grad=True)", "0.09375" ], [ "5", "True", "499", {
      "batch_size" : 32,
      "learning_rate" : 0.008413169003970163,
      "trial_index" : 5,
      "param/batch_size" : 32,
      "param/learning_rate" : 0.008413169003970163
    }, "bef578f4", "2", "3.6379287242889404", "", "0.1875", "TERMINATED", "0.1875", "tensor(0.0723, device='cuda:0', requires_grad=True)", "0.1875" ], [ "6", "True", "528", {
      "batch_size" : 64,
      "learning_rate" : 0.06297447200613912,
      "trial_index" : 6,
      "param/batch_size" : 64,
      "param/learning_rate" : 0.06297447200613912
    }, "bef5c584", "2", "3.711118221282959", "", "0.046875", "TERMINATED", "0.046875", "tensor(0.0381, device='cuda:0', requires_grad=True)", "0.046875" ], [ "7", "True", "557", {
      "batch_size" : 32,
      "learning_rate" : 0.04426479392014276,
      "trial_index" : 7,
      "param/batch_size" : 32,
      "param/learning_rate" : 0.04426479392014276
    }, "bef60684", "2", "3.6971280574798584", "", "0.0625", "TERMINATED", "0.0625", "tensor(0.0778, device='cuda:0', requires_grad=True)", "0.0625" ] ]
  }
}

状态码

状态码

描述

200

ok

错误码

请参见错误码

相关文档