pcm-coordinator/api/desc/schedule/pcm-schedule.api

66 lines
1.6 KiB
Plaintext

syntax = "v1"
info(
title: "schedule"
desc: "调度服务"
author: "tzwang"
email: "tzwang@qq.com"
)
type (
ScheduleReq {
AiOption *AiOption `json:"aiOption,optional"`
}
ScheduleResp {
Results []*ScheduleResult `json:"results"`
}
ScheduleResult {
ClusterId string `json:"clusterId"`
TaskId string `json:"taskId"`
Replica int32 `json:"replica"`
Msg string `json:"msg"`
}
AiOption {
TaskName string `json:"taskName"`
AiClusterId string `json:"aiClusterId,optional"`
ResourceType string `json:"resourceType"`
Tops float64 `json:"Tops,optional"`
TaskType string `json:"taskType"`
Datasets string `json:"datasets"`
Algorithm string `json:"algorithm"`
Strategy string `json:"strategy"`
StaticWeightMap map[string]int32 `json:"staticWeightMap,optional"`
Params []string `json:"params,optional"`
Envs []string `json:"envs,optional"`
Cmd string `json:"cmd,optional"`
}
AiResourceTypesResp {
ResourceTypes []string `json:"resourceTypes"`
}
AiTaskTypesResp {
TaskTypes []string `json:"taskTypes"`
}
AiDatasetsResp {
Datasets []string `json:"datasets"`
}
AiStrategyResp {
Strategies []string `json:"strategies"`
}
AiAlgorithmsReq {
ResourceType string `path:"resourceType"`
TaskType string `path:"taskType"`
Dataset string `path:"dataset"`
}
AiAlgorithmsResp {
Algorithms []string `json:"algorithms"`
}
)