| @@ -14,6 +14,18 @@ type AiCollector interface { | |||||
| UploadAlgorithmCode(ctx context.Context, resourceType string, card string, taskType string, dataset string, algorithm string, code string) error | UploadAlgorithmCode(ctx context.Context, resourceType string, card string, taskType string, dataset string, algorithm string, code string) error | ||||
| GetComputeCards(ctx context.Context) ([]string, error) | GetComputeCards(ctx context.Context) ([]string, error) | ||||
| GetUserBalance(ctx context.Context) (float64, 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 { | type ResourceStats struct { | ||||
| @@ -850,3 +850,7 @@ func (m *ModelArtsLink) CheckImageExist(ctx context.Context, option *option.Infe | |||||
| } | } | ||||
| return errors.New("failed to find Image ") | return errors.New("failed to find Image ") | ||||
| } | } | ||||
| func (m *ModelArtsLink) GetResourceUsage(ctx context.Context) (*collector.ResourceUsage, error) { | |||||
| return nil, nil | |||||
| } | |||||
| @@ -1278,3 +1278,7 @@ func (o *OctopusLink) CheckModelExistence(ctx context.Context, name string, mtyp | |||||
| return true | return true | ||||
| } | } | ||||
| func (o *OctopusLink) GetResourceUsage(ctx context.Context) (*collector.ResourceUsage, error) { | |||||
| return nil, nil | |||||
| } | |||||
| @@ -0,0 +1 @@ | |||||
| package storeLink | |||||
| @@ -999,3 +999,7 @@ func (s *ShuguangAi) CheckModelExistence(ctx context.Context, name string, mtype | |||||
| return resp.Data.Exist | return resp.Data.Exist | ||||
| } | } | ||||
| func (s *ShuguangAi) GetResourceUsage(ctx context.Context) (*collector.ResourceUsage, error) { | |||||
| return nil, nil | |||||
| } | |||||