|
|
|
@@ -896,8 +896,12 @@ func (m *ModelArtsLink) GetInferDeployInstance(ctx context.Context, id string) ( |
|
|
|
ins.ClusterName = m.platform |
|
|
|
ins.CreatedTime = string(resp.StartTime) |
|
|
|
ins.ClusterType = TYPE_MODELARTS |
|
|
|
ins.ModelName = resp.Config[0].ModelName |
|
|
|
ins.ModelType = m.ModelType |
|
|
|
if resp.Config != nil { |
|
|
|
ins.ModelName = resp.Config[0].ModelName |
|
|
|
} |
|
|
|
if m.ModelType != "" { |
|
|
|
ins.ModelType = m.ModelType |
|
|
|
} |
|
|
|
ins.InferUrl = resp.AccessAddress |
|
|
|
return ins, nil |
|
|
|
} |
|
|
|
@@ -1071,12 +1075,14 @@ func (m *ModelArtsLink) GetResourceSpecs(ctx context.Context) (*collector.Resour |
|
|
|
wg.Done() |
|
|
|
} |
|
|
|
if TrainLists.Status.Phase == "Running" { |
|
|
|
CoreNum += TrainLists.Spec.Resource.FlavorDetail.FlavorInfo.Cpu.CoreNum |
|
|
|
NpuNum += TrainLists.Spec.Resource.FlavorDetail.FlavorInfo.Npu.UnitNum |
|
|
|
MemoryNum += TrainLists.Spec.Resource.FlavorDetail.FlavorInfo.Memory.Size |
|
|
|
VMemoryNum, _ = strconv.ParseInt(TrainLists.Spec.Resource.FlavorDetail.FlavorInfo.Npu.Memory, 10, 64) |
|
|
|
VMemoryNum += VMemoryNum |
|
|
|
RunningTaskNum += 1 |
|
|
|
if TrainLists.Spec.Resource.FlavorDetail != nil { |
|
|
|
CoreNum += TrainLists.Spec.Resource.FlavorDetail.FlavorInfo.Cpu.CoreNum |
|
|
|
NpuNum += TrainLists.Spec.Resource.FlavorDetail.FlavorInfo.Npu.UnitNum |
|
|
|
MemoryNum += TrainLists.Spec.Resource.FlavorDetail.FlavorInfo.Memory.Size |
|
|
|
VMemoryNum, _ = strconv.ParseInt(TrainLists.Spec.Resource.FlavorDetail.FlavorInfo.Npu.Memory, 10, 64) |
|
|
|
VMemoryNum += VMemoryNum |
|
|
|
RunningTaskNum += 1 |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
MoUsage.CpuAvailable = cpusum - int64(CoreNum) |
|
|
|
|