fix: Complete the modelarts GetResourceStats of ai

Former-commit-id: b23d85fa84fa5ec5583f4abc304ec65c72560e83
This commit is contained in:
qiwang 2024-07-29 16:17:24 +08:00
parent bb2b8263a8
commit 4ed1e829bb
2 changed files with 6 additions and 4 deletions

View File

@ -201,10 +201,11 @@ func (m *ModelArtsLink) GetResourceStats(ctx context.Context) (*collector.Resour
num32, _ := strconv.Atoi(resp1.Items[0].Spec.Npu.Size)
var cards []*collector.Card
card := &collector.Card{
Platform: MODELARTS,
Type: CARD,
Name: Npu,
CardNum: int32(num32),
Platform: MODELARTS,
Type: CARD,
Name: Npu,
CardNum: int32(num32),
TOpsAtFp16: float64(num32 * 320),
}
cards = append(cards, card)
resourceStats.CardsAvail = cards

View File

@ -28,4 +28,5 @@ const (
WaitStart = "WaitStart"
Pending = "Pending"
Stopped = "Stopped"
Deploying = "Deploying"
)