获取DLC作业RL轨迹流转分析。
接口说明
获取 DLC 作业 RL 轨迹流转分析
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求语法
GET /api/v1/jobs/{JobId}/rltrace/flowanalysis HTTP/1.1
路径参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| JobId |
string |
是 |
作业 ID |
dlc5yfk7eyg95lac |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| StartTime |
string |
否 |
查询窗口起始(UTC RFC3339),缺省 EndTime-7d |
2026-08-04T00:00:00Z |
| EndTime |
string |
否 |
查询窗口截止(UTC RFC3339),缺省 now |
2026-08-07T00:00:00Z |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| JobId |
string |
作业 ID |
dlc-20210126170216-xxxxxxx |
| Found |
boolean |
窗口内是否有轨迹数据 |
true |
| NowMs |
integer |
服务端观察时刻(毫秒,= min(EndTime, now)),在途 idle 计算基准 |
1787475397000 |
| Totals | RLFlowTotals |
总量统计 |
{'Sampled': 0, 'Uids': 0, 'Inflight': 0, 'Trained': 0, 'Trajs': 0, 'Rewarded': 0} |
| Funnel |
array |
漏斗 6 级:traj → dispatch → run → push → selected → trained |
|
| RLFlowFunnelStage |
漏斗层级 |
||
| Sankey | RLFlowSankey |
桑基图 |
|
| Transitions |
array |
8 个阶段耗时(秒)分位统计 |
|
| RLFlowTransition |
转场效果。 当 TransitionMode 为 Random 和 Sequential 时有效。 数量上限 10。 |
||
| Waste | RLFlowWaste |
过采样浪费 |
{'UsefulSec': 0} |
| Turns | RLFlowTurns |
生成轮数分布 |
{'Count': 0, 'Max': None, 'Avg': None, 'P50': None, 'P90': None} |
| Stuck |
array |
在途卡点 Top100(按 IdleSec 降序) |
|
| RLFlowStuckItem |
在途轨迹卡点 |
[] |
|
| InflightByMilestone |
array |
在途轨迹按环节计数(按 Count 降序) |
|
| RLFlowMilestoneCount |
里程碑在途轨迹计数 |
[] |
|
| Steps |
array |
step 生产-消费视图 |
|
| RLFlowStep |
执行步骤。 |
[] |
|
| StepSource |
string |
Steps 的时刻来源:progress 表示取自任务日志的 Step 标记,trace 表示按 trace 里的 global_step 归步,空表示无 step 数据 |
progress |
| MegaStepOffset |
integer |
megatron global_step 相对 FORM_BATCH batch_id 的偏移(0 或 1) |
0 |
| RequestId |
string |
请求 ID |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
示例
正常返回示例
JSON格式
{
"JobId": "dlc-20210126170216-xxxxxxx",
"Found": true,
"NowMs": 1787475397000,
"Totals": {
"Uids": 24,
"Trajs": 96,
"Trained": 96,
"Rewarded": 96,
"Sampled": 96,
"Inflight": 0
},
"Funnel": [
{
"Key": "traj",
"Label": "生成轨迹",
"Count": 96,
"Pct": 100
}
],
"Sankey": {
"Columns": [
{
"Key": "traj",
"Label": "生成轨迹",
"Count": 96
}
],
"Exits": [
{
"From": "DataLoader",
"FromIdx": 0,
"Label": "生成轨迹",
"Count": 96
}
]
},
"Transitions": [
{
"Key": "traj",
"Label": "生成轨迹",
"Count": 96,
"P50": 0.8,
"P90": 5.9,
"P99": 8.6,
"Max": 9.2,
"Avg": 1.9,
"Slowest": [
{
"PromptUid": "321fa56f-e1e5-4eb3-8047-db7a230c9a75",
"SampleIndex": "2",
"Sec": 9.2
}
]
}
],
"Waste": {
"UsefulSec": 183
},
"Turns": {
"Count": 96,
"Avg": 1.9,
"P50": 1,
"P90": 3,
"Max": 5
},
"Stuck": [
{
"PromptUid": "321fa56f-e1e5-4eb3-8047-db7a230c9a75",
"SampleIndex": "2",
"Milestone": "生成中",
"NTurns": 3,
"LastTsMs": 1787293215480,
"IdleSec": 0
}
],
"InflightByMilestone": [
{
"Milestone": "生成中",
"Count": 96
}
],
"Steps": [
{
"Step": 3,
"NSamples": 24,
"NTrajs": 96,
"TFwdStartMs": 1787474487713,
"TOptEndMs": 1787474487713,
"TUpdateMs": 1787474487713,
"ProdStartMs": 1787474487713,
"ProdEndMs": 1787474487713,
"TRolloutStartMs": 1787474487713,
"TRolloutEndMs": 1787474487713,
"TTrainStartMs": 1787474487713,
"TTrainEndMs": 1787474487713,
"RolloutSec": 0,
"GapSec": 0,
"TrainSec": 0,
"BufferWaitP50": 0.8,
"RolloutP50": 0.8,
"IdleSec": 0
}
],
"StepSource": "progress",
"MegaStepOffset": 0,
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidParameter | The specified parameter is not valid. | |
| 500 | InternalServerError | An internal error has occurred. Try again later. | |
| 403 | OperationForbidden | You are not authorized to access the specified job. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。