updated getJobLog api logic
Former-commit-id: ff312781e1ec873ab7a6637cead3f466809cd001
This commit is contained in:
parent
1281f6d61b
commit
f3ce064dae
|
@ -923,7 +923,7 @@ service pcm {
|
|||
get /schedule/ai/getAlgorithms/:adapterId/:resourceType/:taskType/:dataset (AiAlgorithmsReq) returns (AiAlgorithmsResp)
|
||||
|
||||
@handler ScheduleGetAiJobLogLogHandler
|
||||
get /schedule/ai/getJobLog/:taskId/:instanceNum (AiJobLogReq) returns (AiJobLogResp)
|
||||
get /schedule/ai/getJobLog/:adapterId/:taskId/:instanceNum (AiJobLogReq) returns (AiJobLogResp)
|
||||
|
||||
@handler ScheduleSubmitHandler
|
||||
post /schedule/submit (ScheduleReq) returns (ScheduleResp)
|
||||
|
|
|
@ -72,6 +72,8 @@ type (
|
|||
}
|
||||
|
||||
AiJobLogReq {
|
||||
AdapterId string `path:"adapterId"`
|
||||
ClusterId string `path:"clusterId"`
|
||||
TaskId string `path:"taskId"`
|
||||
instanceNum string `path:"instanceNum"`
|
||||
}
|
||||
|
|
|
@ -1147,7 +1147,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
|||
},
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
Path: "/schedule/ai/getJobLog/:taskId/:instanceNum",
|
||||
Path: "/schedule/ai/getJobLog/:adapterId/:taskId/:instanceNum",
|
||||
Handler: schedule.ScheduleGetAiJobLogLogHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
|
|
|
@ -24,7 +24,13 @@ func NewScheduleGetAiJobLogLogLogic(ctx context.Context, svcCtx *svc.ServiceCont
|
|||
}
|
||||
|
||||
func (l *ScheduleGetAiJobLogLogLogic) ScheduleGetAiJobLogLog(req *types.AiJobLogReq) (resp *types.AiJobLogResp, err error) {
|
||||
// todo: add your logic here and delete this line
|
||||
resp = &types.AiJobLogResp{}
|
||||
|
||||
return
|
||||
log, err := l.svcCtx.Scheduler.AiService.AiCollectorAdapterMap[req.AdapterId][req.ClusterId].GetTrainingTaskLog(l.ctx, req.TaskId, req.InstanceNum)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
resp.Log = log
|
||||
return resp, nil
|
||||
}
|
||||
|
|
|
@ -5536,6 +5536,8 @@ type AiAlgorithmsResp struct {
|
|||
}
|
||||
|
||||
type AiJobLogReq struct {
|
||||
AdapterId string `path:"adapterId"`
|
||||
ClusterId string `path:"clusterId"`
|
||||
TaskId string `path:"taskId"`
|
||||
InstanceNum string `path:"instanceNum"`
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue