| @@ -4,6 +4,7 @@ import ( | |||
| "bytes" | |||
| "context" | |||
| "encoding/json" | |||
| "errors" | |||
| "gitlink.org.cn/JointCloud/pcm-coordinator/internal/scheduler/schedulers/option" | |||
| "gitlink.org.cn/JointCloud/pcm-coordinator/internal/scheduler/service/collector" | |||
| "gitlink.org.cn/JointCloud/pcm-coordinator/internal/scheduler/service/inference" | |||
| @@ -46,93 +47,75 @@ func NewOpenI(host string, id int64, name string, token string) *OpenI { | |||
| } | |||
| func (o OpenI) Execute(ctx context.Context, option *option.AiOption) (interface{}, error) { | |||
| //TODO implement me | |||
| panic("implement me") | |||
| return nil, errors.New("failed to implement") | |||
| } | |||
| func (o OpenI) GetClusterInferUrl(ctx context.Context, option *option.InferOption) (*inference.ClusterInferUrl, error) { | |||
| //TODO implement me | |||
| panic("implement me") | |||
| return nil, errors.New("failed to implement") | |||
| } | |||
| func (o OpenI) GetInferDeployInstanceList(ctx context.Context) ([]*inference.DeployInstance, error) { | |||
| //TODO implement me | |||
| panic("implement me") | |||
| return nil, errors.New("failed to implement") | |||
| } | |||
| func (o OpenI) StartInferDeployInstance(ctx context.Context, id string) bool { | |||
| //TODO implement me | |||
| panic("implement me") | |||
| return false | |||
| } | |||
| func (o OpenI) StopInferDeployInstance(ctx context.Context, id string) bool { | |||
| //TODO implement me | |||
| panic("implement me") | |||
| return false | |||
| } | |||
| func (o OpenI) GetInferDeployInstance(ctx context.Context, id string) (*inference.DeployInstance, error) { | |||
| //TODO implement me | |||
| panic("implement me") | |||
| return nil, errors.New("failed to implement") | |||
| } | |||
| func (o OpenI) CreateInferDeployInstance(ctx context.Context, option *option.InferOption) (string, error) { | |||
| //TODO implement me | |||
| panic("implement me") | |||
| return "", errors.New("failed to implement") | |||
| } | |||
| func (o OpenI) CheckModelExistence(ctx context.Context, modelName string, modelType string) bool { | |||
| //TODO implement me | |||
| panic("implement me") | |||
| return false | |||
| } | |||
| func (o OpenI) GetImageInferResult(ctx context.Context, url string, file multipart.File, fileName string) (string, error) { | |||
| //TODO implement me | |||
| panic("implement me") | |||
| return "", errors.New("failed to implement") | |||
| } | |||
| func (o OpenI) GetResourceStats(ctx context.Context) (*collector.ResourceStats, error) { | |||
| //TODO implement me | |||
| panic("implement me") | |||
| return nil, errors.New("failed to implement") | |||
| } | |||
| func (o OpenI) GetDatasetsSpecs(ctx context.Context) ([]*collector.DatasetsSpecs, error) { | |||
| //TODO implement me | |||
| panic("implement me") | |||
| return nil, errors.New("failed to implement") | |||
| } | |||
| func (o OpenI) GetAlgorithms(ctx context.Context) ([]*collector.Algorithm, error) { | |||
| //TODO implement me | |||
| panic("implement me") | |||
| return nil, errors.New("failed to implement") | |||
| } | |||
| func (o OpenI) GetTrainingTaskLog(ctx context.Context, taskId string, instanceNum string) (string, error) { | |||
| //TODO implement me | |||
| panic("implement me") | |||
| return "", errors.New("failed to implement") | |||
| } | |||
| func (o OpenI) GetTrainingTask(ctx context.Context, taskId string) (*collector.Task, error) { | |||
| //TODO implement me | |||
| panic("implement me") | |||
| return nil, errors.New("failed to implement") | |||
| } | |||
| func (o OpenI) DownloadAlgorithmCode(ctx context.Context, resourceType string, card string, taskType string, dataset string, algorithm string) (string, error) { | |||
| //TODO implement me | |||
| panic("implement me") | |||
| return "", errors.New("failed to implement") | |||
| } | |||
| func (o OpenI) UploadAlgorithmCode(ctx context.Context, resourceType string, card string, taskType string, dataset string, algorithm string, code string) error { | |||
| //TODO implement me | |||
| panic("implement me") | |||
| return errors.New("failed to implement") | |||
| } | |||
| func (o OpenI) GetComputeCards(ctx context.Context) ([]string, error) { | |||
| //TODO implement me | |||
| panic("implement me") | |||
| return nil, errors.New("failed to implement") | |||
| } | |||
| func (o OpenI) GetUserBalance(ctx context.Context) (float64, error) { | |||
| //TODO implement me | |||
| panic("implement me") | |||
| return 0, errors.New("failed to implement") | |||
| } | |||
| func (o OpenI) GetResourceSpecs(ctx context.Context) (*collector.ResourceSpec, error) { | |||