Merge pull request 'update modelarts' (#223) from master-wq into master
Former-commit-id: 8ec84383c3ecb14a6325fb4a568981334c27fc0c
This commit is contained in:
commit
7cae5b03ae
|
@ -172,12 +172,12 @@ type VmInfo struct {
|
||||||
MinCount int64 `json:"minCount,omitempty"`
|
MinCount int64 `json:"minCount,omitempty"`
|
||||||
Uuid string `json:"uuid,omitempty"`
|
Uuid string `json:"uuid,omitempty"`
|
||||||
StartTime string `json:"startTime,omitempty"`
|
StartTime string `json:"startTime,omitempty"`
|
||||||
RunningTime string `json:"runningTime,omitempty"`
|
//RunningTime string `json:"runningTime,omitempty"`
|
||||||
Result string `json:"result,omitempty"`
|
//Result string `json:"result,omitempty"`
|
||||||
DeletedAt string `json:"deletedAt,omitempty"`
|
//DeletedAt string `json:"deletedAt,omitempty"`
|
||||||
VmName string `json:"vmName,omitempty"`
|
VmName string `json:"vmName,omitempty"`
|
||||||
Replicas int64 `json:"replicas,omitempty"`
|
Replicas int64 `json:"replicas,omitempty"`
|
||||||
ServerId string `json:"serverId,omitempty"`
|
ServerId string `json:"serverId,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ResourceStats struct {
|
type ResourceStats struct {
|
||||||
|
|
|
@ -1149,7 +1149,7 @@ type (
|
||||||
ProjectId string `json:"projectId" copier:"ProjectId"`
|
ProjectId string `json:"projectId" copier:"ProjectId"`
|
||||||
Param ListNotebookParam `json:"param,optional" copier:"Param"`
|
Param ListNotebookParam `json:"param,optional" copier:"Param"`
|
||||||
/****************智算类型 ModelartsType parmas ********************/
|
/****************智算类型 ModelartsType parmas ********************/
|
||||||
ModelArtsType string `json:"modelArtsType,optional"`
|
Platform string `json:"platform,optional"`
|
||||||
}
|
}
|
||||||
ListNotebookResp {
|
ListNotebookResp {
|
||||||
Current int32 `json:"current,omitempty" copier:"Current"`
|
Current int32 `json:"current,omitempty" copier:"Current"`
|
||||||
|
@ -1205,7 +1205,7 @@ type (
|
||||||
ProjectId string `json:"projectId" copier:"ProjectId"`
|
ProjectId string `json:"projectId" copier:"ProjectId"`
|
||||||
Param StartNotebookParam `json:"param" copier:"Param"`
|
Param StartNotebookParam `json:"param" copier:"Param"`
|
||||||
/****************智算类型 ModelartsType parmas ********************/
|
/****************智算类型 ModelartsType parmas ********************/
|
||||||
ModelArtsType string `json:"modelArtsType,optional"`
|
Platform string `json:"platform,optional"`
|
||||||
}
|
}
|
||||||
StartNotebookResp {
|
StartNotebookResp {
|
||||||
NotebookResp NotebookResp `json:"notebookResp" copier:"NotebookResp"`
|
NotebookResp NotebookResp `json:"notebookResp" copier:"NotebookResp"`
|
||||||
|
|
|
@ -24,16 +24,17 @@ THRpcConf:
|
||||||
|
|
||||||
#rpc
|
#rpc
|
||||||
ModelArtsRpcConf:
|
ModelArtsRpcConf:
|
||||||
target: nacos://10.206.0.12:8848/pcm.modelarts.rpc?timeout=30s&namespaceid=test&groupname=DEFAULT_GROUP&appName=pcm.core.api
|
# target: nacos://10.206.0.12:8848/pcm.modelarts.rpc?timeout=30s&namespaceid=test&groupname=DEFAULT_GROUP&appName=pcm.core.api
|
||||||
# Endpoints:
|
Endpoints:
|
||||||
# - 127.0.0.1:8888
|
- 127.0.0.1:2002
|
||||||
NonBlock: true
|
NonBlock: true
|
||||||
|
Timeout: 20000
|
||||||
|
|
||||||
#rpc
|
#rpc
|
||||||
ModelArtsImgRpcConf:
|
ModelArtsImgRpcConf:
|
||||||
target: nacos://10.206.0.12:8848/pcm.modelarts.rpc?timeout=30s&namespaceid=test&groupname=DEFAULT_GROUP&appName=pcm.core.api
|
target: nacos://10.206.0.12:8848/pcm.modelarts.rpc?timeout=30s&namespaceid=test&groupname=DEFAULT_GROUP&appName=pcm.core.api
|
||||||
# Endpoints:
|
# Endpoints:
|
||||||
# - 127.0.0.1:8888
|
# - 127.0.0.1:2002
|
||||||
NonBlock: true
|
NonBlock: true
|
||||||
|
|
||||||
#rpc
|
#rpc
|
||||||
|
|
|
@ -52,11 +52,6 @@ func (l *CommitVmTaskLogic) CommitVmTask(req *types.CommitVmTaskReq) (resp *type
|
||||||
}()
|
}()
|
||||||
//TODO adapter
|
//TODO adapter
|
||||||
adapterId, _ := strconv.ParseUint(req.AdapterIds[0], 10, 64)
|
adapterId, _ := strconv.ParseUint(req.AdapterIds[0], 10, 64)
|
||||||
/*var clusters []*models.VmModel
|
|
||||||
err2 := l.svcCtx.DbEngin.Raw("SELECT * FROM `t_cluster` where adapter_id in ? and id in ?", adapterId, req.ClusterIds).Scan(&clusters).Error
|
|
||||||
if err2 != nil {
|
|
||||||
logx.Errorf("CommitGeneralTask() => sql execution error: %v", err)
|
|
||||||
}*/
|
|
||||||
taskVm := models.TaskVm{}
|
taskVm := models.TaskVm{}
|
||||||
//TODO 执行策略返回集群跟 Replica
|
//TODO 执行策略返回集群跟 Replica
|
||||||
opt := &option.VmOption{}
|
opt := &option.VmOption{}
|
||||||
|
@ -91,7 +86,7 @@ func (l *CommitVmTaskLogic) CommitVmTask(req *types.CommitVmTaskReq) (resp *type
|
||||||
Name: req.Name,
|
Name: req.Name,
|
||||||
CommitTime: time.Now(),
|
CommitTime: time.Now(),
|
||||||
Description: "vm task",
|
Description: "vm task",
|
||||||
AdapterTypeDict: 3,
|
AdapterTypeDict: 0,
|
||||||
SynergyStatus: synergyStatus,
|
SynergyStatus: synergyStatus,
|
||||||
Strategy: strategy,
|
Strategy: strategy,
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,8 +59,8 @@ func (l *PushTaskInfoLogic) PushTaskInfo(req *clientCore.PushTaskInfoReq) (*clie
|
||||||
}
|
}
|
||||||
case 02:
|
case 02:
|
||||||
for _, vmInfo := range req.VmInfoList {
|
for _, vmInfo := range req.VmInfoList {
|
||||||
l.svcCtx.DbEngin.Exec("update task_vm set status = ?,start_time = ? where participant_id = ? and task_id = ? and name = ?",
|
l.svcCtx.DbEngin.Exec("update task_vm set status = ?,start_time = ? where cluster_id = ? and task_id = ? and name = ?",
|
||||||
vmInfo.Status, vmInfo.StartTime, req.AdapterId, vmInfo.TaskId, vmInfo.Name)
|
vmInfo.Status, vmInfo.StartTime, vmInfo.ClusterId, vmInfo.TaskId, vmInfo.Name)
|
||||||
noticeInfo := clientCore.NoticeInfo{
|
noticeInfo := clientCore.NoticeInfo{
|
||||||
TaskId: vmInfo.TaskId,
|
TaskId: vmInfo.TaskId,
|
||||||
AdapterId: vmInfo.AdapterId,
|
AdapterId: vmInfo.AdapterId,
|
||||||
|
|
|
@ -2329,9 +2329,9 @@ type DeleteDataSetResp struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type ListNotebookReq struct {
|
type ListNotebookReq struct {
|
||||||
ProjectId string `json:"projectId" copier:"ProjectId"`
|
ProjectId string `json:"projectId" copier:"ProjectId"`
|
||||||
Param ListNotebookParam `json:"param,optional" copier:"Param"`
|
Param ListNotebookParam `json:"param,optional" copier:"Param"`
|
||||||
ModelArtsType string `json:"modelArtsType,optional"`
|
Platform string `json:"platform,optional"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ListNotebookResp struct {
|
type ListNotebookResp struct {
|
||||||
|
@ -2387,10 +2387,10 @@ type CreateNotebookParam struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type StartNotebookReq struct {
|
type StartNotebookReq struct {
|
||||||
Id string `json:"id" copier:"Id"`
|
Id string `json:"id" copier:"Id"`
|
||||||
ProjectId string `json:"projectId" copier:"ProjectId"`
|
ProjectId string `json:"projectId" copier:"ProjectId"`
|
||||||
Param StartNotebookParam `json:"param" copier:"Param"`
|
Param StartNotebookParam `json:"param" copier:"Param"`
|
||||||
ModelArtsType string `json:"modelArtsType,optional"`
|
Platform string `json:"platform,optional"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type StartNotebookResp struct {
|
type StartNotebookResp struct {
|
||||||
|
|
Loading…
Reference in New Issue