查询训练任务Pod事件
更新时间:2025-05-23
描述
获取任务某个Pod的系统事件
请求结构
Bash
1GET /api/v1/aijobs/{jobId}/pods/{podName}/events
2Host:aihc.bj.baidubce.com
3Authorization:authorization string
4ContentType: application/json
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数名称 | 类型 | 是否必须 | 参数位置 | 说明 |
---|---|---|---|---|
jobId | String | 是 | Path 参数 | 训练任务ID |
podName | String | 是 | Path 参数 | 训练任务节点名称 |
jobFramework | String | 是 | Query 参数 | 训练任务框架类型,当前支持 "PyTorchJob" 和 "MPIJob" |
resourcePoolId | String | 是 | Query 参数 | 标识资源池的唯一标识符 |
startTime | String | 否 | Query 参数 | 任务pod事件的起始时间,默认为 Pod 创建时间 |
endTime | String | 否 | Query 参数 | 任务pod事件的结束时间,默认为 now |
返回头域
除公共头域,无其它特殊头域。
返回参数
参数名称 | 类型 | 说明 |
---|---|---|
requestId | String | 请求ID |
result | PodEventResult | 成功请求时的返回结果 |
返回示例
JSON
1{
2 "events": [
3 {
4 "reason": "Started",
5 "message": "Started container ftagent",
6 "firstTimestamp": "2024-07-16 02:36:10 +0000 UTC",
7 "lastTimestamp": "2024-07-16 02:36:10 +0000 UTC",
8 "count": 1,
9 "type": "Normal"
10 },
11 {
12 "reason": "Pulled",
13 "message": "Successfully pulled image \"registry.baidubce.com/cce-plugin-pro/ftagent:v1.6.16\" in 83.42021ms",
14 "firstTimestamp": "2024-07-16 02:36:10 +0000 UTC",
15 "lastTimestamp": "2024-07-16 02:36:10 +0000 UTC",
16 "count": 1,
17 "type": "Normal"
18 },
19 {
20 "reason": "Started",
21 "message": "Started container pytorch",
22 "firstTimestamp": "2024-07-16 02:36:10 +0000 UTC",
23 "lastTimestamp": "2024-07-16 02:36:10 +0000 UTC",
24 "count": 1,
25 "type": "Normal"
26 },
27 {
28 "reason": "Created",
29 "message": "Created container ftagent",
30 "firstTimestamp": "2024-07-16 02:36:10 +0000 UTC",
31 "lastTimestamp": "2024-07-16 02:36:10 +0000 UTC",
32 "count": 1,
33 "type": "Normal"
34 },
35 {
36 "reason": "Pulling",
37 "message": "Pulling image \"registry.baidubce.com/cce-plugin-pro/ftagent:v1.6.16\"",
38 "firstTimestamp": "2024-07-16 02:36:10 +0000 UTC",
39 "lastTimestamp": "2024-07-16 02:36:10 +0000 UTC",
40 "count": 1,
41 "type": "Normal"
42 },
43 {
44 "reason": "Created",
45 "message": "Created container pytorch",
46 "firstTimestamp": "2024-07-16 02:36:08 +0000 UTC",
47 "lastTimestamp": "2024-07-16 02:36:08 +0000 UTC",
48 "count": 1,
49 "type": "Normal"
50 },
51 {
52 "reason": "Pulled",
53 "message": "Successfully pulled image \"registry.baidubce.com/aihc-aiak/aiak-megatron:ubuntu20.04-cu11.8-torch1.14.0-py38_v1.2.7.12_release\" in 301.668397ms",
54 "firstTimestamp": "2024-07-16 02:36:08 +0000 UTC",
55 "lastTimestamp": "2024-07-16 02:36:08 +0000 UTC",
56 "count": 1,
57 "type": "Normal"
58 },
59 {
60 "reason": "Pulling",
61 "message": "Pulling image \"registry.baidubce.com/aihc-aiak/aiak-megatron:ubuntu20.04-cu11.8-torch1.14.0-py38_v1.2.7.12_release\"",
62 "firstTimestamp": "2024-07-16 02:36:08 +0000 UTC",
63 "lastTimestamp": "2024-07-16 02:36:08 +0000 UTC",
64 "count": 1,
65 "type": "Normal"
66 },
67 {
68 "reason": "Scheduled",
69 "message": "Successfully assigned default/test-api-llama2-7b-4-master-0 to 192.168.12.179",
70 "firstTimestamp": "2024-07-16 02:36:07 +0000 UTC",
71 "lastTimestamp": "2024-07-16 02:36:07 +0000 UTC",
72 "count": 1,
73 "type": "Normal"
74 }
75 ],
76 "total": 9
77}