diff --git a/internal/scheduler/service/collector/collector.go b/internal/scheduler/service/collector/collector.go index 24b5f618..9ea2284e 100644 --- a/internal/scheduler/service/collector/collector.go +++ b/internal/scheduler/service/collector/collector.go @@ -14,6 +14,18 @@ type AiCollector interface { UploadAlgorithmCode(ctx context.Context, resourceType string, card string, taskType string, dataset string, algorithm string, code string) error GetComputeCards(ctx context.Context) ([]string, error) GetUserBalance(ctx context.Context) (float64, error) + GetResourceUsage(ctx context.Context) (*ResourceUsage, error) +} + +type ResourceUsage struct { + ClusterId string + Resources []*Usage +} + +type Usage struct { + Total float64 + Type string + Available float64 } type ResourceStats struct { diff --git a/internal/storeLink/modelarts.go b/internal/storeLink/modelarts.go index 86fedfe1..572c9a99 100644 --- a/internal/storeLink/modelarts.go +++ b/internal/storeLink/modelarts.go @@ -850,3 +850,7 @@ func (m *ModelArtsLink) CheckImageExist(ctx context.Context, option *option.Infe } return errors.New("failed to find Image ") } + +func (m *ModelArtsLink) GetResourceUsage(ctx context.Context) (*collector.ResourceUsage, error) { + return nil, nil +} diff --git a/internal/storeLink/octopus.go b/internal/storeLink/octopus.go index a7702878..e07497c3 100644 --- a/internal/storeLink/octopus.go +++ b/internal/storeLink/octopus.go @@ -1278,3 +1278,7 @@ func (o *OctopusLink) CheckModelExistence(ctx context.Context, name string, mtyp return true } + +func (o *OctopusLink) GetResourceUsage(ctx context.Context) (*collector.ResourceUsage, error) { + return nil, nil +} diff --git a/internal/storeLink/openi.go b/internal/storeLink/openi.go new file mode 100644 index 00000000..8d163d40 --- /dev/null +++ b/internal/storeLink/openi.go @@ -0,0 +1 @@ +package storeLink diff --git a/internal/storeLink/shuguangai.go b/internal/storeLink/shuguangai.go index 2c0ec711..fe428a56 100644 --- a/internal/storeLink/shuguangai.go +++ b/internal/storeLink/shuguangai.go @@ -999,3 +999,7 @@ func (s *ShuguangAi) CheckModelExistence(ctx context.Context, name string, mtype return resp.Data.Exist } + +func (s *ShuguangAi) GetResourceUsage(ctx context.Context) (*collector.ResourceUsage, error) { + return nil, nil +}