forked from JointCloud/pcm-octopus
added downloadcompress rpc
This commit is contained in:
parent
38e45468ea
commit
e9120b9e82
|
@ -50,6 +50,7 @@ OctopusApi:
|
||||||
GetAlgorithmList: openaiserver/v1/algorithmmanage/algorithm/{algorithmId}
|
GetAlgorithmList: openaiserver/v1/algorithmmanage/algorithm/{algorithmId}
|
||||||
GetAlgorithm: openaiserver/v1/algorithmmanage/algorithm/{algorithmId}/version/{version}
|
GetAlgorithm: openaiserver/v1/algorithmmanage/algorithm/{algorithmId}/version/{version}
|
||||||
DownloadAlgorithm: openaiserver/v1/algorithmmanage/algorithm/{algorithmId}/version/{version}/download
|
DownloadAlgorithm: openaiserver/v1/algorithmmanage/algorithm/{algorithmId}/version/{version}/download
|
||||||
|
DownloadCompress: openaiserver/v1/algorithmmanage/algorithm/{algorithmId}/version/{version}/downloadcompress
|
||||||
UploadAlgorithm: openaiserver/v1/algorithmmanage/algorithm/{algorithmId}/version/{version}/upload
|
UploadAlgorithm: openaiserver/v1/algorithmmanage/algorithm/{algorithmId}/version/{version}/upload
|
||||||
UploadAlgorithmConfirm: openaiserver/v1/algorithmmanage/algorithm/{algorithmId}/version/{version}/uploadconfirm
|
UploadAlgorithmConfirm: openaiserver/v1/algorithmmanage/algorithm/{algorithmId}/version/{version}/uploadconfirm
|
||||||
UploadImage: openaiserver/v1/imagemanage/image/{imageId}/upload
|
UploadImage: openaiserver/v1/imagemanage/image/{imageId}/upload
|
||||||
|
@ -87,4 +88,5 @@ OctopusApi:
|
||||||
InferModelDeploy: openaiserver/v1/deploymanage/modeldeploy/infer
|
InferModelDeploy: openaiserver/v1/deploymanage/modeldeploy/infer
|
||||||
GetResourceSpecs: openaiserver/v1/resourcemanage/resourcespec
|
GetResourceSpecs: openaiserver/v1/resourcemanage/resourcespec
|
||||||
GetUserBalance: openaiserver/v1/billingmanage/user
|
GetUserBalance: openaiserver/v1/billingmanage/user
|
||||||
GetPresetImageList: openaiserver/v1/imagemanage/preimage
|
GetPresetImageList: openaiserver/v1/imagemanage/preimage
|
||||||
|
GetTrainJobLog: log/user/trainjob/{taskId}/{taskNum}/{num}/index.log
|
|
@ -29,6 +29,7 @@ type OctopusApi struct {
|
||||||
CreateMyAlgorithm string
|
CreateMyAlgorithm string
|
||||||
GetAlgorithmList string
|
GetAlgorithmList string
|
||||||
GetAlgorithm string
|
GetAlgorithm string
|
||||||
|
DownloadCompress string
|
||||||
DownloadAlgorithm string
|
DownloadAlgorithm string
|
||||||
UploadAlgorithm string
|
UploadAlgorithm string
|
||||||
UploadAlgorithmConfirm string
|
UploadAlgorithmConfirm string
|
||||||
|
@ -67,4 +68,5 @@ type OctopusApi struct {
|
||||||
InferModelDeploy string
|
InferModelDeploy string
|
||||||
GetResourceSpecs string
|
GetResourceSpecs string
|
||||||
GetUserBalance string
|
GetUserBalance string
|
||||||
|
GetTrainJobLog string
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@ import (
|
||||||
"gitlink.org.cn/JointCloud/pcm-octopus/octopus"
|
"gitlink.org.cn/JointCloud/pcm-octopus/octopus"
|
||||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||||
"log"
|
"log"
|
||||||
|
"strconv"
|
||||||
)
|
)
|
||||||
|
|
||||||
type DownloadAlgorithmLogic struct {
|
type DownloadAlgorithmLogic struct {
|
||||||
|
@ -42,6 +43,8 @@ func (l *DownloadAlgorithmLogic) DownloadAlgorithm(in *octopus.DownloadAlgorithm
|
||||||
SetHeader("Authorization", "Bearer "+token).
|
SetHeader("Authorization", "Bearer "+token).
|
||||||
SetPathParam("algorithmId", in.AlgorithmId).
|
SetPathParam("algorithmId", in.AlgorithmId).
|
||||||
SetPathParam("version", in.Version).
|
SetPathParam("version", in.Version).
|
||||||
|
SetQueryParam("compressAt", strconv.FormatInt(in.CompressAt, 10)).
|
||||||
|
SetQueryParam("domain", in.Domain).
|
||||||
SetResult(resp).
|
SetResult(resp).
|
||||||
Get(reqUrl)
|
Get(reqUrl)
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,53 @@
|
||||||
|
package logic
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"errors"
|
||||||
|
"gitlink.org.cn/JointCloud/pcm-octopus/internal/common"
|
||||||
|
"gitlink.org.cn/JointCloud/pcm-octopus/internal/svc"
|
||||||
|
"gitlink.org.cn/JointCloud/pcm-octopus/octopus"
|
||||||
|
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||||
|
"log"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type DownloadCompressLogic struct {
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
logx.Logger
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewDownloadCompressLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DownloadCompressLogic {
|
||||||
|
return &DownloadCompressLogic{
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l *DownloadCompressLogic) DownloadCompress(in *octopus.DownloadCompressReq) (*octopus.DownloadCompressResp, error) {
|
||||||
|
resp := &octopus.DownloadCompressResp{}
|
||||||
|
|
||||||
|
var url_prefix = common.OctopusUrls[in.Platform]
|
||||||
|
var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.DownloadCompress
|
||||||
|
|
||||||
|
token := common.GetToken(in.Platform)
|
||||||
|
if token == "" {
|
||||||
|
log.Println("获取token失败, platform : ", in.Platform)
|
||||||
|
return nil, errors.New("获取token失败")
|
||||||
|
}
|
||||||
|
|
||||||
|
req := tool.GetACHttpRequest()
|
||||||
|
_, err := req.
|
||||||
|
SetHeader("Authorization", "Bearer "+token).
|
||||||
|
SetPathParam("algorithmId", in.AlgorithmId).
|
||||||
|
SetPathParam("version", in.Version).
|
||||||
|
SetResult(resp).
|
||||||
|
Get(reqUrl)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return resp, nil
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
package logic
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"gitlink.org.cn/JointCloud/pcm-octopus/internal/svc"
|
||||||
|
"gitlink.org.cn/JointCloud/pcm-octopus/octopus"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type GetTrainJobLogLogic struct {
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
logx.Logger
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewGetTrainJobLogLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetTrainJobLogLogic {
|
||||||
|
return &GetTrainJobLogLogic{
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l *GetTrainJobLogLogic) GetTrainJobLog(in *octopus.GetTrainJobLogReq) (*octopus.GetTrainJobLogResp, error) {
|
||||||
|
// todo: add your logic here and delete this line
|
||||||
|
|
||||||
|
return &octopus.GetTrainJobLogResp{}, nil
|
||||||
|
}
|
|
@ -73,6 +73,11 @@ func (s *OctopusServer) DownloadAlgorithm(ctx context.Context, in *octopus.Downl
|
||||||
return l.DownloadAlgorithm(in)
|
return l.DownloadAlgorithm(in)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *OctopusServer) DownloadCompress(ctx context.Context, in *octopus.DownloadCompressReq) (*octopus.DownloadCompressResp, error) {
|
||||||
|
l := logic.NewDownloadCompressLogic(ctx, s.svcCtx)
|
||||||
|
return l.DownloadCompress(in)
|
||||||
|
}
|
||||||
|
|
||||||
func (s *OctopusServer) UploadAlgorithm(ctx context.Context, in *octopus.UploadAlgorithmReq) (*octopus.UploadAlgorithmResp, error) {
|
func (s *OctopusServer) UploadAlgorithm(ctx context.Context, in *octopus.UploadAlgorithmReq) (*octopus.UploadAlgorithmResp, error) {
|
||||||
l := logic.NewUploadAlgorithmLogic(ctx, s.svcCtx)
|
l := logic.NewUploadAlgorithmLogic(ctx, s.svcCtx)
|
||||||
return l.UploadAlgorithm(in)
|
return l.UploadAlgorithm(in)
|
||||||
|
@ -294,6 +299,11 @@ func (s *OctopusServer) GetTrainJobMetric(ctx context.Context, in *octopus.GetTr
|
||||||
return l.GetTrainJobMetric(in)
|
return l.GetTrainJobMetric(in)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *OctopusServer) GetTrainJobLog(ctx context.Context, in *octopus.GetTrainJobLogReq) (*octopus.GetTrainJobLogResp, error) {
|
||||||
|
l := logic.NewGetTrainJobLogLogic(ctx, s.svcCtx)
|
||||||
|
return l.GetTrainJobLog(in)
|
||||||
|
}
|
||||||
|
|
||||||
// ResourceSpecService
|
// ResourceSpecService
|
||||||
func (s *OctopusServer) GetResourceSpecs(ctx context.Context, in *octopus.GetResourceSpecsReq) (*octopus.GetResourceSpecsResp, error) {
|
func (s *OctopusServer) GetResourceSpecs(ctx context.Context, in *octopus.GetResourceSpecsReq) (*octopus.GetResourceSpecsResp, error) {
|
||||||
l := logic.NewGetResourceSpecsLogic(ctx, s.svcCtx)
|
l := logic.NewGetResourceSpecsLogic(ctx, s.svcCtx)
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,8 +1,8 @@
|
||||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// - protoc-gen-go-grpc v1.3.0
|
// - protoc-gen-go-grpc v1.3.0
|
||||||
// - protoc v4.25.3
|
// - protoc v3.19.4
|
||||||
// source: pb/octopus.proto
|
// source: octopus.proto
|
||||||
|
|
||||||
package octopus
|
package octopus
|
||||||
|
|
||||||
|
@ -29,6 +29,7 @@ const (
|
||||||
Octopus_DeleteMyAlgorithm_FullMethodName = "/octopus.Octopus/DeleteMyAlgorithm"
|
Octopus_DeleteMyAlgorithm_FullMethodName = "/octopus.Octopus/DeleteMyAlgorithm"
|
||||||
Octopus_CreateMyAlgorithm_FullMethodName = "/octopus.Octopus/CreateMyAlgorithm"
|
Octopus_CreateMyAlgorithm_FullMethodName = "/octopus.Octopus/CreateMyAlgorithm"
|
||||||
Octopus_DownloadAlgorithm_FullMethodName = "/octopus.Octopus/DownloadAlgorithm"
|
Octopus_DownloadAlgorithm_FullMethodName = "/octopus.Octopus/DownloadAlgorithm"
|
||||||
|
Octopus_DownloadCompress_FullMethodName = "/octopus.Octopus/DownloadCompress"
|
||||||
Octopus_UploadAlgorithm_FullMethodName = "/octopus.Octopus/UploadAlgorithm"
|
Octopus_UploadAlgorithm_FullMethodName = "/octopus.Octopus/UploadAlgorithm"
|
||||||
Octopus_UploadAlgorithmConfirm_FullMethodName = "/octopus.Octopus/UploadAlgorithmConfirm"
|
Octopus_UploadAlgorithmConfirm_FullMethodName = "/octopus.Octopus/UploadAlgorithmConfirm"
|
||||||
Octopus_GetMyDatasetList_FullMethodName = "/octopus.Octopus/GetMyDatasetList"
|
Octopus_GetMyDatasetList_FullMethodName = "/octopus.Octopus/GetMyDatasetList"
|
||||||
|
@ -72,6 +73,7 @@ const (
|
||||||
Octopus_StopTrainJob_FullMethodName = "/octopus.Octopus/StopTrainJob"
|
Octopus_StopTrainJob_FullMethodName = "/octopus.Octopus/StopTrainJob"
|
||||||
Octopus_GetTrainJobEvent_FullMethodName = "/octopus.Octopus/GetTrainJobEvent"
|
Octopus_GetTrainJobEvent_FullMethodName = "/octopus.Octopus/GetTrainJobEvent"
|
||||||
Octopus_GetTrainJobMetric_FullMethodName = "/octopus.Octopus/GetTrainJobMetric"
|
Octopus_GetTrainJobMetric_FullMethodName = "/octopus.Octopus/GetTrainJobMetric"
|
||||||
|
Octopus_GetTrainJobLog_FullMethodName = "/octopus.Octopus/GetTrainJobLog"
|
||||||
Octopus_GetResourceSpecs_FullMethodName = "/octopus.Octopus/GetResourceSpecs"
|
Octopus_GetResourceSpecs_FullMethodName = "/octopus.Octopus/GetResourceSpecs"
|
||||||
Octopus_GetUserBalance_FullMethodName = "/octopus.Octopus/GetUserBalance"
|
Octopus_GetUserBalance_FullMethodName = "/octopus.Octopus/GetUserBalance"
|
||||||
)
|
)
|
||||||
|
@ -91,6 +93,7 @@ type OctopusClient interface {
|
||||||
DeleteMyAlgorithm(ctx context.Context, in *DeleteMyAlgorithmReq, opts ...grpc.CallOption) (*DeleteMyAlgorithmResp, error)
|
DeleteMyAlgorithm(ctx context.Context, in *DeleteMyAlgorithmReq, opts ...grpc.CallOption) (*DeleteMyAlgorithmResp, error)
|
||||||
CreateMyAlgorithm(ctx context.Context, in *CreateMyAlgorithmReq, opts ...grpc.CallOption) (*CreateMyAlgorithmResp, error)
|
CreateMyAlgorithm(ctx context.Context, in *CreateMyAlgorithmReq, opts ...grpc.CallOption) (*CreateMyAlgorithmResp, error)
|
||||||
DownloadAlgorithm(ctx context.Context, in *DownloadAlgorithmReq, opts ...grpc.CallOption) (*DownloadAlgorithmResp, error)
|
DownloadAlgorithm(ctx context.Context, in *DownloadAlgorithmReq, opts ...grpc.CallOption) (*DownloadAlgorithmResp, error)
|
||||||
|
DownloadCompress(ctx context.Context, in *DownloadCompressReq, opts ...grpc.CallOption) (*DownloadCompressResp, error)
|
||||||
UploadAlgorithm(ctx context.Context, in *UploadAlgorithmReq, opts ...grpc.CallOption) (*UploadAlgorithmResp, error)
|
UploadAlgorithm(ctx context.Context, in *UploadAlgorithmReq, opts ...grpc.CallOption) (*UploadAlgorithmResp, error)
|
||||||
UploadAlgorithmConfirm(ctx context.Context, in *UploadAlgorithmConfirmReq, opts ...grpc.CallOption) (*UploadAlgorithmConfirmResp, error)
|
UploadAlgorithmConfirm(ctx context.Context, in *UploadAlgorithmConfirmReq, opts ...grpc.CallOption) (*UploadAlgorithmConfirmResp, error)
|
||||||
// DatasetService
|
// DatasetService
|
||||||
|
@ -140,6 +143,7 @@ type OctopusClient interface {
|
||||||
StopTrainJob(ctx context.Context, in *StopTrainJobReq, opts ...grpc.CallOption) (*StopTrainJobResp, error)
|
StopTrainJob(ctx context.Context, in *StopTrainJobReq, opts ...grpc.CallOption) (*StopTrainJobResp, error)
|
||||||
GetTrainJobEvent(ctx context.Context, in *GetTrainJobEventReq, opts ...grpc.CallOption) (*GetTrainJobEventResp, error)
|
GetTrainJobEvent(ctx context.Context, in *GetTrainJobEventReq, opts ...grpc.CallOption) (*GetTrainJobEventResp, error)
|
||||||
GetTrainJobMetric(ctx context.Context, in *GetTrainJobMetricReq, opts ...grpc.CallOption) (*GetTrainJobMetricResp, error)
|
GetTrainJobMetric(ctx context.Context, in *GetTrainJobMetricReq, opts ...grpc.CallOption) (*GetTrainJobMetricResp, error)
|
||||||
|
GetTrainJobLog(ctx context.Context, in *GetTrainJobLogReq, opts ...grpc.CallOption) (*GetTrainJobLogResp, error)
|
||||||
// ResourceSpecService
|
// ResourceSpecService
|
||||||
GetResourceSpecs(ctx context.Context, in *GetResourceSpecsReq, opts ...grpc.CallOption) (*GetResourceSpecsResp, error)
|
GetResourceSpecs(ctx context.Context, in *GetResourceSpecsReq, opts ...grpc.CallOption) (*GetResourceSpecsResp, error)
|
||||||
// Billing
|
// Billing
|
||||||
|
@ -244,6 +248,15 @@ func (c *octopusClient) DownloadAlgorithm(ctx context.Context, in *DownloadAlgor
|
||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *octopusClient) DownloadCompress(ctx context.Context, in *DownloadCompressReq, opts ...grpc.CallOption) (*DownloadCompressResp, error) {
|
||||||
|
out := new(DownloadCompressResp)
|
||||||
|
err := c.cc.Invoke(ctx, Octopus_DownloadCompress_FullMethodName, in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (c *octopusClient) UploadAlgorithm(ctx context.Context, in *UploadAlgorithmReq, opts ...grpc.CallOption) (*UploadAlgorithmResp, error) {
|
func (c *octopusClient) UploadAlgorithm(ctx context.Context, in *UploadAlgorithmReq, opts ...grpc.CallOption) (*UploadAlgorithmResp, error) {
|
||||||
out := new(UploadAlgorithmResp)
|
out := new(UploadAlgorithmResp)
|
||||||
err := c.cc.Invoke(ctx, Octopus_UploadAlgorithm_FullMethodName, in, out, opts...)
|
err := c.cc.Invoke(ctx, Octopus_UploadAlgorithm_FullMethodName, in, out, opts...)
|
||||||
|
@ -631,6 +644,15 @@ func (c *octopusClient) GetTrainJobMetric(ctx context.Context, in *GetTrainJobMe
|
||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *octopusClient) GetTrainJobLog(ctx context.Context, in *GetTrainJobLogReq, opts ...grpc.CallOption) (*GetTrainJobLogResp, error) {
|
||||||
|
out := new(GetTrainJobLogResp)
|
||||||
|
err := c.cc.Invoke(ctx, Octopus_GetTrainJobLog_FullMethodName, in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (c *octopusClient) GetResourceSpecs(ctx context.Context, in *GetResourceSpecsReq, opts ...grpc.CallOption) (*GetResourceSpecsResp, error) {
|
func (c *octopusClient) GetResourceSpecs(ctx context.Context, in *GetResourceSpecsReq, opts ...grpc.CallOption) (*GetResourceSpecsResp, error) {
|
||||||
out := new(GetResourceSpecsResp)
|
out := new(GetResourceSpecsResp)
|
||||||
err := c.cc.Invoke(ctx, Octopus_GetResourceSpecs_FullMethodName, in, out, opts...)
|
err := c.cc.Invoke(ctx, Octopus_GetResourceSpecs_FullMethodName, in, out, opts...)
|
||||||
|
@ -664,6 +686,7 @@ type OctopusServer interface {
|
||||||
DeleteMyAlgorithm(context.Context, *DeleteMyAlgorithmReq) (*DeleteMyAlgorithmResp, error)
|
DeleteMyAlgorithm(context.Context, *DeleteMyAlgorithmReq) (*DeleteMyAlgorithmResp, error)
|
||||||
CreateMyAlgorithm(context.Context, *CreateMyAlgorithmReq) (*CreateMyAlgorithmResp, error)
|
CreateMyAlgorithm(context.Context, *CreateMyAlgorithmReq) (*CreateMyAlgorithmResp, error)
|
||||||
DownloadAlgorithm(context.Context, *DownloadAlgorithmReq) (*DownloadAlgorithmResp, error)
|
DownloadAlgorithm(context.Context, *DownloadAlgorithmReq) (*DownloadAlgorithmResp, error)
|
||||||
|
DownloadCompress(context.Context, *DownloadCompressReq) (*DownloadCompressResp, error)
|
||||||
UploadAlgorithm(context.Context, *UploadAlgorithmReq) (*UploadAlgorithmResp, error)
|
UploadAlgorithm(context.Context, *UploadAlgorithmReq) (*UploadAlgorithmResp, error)
|
||||||
UploadAlgorithmConfirm(context.Context, *UploadAlgorithmConfirmReq) (*UploadAlgorithmConfirmResp, error)
|
UploadAlgorithmConfirm(context.Context, *UploadAlgorithmConfirmReq) (*UploadAlgorithmConfirmResp, error)
|
||||||
// DatasetService
|
// DatasetService
|
||||||
|
@ -713,6 +736,7 @@ type OctopusServer interface {
|
||||||
StopTrainJob(context.Context, *StopTrainJobReq) (*StopTrainJobResp, error)
|
StopTrainJob(context.Context, *StopTrainJobReq) (*StopTrainJobResp, error)
|
||||||
GetTrainJobEvent(context.Context, *GetTrainJobEventReq) (*GetTrainJobEventResp, error)
|
GetTrainJobEvent(context.Context, *GetTrainJobEventReq) (*GetTrainJobEventResp, error)
|
||||||
GetTrainJobMetric(context.Context, *GetTrainJobMetricReq) (*GetTrainJobMetricResp, error)
|
GetTrainJobMetric(context.Context, *GetTrainJobMetricReq) (*GetTrainJobMetricResp, error)
|
||||||
|
GetTrainJobLog(context.Context, *GetTrainJobLogReq) (*GetTrainJobLogResp, error)
|
||||||
// ResourceSpecService
|
// ResourceSpecService
|
||||||
GetResourceSpecs(context.Context, *GetResourceSpecsReq) (*GetResourceSpecsResp, error)
|
GetResourceSpecs(context.Context, *GetResourceSpecsReq) (*GetResourceSpecsResp, error)
|
||||||
// Billing
|
// Billing
|
||||||
|
@ -754,6 +778,9 @@ func (UnimplementedOctopusServer) CreateMyAlgorithm(context.Context, *CreateMyAl
|
||||||
func (UnimplementedOctopusServer) DownloadAlgorithm(context.Context, *DownloadAlgorithmReq) (*DownloadAlgorithmResp, error) {
|
func (UnimplementedOctopusServer) DownloadAlgorithm(context.Context, *DownloadAlgorithmReq) (*DownloadAlgorithmResp, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method DownloadAlgorithm not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method DownloadAlgorithm not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedOctopusServer) DownloadCompress(context.Context, *DownloadCompressReq) (*DownloadCompressResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method DownloadCompress not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedOctopusServer) UploadAlgorithm(context.Context, *UploadAlgorithmReq) (*UploadAlgorithmResp, error) {
|
func (UnimplementedOctopusServer) UploadAlgorithm(context.Context, *UploadAlgorithmReq) (*UploadAlgorithmResp, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method UploadAlgorithm not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method UploadAlgorithm not implemented")
|
||||||
}
|
}
|
||||||
|
@ -883,6 +910,9 @@ func (UnimplementedOctopusServer) GetTrainJobEvent(context.Context, *GetTrainJob
|
||||||
func (UnimplementedOctopusServer) GetTrainJobMetric(context.Context, *GetTrainJobMetricReq) (*GetTrainJobMetricResp, error) {
|
func (UnimplementedOctopusServer) GetTrainJobMetric(context.Context, *GetTrainJobMetricReq) (*GetTrainJobMetricResp, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method GetTrainJobMetric not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method GetTrainJobMetric not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedOctopusServer) GetTrainJobLog(context.Context, *GetTrainJobLogReq) (*GetTrainJobLogResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method GetTrainJobLog not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedOctopusServer) GetResourceSpecs(context.Context, *GetResourceSpecsReq) (*GetResourceSpecsResp, error) {
|
func (UnimplementedOctopusServer) GetResourceSpecs(context.Context, *GetResourceSpecsReq) (*GetResourceSpecsResp, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method GetResourceSpecs not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method GetResourceSpecs not implemented")
|
||||||
}
|
}
|
||||||
|
@ -1082,6 +1112,24 @@ func _Octopus_DownloadAlgorithm_Handler(srv interface{}, ctx context.Context, de
|
||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _Octopus_DownloadCompress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(DownloadCompressReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(OctopusServer).DownloadCompress(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: Octopus_DownloadCompress_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(OctopusServer).DownloadCompress(ctx, req.(*DownloadCompressReq))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
func _Octopus_UploadAlgorithm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
func _Octopus_UploadAlgorithm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(UploadAlgorithmReq)
|
in := new(UploadAlgorithmReq)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
|
@ -1856,6 +1904,24 @@ func _Octopus_GetTrainJobMetric_Handler(srv interface{}, ctx context.Context, de
|
||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _Octopus_GetTrainJobLog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetTrainJobLogReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(OctopusServer).GetTrainJobLog(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: Octopus_GetTrainJobLog_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(OctopusServer).GetTrainJobLog(ctx, req.(*GetTrainJobLogReq))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
func _Octopus_GetResourceSpecs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
func _Octopus_GetResourceSpecs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(GetResourceSpecsReq)
|
in := new(GetResourceSpecsReq)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
|
@ -1939,6 +2005,10 @@ var Octopus_ServiceDesc = grpc.ServiceDesc{
|
||||||
MethodName: "DownloadAlgorithm",
|
MethodName: "DownloadAlgorithm",
|
||||||
Handler: _Octopus_DownloadAlgorithm_Handler,
|
Handler: _Octopus_DownloadAlgorithm_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "DownloadCompress",
|
||||||
|
Handler: _Octopus_DownloadCompress_Handler,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
MethodName: "UploadAlgorithm",
|
MethodName: "UploadAlgorithm",
|
||||||
Handler: _Octopus_UploadAlgorithm_Handler,
|
Handler: _Octopus_UploadAlgorithm_Handler,
|
||||||
|
@ -2111,6 +2181,10 @@ var Octopus_ServiceDesc = grpc.ServiceDesc{
|
||||||
MethodName: "GetTrainJobMetric",
|
MethodName: "GetTrainJobMetric",
|
||||||
Handler: _Octopus_GetTrainJobMetric_Handler,
|
Handler: _Octopus_GetTrainJobMetric_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetTrainJobLog",
|
||||||
|
Handler: _Octopus_GetTrainJobLog_Handler,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
MethodName: "GetResourceSpecs",
|
MethodName: "GetResourceSpecs",
|
||||||
Handler: _Octopus_GetResourceSpecs_Handler,
|
Handler: _Octopus_GetResourceSpecs_Handler,
|
||||||
|
@ -2121,5 +2195,5 @@ var Octopus_ServiceDesc = grpc.ServiceDesc{
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{},
|
Streams: []grpc.StreamDesc{},
|
||||||
Metadata: "pb/octopus.proto",
|
Metadata: "octopus.proto",
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,6 +64,8 @@ type (
|
||||||
DepInfo = octopus.DepInfo
|
DepInfo = octopus.DepInfo
|
||||||
DownloadAlgorithmReq = octopus.DownloadAlgorithmReq
|
DownloadAlgorithmReq = octopus.DownloadAlgorithmReq
|
||||||
DownloadAlgorithmResp = octopus.DownloadAlgorithmResp
|
DownloadAlgorithmResp = octopus.DownloadAlgorithmResp
|
||||||
|
DownloadCompressReq = octopus.DownloadCompressReq
|
||||||
|
DownloadCompressResp = octopus.DownloadCompressResp
|
||||||
DownloadModelVersionReq = octopus.DownloadModelVersionReq
|
DownloadModelVersionReq = octopus.DownloadModelVersionReq
|
||||||
DownloadModelVersionResp = octopus.DownloadModelVersionResp
|
DownloadModelVersionResp = octopus.DownloadModelVersionResp
|
||||||
Error = octopus.Error
|
Error = octopus.Error
|
||||||
|
@ -107,6 +109,8 @@ type (
|
||||||
GetTrainJobEventResp = octopus.GetTrainJobEventResp
|
GetTrainJobEventResp = octopus.GetTrainJobEventResp
|
||||||
GetTrainJobListReq = octopus.GetTrainJobListReq
|
GetTrainJobListReq = octopus.GetTrainJobListReq
|
||||||
GetTrainJobListResp = octopus.GetTrainJobListResp
|
GetTrainJobListResp = octopus.GetTrainJobListResp
|
||||||
|
GetTrainJobLogReq = octopus.GetTrainJobLogReq
|
||||||
|
GetTrainJobLogResp = octopus.GetTrainJobLogResp
|
||||||
GetTrainJobMetricReq = octopus.GetTrainJobMetricReq
|
GetTrainJobMetricReq = octopus.GetTrainJobMetricReq
|
||||||
GetTrainJobMetricResp = octopus.GetTrainJobMetricResp
|
GetTrainJobMetricResp = octopus.GetTrainJobMetricResp
|
||||||
GetTrainJobReq = octopus.GetTrainJobReq
|
GetTrainJobReq = octopus.GetTrainJobReq
|
||||||
|
@ -149,6 +153,7 @@ type (
|
||||||
PayloadDeleteNotebook = octopus.PayloadDeleteNotebook
|
PayloadDeleteNotebook = octopus.PayloadDeleteNotebook
|
||||||
PayloadDeleteTrainJob = octopus.PayloadDeleteTrainJob
|
PayloadDeleteTrainJob = octopus.PayloadDeleteTrainJob
|
||||||
PayloadDownloadAlgorithm = octopus.PayloadDownloadAlgorithm
|
PayloadDownloadAlgorithm = octopus.PayloadDownloadAlgorithm
|
||||||
|
PayloadDownloadCompress = octopus.PayloadDownloadCompress
|
||||||
PayloadDownloadModelVersion = octopus.PayloadDownloadModelVersion
|
PayloadDownloadModelVersion = octopus.PayloadDownloadModelVersion
|
||||||
PayloadGetAlgorithm = octopus.PayloadGetAlgorithm
|
PayloadGetAlgorithm = octopus.PayloadGetAlgorithm
|
||||||
PayloadGetAlgorithmApplyList = octopus.PayloadGetAlgorithmApplyList
|
PayloadGetAlgorithmApplyList = octopus.PayloadGetAlgorithmApplyList
|
||||||
|
@ -227,6 +232,7 @@ type (
|
||||||
DeleteMyAlgorithm(ctx context.Context, in *DeleteMyAlgorithmReq, opts ...grpc.CallOption) (*DeleteMyAlgorithmResp, error)
|
DeleteMyAlgorithm(ctx context.Context, in *DeleteMyAlgorithmReq, opts ...grpc.CallOption) (*DeleteMyAlgorithmResp, error)
|
||||||
CreateMyAlgorithm(ctx context.Context, in *CreateMyAlgorithmReq, opts ...grpc.CallOption) (*CreateMyAlgorithmResp, error)
|
CreateMyAlgorithm(ctx context.Context, in *CreateMyAlgorithmReq, opts ...grpc.CallOption) (*CreateMyAlgorithmResp, error)
|
||||||
DownloadAlgorithm(ctx context.Context, in *DownloadAlgorithmReq, opts ...grpc.CallOption) (*DownloadAlgorithmResp, error)
|
DownloadAlgorithm(ctx context.Context, in *DownloadAlgorithmReq, opts ...grpc.CallOption) (*DownloadAlgorithmResp, error)
|
||||||
|
DownloadCompress(ctx context.Context, in *DownloadCompressReq, opts ...grpc.CallOption) (*DownloadCompressResp, error)
|
||||||
UploadAlgorithm(ctx context.Context, in *UploadAlgorithmReq, opts ...grpc.CallOption) (*UploadAlgorithmResp, error)
|
UploadAlgorithm(ctx context.Context, in *UploadAlgorithmReq, opts ...grpc.CallOption) (*UploadAlgorithmResp, error)
|
||||||
UploadAlgorithmConfirm(ctx context.Context, in *UploadAlgorithmConfirmReq, opts ...grpc.CallOption) (*UploadAlgorithmConfirmResp, error)
|
UploadAlgorithmConfirm(ctx context.Context, in *UploadAlgorithmConfirmReq, opts ...grpc.CallOption) (*UploadAlgorithmConfirmResp, error)
|
||||||
// DatasetService
|
// DatasetService
|
||||||
|
@ -276,6 +282,7 @@ type (
|
||||||
StopTrainJob(ctx context.Context, in *StopTrainJobReq, opts ...grpc.CallOption) (*StopTrainJobResp, error)
|
StopTrainJob(ctx context.Context, in *StopTrainJobReq, opts ...grpc.CallOption) (*StopTrainJobResp, error)
|
||||||
GetTrainJobEvent(ctx context.Context, in *GetTrainJobEventReq, opts ...grpc.CallOption) (*GetTrainJobEventResp, error)
|
GetTrainJobEvent(ctx context.Context, in *GetTrainJobEventReq, opts ...grpc.CallOption) (*GetTrainJobEventResp, error)
|
||||||
GetTrainJobMetric(ctx context.Context, in *GetTrainJobMetricReq, opts ...grpc.CallOption) (*GetTrainJobMetricResp, error)
|
GetTrainJobMetric(ctx context.Context, in *GetTrainJobMetricReq, opts ...grpc.CallOption) (*GetTrainJobMetricResp, error)
|
||||||
|
GetTrainJobLog(ctx context.Context, in *GetTrainJobLogReq, opts ...grpc.CallOption) (*GetTrainJobLogResp, error)
|
||||||
// ResourceSpecService
|
// ResourceSpecService
|
||||||
GetResourceSpecs(ctx context.Context, in *GetResourceSpecsReq, opts ...grpc.CallOption) (*GetResourceSpecsResp, error)
|
GetResourceSpecs(ctx context.Context, in *GetResourceSpecsReq, opts ...grpc.CallOption) (*GetResourceSpecsResp, error)
|
||||||
// Billing
|
// Billing
|
||||||
|
@ -344,6 +351,11 @@ func (m *defaultOctopus) DownloadAlgorithm(ctx context.Context, in *DownloadAlgo
|
||||||
return client.DownloadAlgorithm(ctx, in, opts...)
|
return client.DownloadAlgorithm(ctx, in, opts...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *defaultOctopus) DownloadCompress(ctx context.Context, in *DownloadCompressReq, opts ...grpc.CallOption) (*DownloadCompressResp, error) {
|
||||||
|
client := octopus.NewOctopusClient(m.cli.Conn())
|
||||||
|
return client.DownloadCompress(ctx, in, opts...)
|
||||||
|
}
|
||||||
|
|
||||||
func (m *defaultOctopus) UploadAlgorithm(ctx context.Context, in *UploadAlgorithmReq, opts ...grpc.CallOption) (*UploadAlgorithmResp, error) {
|
func (m *defaultOctopus) UploadAlgorithm(ctx context.Context, in *UploadAlgorithmReq, opts ...grpc.CallOption) (*UploadAlgorithmResp, error) {
|
||||||
client := octopus.NewOctopusClient(m.cli.Conn())
|
client := octopus.NewOctopusClient(m.cli.Conn())
|
||||||
return client.UploadAlgorithm(ctx, in, opts...)
|
return client.UploadAlgorithm(ctx, in, opts...)
|
||||||
|
@ -565,6 +577,11 @@ func (m *defaultOctopus) GetTrainJobMetric(ctx context.Context, in *GetTrainJobM
|
||||||
return client.GetTrainJobMetric(ctx, in, opts...)
|
return client.GetTrainJobMetric(ctx, in, opts...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *defaultOctopus) GetTrainJobLog(ctx context.Context, in *GetTrainJobLogReq, opts ...grpc.CallOption) (*GetTrainJobLogResp, error) {
|
||||||
|
client := octopus.NewOctopusClient(m.cli.Conn())
|
||||||
|
return client.GetTrainJobLog(ctx, in, opts...)
|
||||||
|
}
|
||||||
|
|
||||||
// ResourceSpecService
|
// ResourceSpecService
|
||||||
func (m *defaultOctopus) GetResourceSpecs(ctx context.Context, in *GetResourceSpecsReq, opts ...grpc.CallOption) (*GetResourceSpecsResp, error) {
|
func (m *defaultOctopus) GetResourceSpecs(ctx context.Context, in *GetResourceSpecsReq, opts ...grpc.CallOption) (*GetResourceSpecsResp, error) {
|
||||||
client := octopus.NewOctopusClient(m.cli.Conn())
|
client := octopus.NewOctopusClient(m.cli.Conn())
|
||||||
|
|
|
@ -41,10 +41,28 @@ message VersionAccesses{
|
||||||
string version = 3;
|
string version = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message DownloadCompressReq{
|
||||||
|
string platform =1;
|
||||||
|
string algorithmId = 2;
|
||||||
|
string version = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DownloadCompressResp{
|
||||||
|
bool success =1;
|
||||||
|
PayloadDownloadCompress payload =2;
|
||||||
|
Error error = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message PayloadDownloadCompress{
|
||||||
|
string compressAt = 1;
|
||||||
|
}
|
||||||
|
|
||||||
message DownloadAlgorithmReq{
|
message DownloadAlgorithmReq{
|
||||||
string platform =1;
|
string platform =1;
|
||||||
string algorithmId = 2;
|
string algorithmId = 2;
|
||||||
string version = 3;
|
string version = 3;
|
||||||
|
int64 compressAt = 4;
|
||||||
|
string domain = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
message DownloadAlgorithmResp{
|
message DownloadAlgorithmResp{
|
||||||
|
@ -1223,6 +1241,14 @@ message TrainJobOctopus{
|
||||||
string object = 2;
|
string object = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message GetTrainJobLogReq{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetTrainJobLogResp{
|
||||||
|
string content = 1;
|
||||||
|
}
|
||||||
|
|
||||||
/******************TrainJobService End*************************/
|
/******************TrainJobService End*************************/
|
||||||
|
|
||||||
/******************ResourceSpecService Start*************************/
|
/******************ResourceSpecService Start*************************/
|
||||||
|
@ -1289,6 +1315,7 @@ service Octopus {
|
||||||
rpc DeleteMyAlgorithm(DeleteMyAlgorithmReq) returns (DeleteMyAlgorithmResp);
|
rpc DeleteMyAlgorithm(DeleteMyAlgorithmReq) returns (DeleteMyAlgorithmResp);
|
||||||
rpc CreateMyAlgorithm(CreateMyAlgorithmReq) returns (CreateMyAlgorithmResp);
|
rpc CreateMyAlgorithm(CreateMyAlgorithmReq) returns (CreateMyAlgorithmResp);
|
||||||
rpc DownloadAlgorithm(DownloadAlgorithmReq) returns (DownloadAlgorithmResp); //下载算法版本
|
rpc DownloadAlgorithm(DownloadAlgorithmReq) returns (DownloadAlgorithmResp); //下载算法版本
|
||||||
|
rpc DownloadCompress(DownloadCompressReq) returns (DownloadCompressResp);
|
||||||
rpc UploadAlgorithm(UploadAlgorithmReq) returns (UploadAlgorithmResp);
|
rpc UploadAlgorithm(UploadAlgorithmReq) returns (UploadAlgorithmResp);
|
||||||
rpc UploadAlgorithmConfirm(UploadAlgorithmConfirmReq) returns (UploadAlgorithmConfirmResp);
|
rpc UploadAlgorithmConfirm(UploadAlgorithmConfirmReq) returns (UploadAlgorithmConfirmResp);
|
||||||
|
|
||||||
|
@ -1350,6 +1377,7 @@ service Octopus {
|
||||||
rpc StopTrainJob(StopTrainJobReq) returns (StopTrainJobResp);
|
rpc StopTrainJob(StopTrainJobReq) returns (StopTrainJobResp);
|
||||||
rpc GetTrainJobEvent(GetTrainJobEventReq) returns (GetTrainJobEventResp);
|
rpc GetTrainJobEvent(GetTrainJobEventReq) returns (GetTrainJobEventResp);
|
||||||
rpc GetTrainJobMetric(GetTrainJobMetricReq) returns (GetTrainJobMetricResp);
|
rpc GetTrainJobMetric(GetTrainJobMetricReq) returns (GetTrainJobMetricResp);
|
||||||
|
rpc GetTrainJobLog(GetTrainJobLogReq) returns (GetTrainJobLogResp);
|
||||||
|
|
||||||
//ResourceSpecService
|
//ResourceSpecService
|
||||||
rpc GetResourceSpecs(GetResourceSpecsReq) returns (GetResourceSpecsResp);
|
rpc GetResourceSpecs(GetResourceSpecsReq) returns (GetResourceSpecsResp);
|
||||||
|
|
Loading…
Reference in New Issue