|
|
@@ -4,9 +4,12 @@ import ( |
|
|
"bytes" |
|
|
"bytes" |
|
|
"context" |
|
|
"context" |
|
|
"encoding/json" |
|
|
"encoding/json" |
|
|
|
|
|
"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/collector" |
|
|
|
|
|
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/scheduler/service/inference" |
|
|
"gitlink.org.cn/JointCloud/pcm-openi/common" |
|
|
"gitlink.org.cn/JointCloud/pcm-openi/common" |
|
|
"gitlink.org.cn/JointCloud/pcm-openi/model" |
|
|
"gitlink.org.cn/JointCloud/pcm-openi/model" |
|
|
|
|
|
"mime/multipart" |
|
|
"net/http" |
|
|
"net/http" |
|
|
"strconv" |
|
|
"strconv" |
|
|
"strings" |
|
|
"strings" |
|
|
@@ -42,6 +45,51 @@ 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") |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (o OpenI) GetClusterInferUrl(ctx context.Context, option *option.InferOption) (*inference.ClusterInferUrl, error) { |
|
|
|
|
|
//TODO implement me |
|
|
|
|
|
panic("implement me") |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (o OpenI) GetInferDeployInstanceList(ctx context.Context) ([]*inference.DeployInstance, error) { |
|
|
|
|
|
//TODO implement me |
|
|
|
|
|
panic("implement me") |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (o OpenI) StartInferDeployInstance(ctx context.Context, id string) bool { |
|
|
|
|
|
//TODO implement me |
|
|
|
|
|
panic("implement me") |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (o OpenI) StopInferDeployInstance(ctx context.Context, id string) bool { |
|
|
|
|
|
//TODO implement me |
|
|
|
|
|
panic("implement me") |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (o OpenI) GetInferDeployInstance(ctx context.Context, id string) (*inference.DeployInstance, error) { |
|
|
|
|
|
//TODO implement me |
|
|
|
|
|
panic("implement me") |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (o OpenI) CreateInferDeployInstance(ctx context.Context, option *option.InferOption) (string, error) { |
|
|
|
|
|
//TODO implement me |
|
|
|
|
|
panic("implement me") |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (o OpenI) CheckModelExistence(ctx context.Context, modelName string, modelType string) bool { |
|
|
|
|
|
//TODO implement me |
|
|
|
|
|
panic("implement me") |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (o OpenI) GetImageInferResult(ctx context.Context, url string, file multipart.File, fileName string) (string, error) { |
|
|
|
|
|
//TODO implement me |
|
|
|
|
|
panic("implement me") |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
func (o OpenI) GetResourceStats(ctx context.Context) (*collector.ResourceStats, error) { |
|
|
func (o OpenI) GetResourceStats(ctx context.Context) (*collector.ResourceStats, error) { |
|
|
//TODO implement me |
|
|
//TODO implement me |
|
|
panic("implement me") |
|
|
panic("implement me") |
|
|
|