导入模型、查询模型列表合并分支
This commit is contained in:
parent
1c3b86aa2f
commit
eb97ae6f01
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,15 +1,21 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"PCM/common/tool"
|
||||
"context"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
/*
|
||||
desc: "AI core微服务"
|
||||
author: "xie"
|
||||
*/
|
||||
|
||||
import (
|
||||
"PCM/adaptor/AIComputing/modelarts/rpc/internal/svc"
|
||||
"PCM/adaptor/AIComputing/modelarts/rpc/modelarts"
|
||||
|
||||
"PCM/common/tool"
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
)
|
||||
|
||||
import (
|
||||
"context"
|
||||
)
|
||||
|
||||
type CreateServiceLogic struct {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,10 @@
|
|||
package logic
|
||||
|
||||
/*
|
||||
desc: "AI core微服务"
|
||||
author: "xie"
|
||||
*/
|
||||
|
||||
import (
|
||||
"PCM/adaptor/AIComputing/modelarts/rpc/modelarts"
|
||||
_ "PCM/adaptor/AIComputing/modelarts/rpc/modelarts"
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
package logic
|
||||
|
||||
/*
|
||||
desc: "AI core微服务"
|
||||
author: "xie"
|
||||
*/
|
||||
|
||||
import (
|
||||
"PCM/adaptor/AIComputing/modelarts/rpc/modelarts"
|
||||
"PCM/common/tool"
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,10 @@
|
|||
package logic
|
||||
|
||||
/*
|
||||
desc: "AI core微服务"
|
||||
author: "xie"
|
||||
*/
|
||||
|
||||
import (
|
||||
"PCM/adaptor/AIComputing/modelarts/rpc/internal/svc"
|
||||
"PCM/adaptor/AIComputing/modelarts/rpc/modelarts"
|
||||
|
|
|
@ -40,12 +40,24 @@ func (s *ModelArtsServer) CreateTask(ctx context.Context, in *modelarts.ImportTa
|
|||
return l.CreateTask(in)
|
||||
}
|
||||
|
||||
// find taskList
|
||||
// get taskList
|
||||
func (s *ModelArtsServer) GetImportTaskList(ctx context.Context, in *modelarts.ListImportTasks) (*modelarts.ReturnListImportTasks, error) {
|
||||
l := logic.NewGetImportTaskListLogic(ctx, s.svcCtx)
|
||||
return l.GetImportTaskList(in)
|
||||
}
|
||||
|
||||
// get ListTrainingJobs
|
||||
func (s *ModelArtsServer) GetListTrainingJobs(ctx context.Context, in *modelarts.ListTrainingJobsreq) (*modelarts.ListTrainingJobsresp, error) {
|
||||
l := logic.NewGetListTrainingJobsLogic(ctx, s.svcCtx)
|
||||
return l.GetListTrainingJobs(in)
|
||||
}
|
||||
|
||||
// CreateTrainingJob 创建训练作业
|
||||
func (s *ModelArtsServer) CreateTrainingJob(ctx context.Context, in *modelarts.CreateTrainingJobreq) (*modelarts.CreateTrainingJobresp, error) {
|
||||
l := logic.NewCreateTrainingJobLogic(ctx, s.svcCtx)
|
||||
return l.CreateTrainingJob(in)
|
||||
}
|
||||
|
||||
// export task
|
||||
func (s *ModelArtsServer) ExportTask(ctx context.Context, in *modelarts.ExportTaskReq) (*modelarts.ExportTaskResp, error) {
|
||||
l := logic.NewExportTaskLogic(ctx, s.svcCtx)
|
||||
|
@ -57,6 +69,28 @@ func (s *ModelArtsServer) GetExportTasksOfDataset(ctx context.Context, in *model
|
|||
return l.GetExportTasksOfDataset(in)
|
||||
}
|
||||
|
||||
// processor task
|
||||
func (s *ModelArtsServer) CreateProcessorTask(ctx context.Context, in *modelarts.CreateProcessorTaskReq) (*modelarts.CreateProcessorTaskResp, error) {
|
||||
l := logic.NewCreateProcessorTaskLogic(ctx, s.svcCtx)
|
||||
return l.CreateProcessorTask(in)
|
||||
}
|
||||
|
||||
func (s *ModelArtsServer) DescribeProcessorTask(ctx context.Context, in *modelarts.DescribeProcessorTaskReq) (*modelarts.DescribeProcessorTaskResp, error) {
|
||||
l := logic.NewDescribeProcessorTaskLogic(ctx, s.svcCtx)
|
||||
return l.DescribeProcessorTask(in)
|
||||
}
|
||||
|
||||
// model management
|
||||
func (s *ModelArtsServer) CreateModel(ctx context.Context, in *modelarts.CreateModelReq) (*modelarts.CreateModelResp, error) {
|
||||
l := logic.NewCreateModelLogic(ctx, s.svcCtx)
|
||||
return l.CreateModel(in)
|
||||
}
|
||||
|
||||
func (s *ModelArtsServer) ListModels(ctx context.Context, in *modelarts.ListModelReq) (*modelarts.ListModelResp, error) {
|
||||
l := logic.NewListModelsLogic(ctx, s.svcCtx)
|
||||
return l.ListModels(in)
|
||||
}
|
||||
|
||||
// service management
|
||||
func (s *ModelArtsServer) CreateService(ctx context.Context, in *modelarts.CreatServiceReq) (*modelarts.CreatServiceResp, error) {
|
||||
l := logic.NewCreateServiceLogic(ctx, s.svcCtx)
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,7 +1,7 @@
|
|||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc v3.12.4
|
||||
// - protoc v3.19.4
|
||||
// source: modelarts.proto
|
||||
|
||||
package modelarts
|
||||
|
@ -22,18 +22,28 @@ const _ = grpc.SupportPackageIsVersion7
|
|||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type ModelArtsClient interface {
|
||||
//get modelarts Token
|
||||
// get modelarts Token
|
||||
GetToken(ctx context.Context, in *TokenReq, opts ...grpc.CallOption) (*TokenResp, error)
|
||||
//get modelarts Token
|
||||
// get modelarts Token
|
||||
GetDatasetList(ctx context.Context, in *DatasetReq, opts ...grpc.CallOption) (*DatasetResp, error)
|
||||
//creat task
|
||||
// creat task
|
||||
CreateTask(ctx context.Context, in *ImportTaskData, opts ...grpc.CallOption) (*ImprotTaskDataReq, error)
|
||||
//find taskList
|
||||
// get taskList
|
||||
GetImportTaskList(ctx context.Context, in *ListImportTasks, opts ...grpc.CallOption) (*ReturnListImportTasks, error)
|
||||
// get ListTrainingJobs
|
||||
GetListTrainingJobs(ctx context.Context, in *ListTrainingJobsreq, opts ...grpc.CallOption) (*ListTrainingJobsresp, error)
|
||||
// CreateTrainingJob 创建训练作业
|
||||
CreateTrainingJob(ctx context.Context, in *CreateTrainingJobreq, opts ...grpc.CallOption) (*CreateTrainingJobresp, error)
|
||||
//export task
|
||||
ExportTask(ctx context.Context, in *ExportTaskReq, opts ...grpc.CallOption) (*ExportTaskResp, error)
|
||||
GetExportTasksOfDataset(ctx context.Context, in *GetExportTasksOfDatasetReq, opts ...grpc.CallOption) (*GetExportTasksOfDatasetResp, error)
|
||||
//service management
|
||||
// processor task
|
||||
CreateProcessorTask(ctx context.Context, in *CreateProcessorTaskReq, opts ...grpc.CallOption) (*CreateProcessorTaskResp, error)
|
||||
DescribeProcessorTask(ctx context.Context, in *DescribeProcessorTaskReq, opts ...grpc.CallOption) (*DescribeProcessorTaskResp, error)
|
||||
// model management
|
||||
CreateModel(ctx context.Context, in *CreateModelReq, opts ...grpc.CallOption) (*CreateModelResp, error)
|
||||
ListModels(ctx context.Context, in *ListModelReq, opts ...grpc.CallOption) (*ListModelResp, error)
|
||||
// service management
|
||||
CreateService(ctx context.Context, in *CreatServiceReq, opts ...grpc.CallOption) (*CreatServiceResp, error)
|
||||
ListServices(ctx context.Context, in *ListServicesReq, opts ...grpc.CallOption) (*ListServicesResp, error)
|
||||
}
|
||||
|
@ -82,6 +92,24 @@ func (c *modelArtsClient) GetImportTaskList(ctx context.Context, in *ListImportT
|
|||
return out, nil
|
||||
}
|
||||
|
||||
func (c *modelArtsClient) GetListTrainingJobs(ctx context.Context, in *ListTrainingJobsreq, opts ...grpc.CallOption) (*ListTrainingJobsresp, error) {
|
||||
out := new(ListTrainingJobsresp)
|
||||
err := c.cc.Invoke(ctx, "/modelarts.ModelArts/GetListTrainingJobs", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *modelArtsClient) CreateTrainingJob(ctx context.Context, in *CreateTrainingJobreq, opts ...grpc.CallOption) (*CreateTrainingJobresp, error) {
|
||||
out := new(CreateTrainingJobresp)
|
||||
err := c.cc.Invoke(ctx, "/modelarts.ModelArts/CreateTrainingJob", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *modelArtsClient) ExportTask(ctx context.Context, in *ExportTaskReq, opts ...grpc.CallOption) (*ExportTaskResp, error) {
|
||||
out := new(ExportTaskResp)
|
||||
err := c.cc.Invoke(ctx, "/modelarts.ModelArts/ExportTask", in, out, opts...)
|
||||
|
@ -100,6 +128,42 @@ func (c *modelArtsClient) GetExportTasksOfDataset(ctx context.Context, in *GetEx
|
|||
return out, nil
|
||||
}
|
||||
|
||||
func (c *modelArtsClient) CreateProcessorTask(ctx context.Context, in *CreateProcessorTaskReq, opts ...grpc.CallOption) (*CreateProcessorTaskResp, error) {
|
||||
out := new(CreateProcessorTaskResp)
|
||||
err := c.cc.Invoke(ctx, "/modelarts.ModelArts/CreateProcessorTask", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *modelArtsClient) DescribeProcessorTask(ctx context.Context, in *DescribeProcessorTaskReq, opts ...grpc.CallOption) (*DescribeProcessorTaskResp, error) {
|
||||
out := new(DescribeProcessorTaskResp)
|
||||
err := c.cc.Invoke(ctx, "/modelarts.ModelArts/DescribeProcessorTask", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *modelArtsClient) CreateModel(ctx context.Context, in *CreateModelReq, opts ...grpc.CallOption) (*CreateModelResp, error) {
|
||||
out := new(CreateModelResp)
|
||||
err := c.cc.Invoke(ctx, "/modelarts.ModelArts/CreateModel", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *modelArtsClient) ListModels(ctx context.Context, in *ListModelReq, opts ...grpc.CallOption) (*ListModelResp, error) {
|
||||
out := new(ListModelResp)
|
||||
err := c.cc.Invoke(ctx, "/modelarts.ModelArts/ListModels", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *modelArtsClient) CreateService(ctx context.Context, in *CreatServiceReq, opts ...grpc.CallOption) (*CreatServiceResp, error) {
|
||||
out := new(CreatServiceResp)
|
||||
err := c.cc.Invoke(ctx, "/modelarts.ModelArts/CreateService", in, out, opts...)
|
||||
|
@ -122,18 +186,28 @@ func (c *modelArtsClient) ListServices(ctx context.Context, in *ListServicesReq,
|
|||
// All implementations must embed UnimplementedModelArtsServer
|
||||
// for forward compatibility
|
||||
type ModelArtsServer interface {
|
||||
//get modelarts Token
|
||||
// get modelarts Token
|
||||
GetToken(context.Context, *TokenReq) (*TokenResp, error)
|
||||
//get modelarts Token
|
||||
// get modelarts Token
|
||||
GetDatasetList(context.Context, *DatasetReq) (*DatasetResp, error)
|
||||
//creat task
|
||||
// creat task
|
||||
CreateTask(context.Context, *ImportTaskData) (*ImprotTaskDataReq, error)
|
||||
//find taskList
|
||||
// get taskList
|
||||
GetImportTaskList(context.Context, *ListImportTasks) (*ReturnListImportTasks, error)
|
||||
// get ListTrainingJobs
|
||||
GetListTrainingJobs(context.Context, *ListTrainingJobsreq) (*ListTrainingJobsresp, error)
|
||||
// CreateTrainingJob 创建训练作业
|
||||
CreateTrainingJob(context.Context, *CreateTrainingJobreq) (*CreateTrainingJobresp, error)
|
||||
//export task
|
||||
ExportTask(context.Context, *ExportTaskReq) (*ExportTaskResp, error)
|
||||
GetExportTasksOfDataset(context.Context, *GetExportTasksOfDatasetReq) (*GetExportTasksOfDatasetResp, error)
|
||||
//service management
|
||||
// processor task
|
||||
CreateProcessorTask(context.Context, *CreateProcessorTaskReq) (*CreateProcessorTaskResp, error)
|
||||
DescribeProcessorTask(context.Context, *DescribeProcessorTaskReq) (*DescribeProcessorTaskResp, error)
|
||||
// model management
|
||||
CreateModel(context.Context, *CreateModelReq) (*CreateModelResp, error)
|
||||
ListModels(context.Context, *ListModelReq) (*ListModelResp, error)
|
||||
// service management
|
||||
CreateService(context.Context, *CreatServiceReq) (*CreatServiceResp, error)
|
||||
ListServices(context.Context, *ListServicesReq) (*ListServicesResp, error)
|
||||
mustEmbedUnimplementedModelArtsServer()
|
||||
|
@ -155,12 +229,30 @@ func (UnimplementedModelArtsServer) CreateTask(context.Context, *ImportTaskData)
|
|||
func (UnimplementedModelArtsServer) GetImportTaskList(context.Context, *ListImportTasks) (*ReturnListImportTasks, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetImportTaskList not implemented")
|
||||
}
|
||||
func (UnimplementedModelArtsServer) GetListTrainingJobs(context.Context, *ListTrainingJobsreq) (*ListTrainingJobsresp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetListTrainingJobs not implemented")
|
||||
}
|
||||
func (UnimplementedModelArtsServer) CreateTrainingJob(context.Context, *CreateTrainingJobreq) (*CreateTrainingJobresp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateTrainingJob not implemented")
|
||||
}
|
||||
func (UnimplementedModelArtsServer) ExportTask(context.Context, *ExportTaskReq) (*ExportTaskResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ExportTask not implemented")
|
||||
}
|
||||
func (UnimplementedModelArtsServer) GetExportTasksOfDataset(context.Context, *GetExportTasksOfDatasetReq) (*GetExportTasksOfDatasetResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetExportTasksOfDataset not implemented")
|
||||
}
|
||||
func (UnimplementedModelArtsServer) CreateProcessorTask(context.Context, *CreateProcessorTaskReq) (*CreateProcessorTaskResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateProcessorTask not implemented")
|
||||
}
|
||||
func (UnimplementedModelArtsServer) DescribeProcessorTask(context.Context, *DescribeProcessorTaskReq) (*DescribeProcessorTaskResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DescribeProcessorTask not implemented")
|
||||
}
|
||||
func (UnimplementedModelArtsServer) CreateModel(context.Context, *CreateModelReq) (*CreateModelResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateModel not implemented")
|
||||
}
|
||||
func (UnimplementedModelArtsServer) ListModels(context.Context, *ListModelReq) (*ListModelResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListModels not implemented")
|
||||
}
|
||||
func (UnimplementedModelArtsServer) CreateService(context.Context, *CreatServiceReq) (*CreatServiceResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateService not implemented")
|
||||
}
|
||||
|
@ -252,6 +344,42 @@ func _ModelArts_GetImportTaskList_Handler(srv interface{}, ctx context.Context,
|
|||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ModelArts_GetListTrainingJobs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListTrainingJobsreq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ModelArtsServer).GetListTrainingJobs(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/modelarts.ModelArts/GetListTrainingJobs",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ModelArtsServer).GetListTrainingJobs(ctx, req.(*ListTrainingJobsreq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ModelArts_CreateTrainingJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateTrainingJobreq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ModelArtsServer).CreateTrainingJob(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/modelarts.ModelArts/CreateTrainingJob",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ModelArtsServer).CreateTrainingJob(ctx, req.(*CreateTrainingJobreq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ModelArts_ExportTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ExportTaskReq)
|
||||
if err := dec(in); err != nil {
|
||||
|
@ -288,6 +416,78 @@ func _ModelArts_GetExportTasksOfDataset_Handler(srv interface{}, ctx context.Con
|
|||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ModelArts_CreateProcessorTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateProcessorTaskReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ModelArtsServer).CreateProcessorTask(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/modelarts.ModelArts/CreateProcessorTask",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ModelArtsServer).CreateProcessorTask(ctx, req.(*CreateProcessorTaskReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ModelArts_DescribeProcessorTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DescribeProcessorTaskReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ModelArtsServer).DescribeProcessorTask(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/modelarts.ModelArts/DescribeProcessorTask",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ModelArtsServer).DescribeProcessorTask(ctx, req.(*DescribeProcessorTaskReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ModelArts_CreateModel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateModelReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ModelArtsServer).CreateModel(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/modelarts.ModelArts/CreateModel",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ModelArtsServer).CreateModel(ctx, req.(*CreateModelReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ModelArts_ListModels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListModelReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ModelArtsServer).ListModels(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/modelarts.ModelArts/ListModels",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ModelArtsServer).ListModels(ctx, req.(*ListModelReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ModelArts_CreateService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreatServiceReq)
|
||||
if err := dec(in); err != nil {
|
||||
|
@ -347,6 +547,14 @@ var ModelArts_ServiceDesc = grpc.ServiceDesc{
|
|||
MethodName: "GetImportTaskList",
|
||||
Handler: _ModelArts_GetImportTaskList_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetListTrainingJobs",
|
||||
Handler: _ModelArts_GetListTrainingJobs_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateTrainingJob",
|
||||
Handler: _ModelArts_CreateTrainingJob_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ExportTask",
|
||||
Handler: _ModelArts_ExportTask_Handler,
|
||||
|
@ -355,6 +563,22 @@ var ModelArts_ServiceDesc = grpc.ServiceDesc{
|
|||
MethodName: "GetExportTasksOfDataset",
|
||||
Handler: _ModelArts_GetExportTasksOfDataset_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateProcessorTask",
|
||||
Handler: _ModelArts_CreateProcessorTask_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DescribeProcessorTask",
|
||||
Handler: _ModelArts_DescribeProcessorTask_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateModel",
|
||||
Handler: _ModelArts_CreateModel_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListModels",
|
||||
Handler: _ModelArts_ListModels_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateService",
|
||||
Handler: _ModelArts_CreateService_Handler,
|
||||
|
|
|
@ -13,49 +13,126 @@ import (
|
|||
)
|
||||
|
||||
type (
|
||||
AnnotationFormatConfig = modelarts.AnnotationFormatConfig
|
||||
Auth = modelarts.Auth
|
||||
CreatServiceReq = modelarts.CreatServiceReq
|
||||
CreatServiceResp = modelarts.CreatServiceResp
|
||||
CustomSpec = modelarts.CustomSpec
|
||||
DataSource = modelarts.DataSource
|
||||
DataSources = modelarts.DataSources
|
||||
DatasetReq = modelarts.DatasetReq
|
||||
DatasetResp = modelarts.DatasetResp
|
||||
Datasets = modelarts.Datasets
|
||||
Domain = modelarts.Domain
|
||||
ExportParams = modelarts.ExportParams
|
||||
ExportTaskReq = modelarts.ExportTaskReq
|
||||
ExportTaskResp = modelarts.ExportTaskResp
|
||||
ExportTaskStatus = modelarts.ExportTaskStatus
|
||||
FileStatistics = modelarts.FileStatistics
|
||||
GetExportTasksOfDatasetReq = modelarts.GetExportTasksOfDatasetReq
|
||||
GetExportTasksOfDatasetResp = modelarts.GetExportTasksOfDatasetResp
|
||||
Identity = modelarts.Identity
|
||||
ImportTaskData = modelarts.ImportTaskData
|
||||
ImportTasks = modelarts.ImportTasks
|
||||
ImprotTaskDataReq = modelarts.ImprotTaskDataReq
|
||||
ListImportTasks = modelarts.ListImportTasks
|
||||
ListServices = modelarts.ListServices
|
||||
ListServicesReq = modelarts.ListServicesReq
|
||||
ListServicesResp = modelarts.ListServicesResp
|
||||
Methods = modelarts.Methods
|
||||
Password = modelarts.Password
|
||||
Project = modelarts.Project
|
||||
ReturnListImportTasks = modelarts.ReturnListImportTasks
|
||||
Scheduler = modelarts.Scheduler
|
||||
SchemaMaps = modelarts.SchemaMaps
|
||||
Scope = modelarts.Scope
|
||||
SearchCondition = modelarts.SearchCondition
|
||||
SearchLabel = modelarts.SearchLabel
|
||||
SearchLabels = modelarts.SearchLabels
|
||||
SearchProp = modelarts.SearchProp
|
||||
ServiceConfig = modelarts.ServiceConfig
|
||||
SourceInfo = modelarts.SourceInfo
|
||||
TokenReq = modelarts.TokenReq
|
||||
TokenResp = modelarts.TokenResp
|
||||
User = modelarts.User
|
||||
Weigou = modelarts.Weigou
|
||||
AlgoConfigs = modelarts.AlgoConfigs
|
||||
Algorithm = modelarts.Algorithm
|
||||
Algorithm1 = modelarts.Algorithm1
|
||||
AnnotationFormatConfig = modelarts.AnnotationFormatConfig
|
||||
Annotations1 = modelarts.Annotations1
|
||||
Auth = modelarts.Auth
|
||||
AutoSearch = modelarts.AutoSearch
|
||||
AutoSearchAlgoConfigParameter = modelarts.AutoSearchAlgoConfigParameter
|
||||
Billing = modelarts.Billing
|
||||
Constraint = modelarts.Constraint
|
||||
Constraint1 = modelarts.Constraint1
|
||||
Cpu = modelarts.Cpu
|
||||
CreatServiceReq = modelarts.CreatServiceReq
|
||||
CreatServiceResp = modelarts.CreatServiceResp
|
||||
CreateModelReq = modelarts.CreateModelReq
|
||||
CreateModelRequestInferParams = modelarts.CreateModelRequestInferParams
|
||||
CreateModelRequestModelApis = modelarts.CreateModelRequestModelApis
|
||||
CreateModelRequestTemplateInput = modelarts.CreateModelRequestTemplateInput
|
||||
CreateModelResp = modelarts.CreateModelResp
|
||||
CreateProcessorTaskReq = modelarts.CreateProcessorTaskReq
|
||||
CreateProcessorTaskResp = modelarts.CreateProcessorTaskResp
|
||||
CreateTrainingJobreq = modelarts.CreateTrainingJobreq
|
||||
CreateTrainingJobresp = modelarts.CreateTrainingJobresp
|
||||
CustomSpec = modelarts.CustomSpec
|
||||
DataSource = modelarts.DataSource
|
||||
DataSources = modelarts.DataSources
|
||||
Dataset = modelarts.Dataset
|
||||
DatasetReq = modelarts.DatasetReq
|
||||
DatasetResp = modelarts.DatasetResp
|
||||
Datasets = modelarts.Datasets
|
||||
DescribeProcessorTaskReq = modelarts.DescribeProcessorTaskReq
|
||||
DescribeProcessorTaskResp = modelarts.DescribeProcessorTaskResp
|
||||
Disk = modelarts.Disk
|
||||
Domain = modelarts.Domain
|
||||
Engine = modelarts.Engine
|
||||
Engine1 = modelarts.Engine1
|
||||
ExportParams = modelarts.ExportParams
|
||||
ExportTaskReq = modelarts.ExportTaskReq
|
||||
ExportTaskResp = modelarts.ExportTaskResp
|
||||
ExportTaskStatus = modelarts.ExportTaskStatus
|
||||
FileStatistics = modelarts.FileStatistics
|
||||
FlavorDetail = modelarts.FlavorDetail
|
||||
FlavorInfo = modelarts.FlavorInfo
|
||||
FlavorResponse = modelarts.FlavorResponse
|
||||
GetExportTasksOfDatasetReq = modelarts.GetExportTasksOfDatasetReq
|
||||
GetExportTasksOfDatasetResp = modelarts.GetExportTasksOfDatasetResp
|
||||
Gpu = modelarts.Gpu
|
||||
GuideDoc = modelarts.GuideDoc
|
||||
I18NDescription = modelarts.I18NDescription
|
||||
Identity = modelarts.Identity
|
||||
ImportTaskData = modelarts.ImportTaskData
|
||||
ImportTasks = modelarts.ImportTasks
|
||||
ImprotTaskDataReq = modelarts.ImprotTaskDataReq
|
||||
Input = modelarts.Input
|
||||
InputDataInfo = modelarts.InputDataInfo
|
||||
Inputs = modelarts.Inputs
|
||||
JobAlgorithmResponse = modelarts.JobAlgorithmResponse
|
||||
JobMetadata = modelarts.JobMetadata
|
||||
JobResponse = modelarts.JobResponse
|
||||
ListImportTasks = modelarts.ListImportTasks
|
||||
ListModelReq = modelarts.ListModelReq
|
||||
ListModelResp = modelarts.ListModelResp
|
||||
ListServices = modelarts.ListServices
|
||||
ListServicesReq = modelarts.ListServicesReq
|
||||
ListServicesResp = modelarts.ListServicesResp
|
||||
ListTrainingJobsreq = modelarts.ListTrainingJobsreq
|
||||
ListTrainingJobsresp = modelarts.ListTrainingJobsresp
|
||||
LogExportPath = modelarts.LogExportPath
|
||||
Memory = modelarts.Memory
|
||||
Metadata = modelarts.Metadata
|
||||
Metadata1 = modelarts.Metadata1
|
||||
Methods = modelarts.Methods
|
||||
ModelDependencies = modelarts.ModelDependencies
|
||||
ModelInOutputParams = modelarts.ModelInOutputParams
|
||||
ModelListItem = modelarts.ModelListItem
|
||||
ModelSpecification = modelarts.ModelSpecification
|
||||
Nfs = modelarts.Nfs
|
||||
Npu = modelarts.Npu
|
||||
Obs = modelarts.Obs
|
||||
Obs1 = modelarts.Obs1
|
||||
OperatorParam = modelarts.OperatorParam
|
||||
Output = modelarts.Output
|
||||
Outputs = modelarts.Outputs
|
||||
Packages = modelarts.Packages
|
||||
Parameter = modelarts.Parameter
|
||||
Parameters = modelarts.Parameters
|
||||
Password = modelarts.Password
|
||||
Policies = modelarts.Policies
|
||||
ProcessorDataSource = modelarts.ProcessorDataSource
|
||||
Project = modelarts.Project
|
||||
Remote = modelarts.Remote
|
||||
RemoteConstraint = modelarts.RemoteConstraint
|
||||
Resource = modelarts.Resource
|
||||
Resource1 = modelarts.Resource1
|
||||
ReturnListImportTasks = modelarts.ReturnListImportTasks
|
||||
RewardAttrs = modelarts.RewardAttrs
|
||||
Scheduler = modelarts.Scheduler
|
||||
SchemaMaps = modelarts.SchemaMaps
|
||||
Scope = modelarts.Scope
|
||||
SearchCondition = modelarts.SearchCondition
|
||||
SearchLabel = modelarts.SearchLabel
|
||||
SearchLabels = modelarts.SearchLabels
|
||||
SearchParams = modelarts.SearchParams
|
||||
SearchProp = modelarts.SearchProp
|
||||
ServiceConfig = modelarts.ServiceConfig
|
||||
SourceInfo = modelarts.SourceInfo
|
||||
Spec = modelarts.Spec
|
||||
Spec1 = modelarts.Spec1
|
||||
Status = modelarts.Status
|
||||
TaskResponse = modelarts.TaskResponse
|
||||
TaskStatuses = modelarts.TaskStatuses
|
||||
Template = modelarts.Template
|
||||
TemplateParam = modelarts.TemplateParam
|
||||
TokenReq = modelarts.TokenReq
|
||||
TokenResp = modelarts.TokenResp
|
||||
TrainingExperimentReference = modelarts.TrainingExperimentReference
|
||||
User = modelarts.User
|
||||
Volumes = modelarts.Volumes
|
||||
Weigou = modelarts.Weigou
|
||||
WorkPath = modelarts.WorkPath
|
||||
|
||||
ModelArts interface {
|
||||
// get modelarts Token
|
||||
|
@ -64,11 +141,21 @@ type (
|
|||
GetDatasetList(ctx context.Context, in *DatasetReq, opts ...grpc.CallOption) (*DatasetResp, error)
|
||||
// creat task
|
||||
CreateTask(ctx context.Context, in *ImportTaskData, opts ...grpc.CallOption) (*ImprotTaskDataReq, error)
|
||||
// find taskList
|
||||
// get taskList
|
||||
GetImportTaskList(ctx context.Context, in *ListImportTasks, opts ...grpc.CallOption) (*ReturnListImportTasks, error)
|
||||
// get ListTrainingJobs
|
||||
GetListTrainingJobs(ctx context.Context, in *ListTrainingJobsreq, opts ...grpc.CallOption) (*ListTrainingJobsresp, error)
|
||||
// CreateTrainingJob 创建训练作业
|
||||
CreateTrainingJob(ctx context.Context, in *CreateTrainingJobreq, opts ...grpc.CallOption) (*CreateTrainingJobresp, error)
|
||||
// export task
|
||||
ExportTask(ctx context.Context, in *ExportTaskReq, opts ...grpc.CallOption) (*ExportTaskResp, error)
|
||||
GetExportTasksOfDataset(ctx context.Context, in *GetExportTasksOfDatasetReq, opts ...grpc.CallOption) (*GetExportTasksOfDatasetResp, error)
|
||||
// processor task
|
||||
CreateProcessorTask(ctx context.Context, in *CreateProcessorTaskReq, opts ...grpc.CallOption) (*CreateProcessorTaskResp, error)
|
||||
DescribeProcessorTask(ctx context.Context, in *DescribeProcessorTaskReq, opts ...grpc.CallOption) (*DescribeProcessorTaskResp, error)
|
||||
// model management
|
||||
CreateModel(ctx context.Context, in *CreateModelReq, opts ...grpc.CallOption) (*CreateModelResp, error)
|
||||
ListModels(ctx context.Context, in *ListModelReq, opts ...grpc.CallOption) (*ListModelResp, error)
|
||||
// service management
|
||||
CreateService(ctx context.Context, in *CreatServiceReq, opts ...grpc.CallOption) (*CreatServiceResp, error)
|
||||
ListServices(ctx context.Context, in *ListServicesReq, opts ...grpc.CallOption) (*ListServicesResp, error)
|
||||
|
@ -103,12 +190,24 @@ func (m *defaultModelArts) CreateTask(ctx context.Context, in *ImportTaskData, o
|
|||
return client.CreateTask(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// find taskList
|
||||
// get taskList
|
||||
func (m *defaultModelArts) GetImportTaskList(ctx context.Context, in *ListImportTasks, opts ...grpc.CallOption) (*ReturnListImportTasks, error) {
|
||||
client := modelarts.NewModelArtsClient(m.cli.Conn())
|
||||
return client.GetImportTaskList(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// get ListTrainingJobs
|
||||
func (m *defaultModelArts) GetListTrainingJobs(ctx context.Context, in *ListTrainingJobsreq, opts ...grpc.CallOption) (*ListTrainingJobsresp, error) {
|
||||
client := modelarts.NewModelArtsClient(m.cli.Conn())
|
||||
return client.GetListTrainingJobs(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// CreateTrainingJob 创建训练作业
|
||||
func (m *defaultModelArts) CreateTrainingJob(ctx context.Context, in *CreateTrainingJobreq, opts ...grpc.CallOption) (*CreateTrainingJobresp, error) {
|
||||
client := modelarts.NewModelArtsClient(m.cli.Conn())
|
||||
return client.CreateTrainingJob(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// export task
|
||||
func (m *defaultModelArts) ExportTask(ctx context.Context, in *ExportTaskReq, opts ...grpc.CallOption) (*ExportTaskResp, error) {
|
||||
client := modelarts.NewModelArtsClient(m.cli.Conn())
|
||||
|
@ -120,6 +219,28 @@ func (m *defaultModelArts) GetExportTasksOfDataset(ctx context.Context, in *GetE
|
|||
return client.GetExportTasksOfDataset(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// processor task
|
||||
func (m *defaultModelArts) CreateProcessorTask(ctx context.Context, in *CreateProcessorTaskReq, opts ...grpc.CallOption) (*CreateProcessorTaskResp, error) {
|
||||
client := modelarts.NewModelArtsClient(m.cli.Conn())
|
||||
return client.CreateProcessorTask(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultModelArts) DescribeProcessorTask(ctx context.Context, in *DescribeProcessorTaskReq, opts ...grpc.CallOption) (*DescribeProcessorTaskResp, error) {
|
||||
client := modelarts.NewModelArtsClient(m.cli.Conn())
|
||||
return client.DescribeProcessorTask(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// model management
|
||||
func (m *defaultModelArts) CreateModel(ctx context.Context, in *CreateModelReq, opts ...grpc.CallOption) (*CreateModelResp, error) {
|
||||
client := modelarts.NewModelArtsClient(m.cli.Conn())
|
||||
return client.CreateModel(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultModelArts) ListModels(ctx context.Context, in *ListModelReq, opts ...grpc.CallOption) (*ListModelResp, error) {
|
||||
client := modelarts.NewModelArtsClient(m.cli.Conn())
|
||||
return client.ListModels(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// service management
|
||||
func (m *defaultModelArts) CreateService(ctx context.Context, in *CreatServiceReq, opts ...grpc.CallOption) (*CreatServiceResp, error) {
|
||||
client := modelarts.NewModelArtsClient(m.cli.Conn())
|
||||
|
|
|
@ -751,7 +751,6 @@ message ListServices{
|
|||
|
||||
}
|
||||
|
||||
|
||||
/******************List Services End*************************/
|
||||
|
||||
/******************find datasetList start*************************/
|
||||
|
@ -783,6 +782,233 @@ message DataSources{
|
|||
|
||||
/******************find datasetList end*************************/
|
||||
|
||||
/******************Create Processor Task Start*************************/
|
||||
message CreateProcessorTaskReq{
|
||||
string project_id = 1;
|
||||
bool create_version = 2;
|
||||
ProcessorDataSource data_source = 3;
|
||||
string description = 4;
|
||||
repeated ProcessorDataSource inputs = 5;
|
||||
string name = 6;
|
||||
TemplateParam template = 7;
|
||||
string version_id = 8;
|
||||
WorkPath work_path = 9;
|
||||
string workspace_id = 10;
|
||||
|
||||
}
|
||||
|
||||
message CreateProcessorTaskResp{
|
||||
int32 code = 1; // @gotags: copier:"Code"
|
||||
string task_id = 2;
|
||||
}
|
||||
|
||||
message ProcessorDataSource{
|
||||
string name = 1;
|
||||
string source = 2;
|
||||
string type = 3;
|
||||
string version_id = 4;
|
||||
string version_name = 5;
|
||||
|
||||
}
|
||||
|
||||
message TemplateParam{
|
||||
string id = 1;
|
||||
string name = 2;
|
||||
repeated OperatorParam operator_params = 3;
|
||||
}
|
||||
|
||||
message WorkPath {
|
||||
string name = 1;
|
||||
string output_path = 2;
|
||||
string path = 3;
|
||||
string type = 4;
|
||||
string version_id = 5;
|
||||
string version_name = 6;
|
||||
}
|
||||
|
||||
message OperatorParam {
|
||||
bool advanced_params_switch = 1;
|
||||
string id = 2;
|
||||
string name = 3;
|
||||
string params = 4;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/******************Create Processor Task End*************************/
|
||||
|
||||
/******************Describe Processor Task Start*************************/
|
||||
message DescribeProcessorTaskReq{
|
||||
string project_id = 1;
|
||||
string task_id = 2;
|
||||
}
|
||||
|
||||
message DescribeProcessorTaskResp{
|
||||
int32 code = 1; // @gotags: copier:"Code"
|
||||
string task_id = 2;
|
||||
uint32 create_time = 3;
|
||||
ProcessorDataSource data_source = 4;
|
||||
string description = 5;
|
||||
int32 duration_seconds = 6;
|
||||
string error_msg = 7;
|
||||
repeated ProcessorDataSource inputs = 8;
|
||||
bool is_current = 9;
|
||||
string name = 10;
|
||||
bytes result = 11;
|
||||
int32 status = 12;
|
||||
TemplateParam template = 13;
|
||||
int32 version_count = 14;
|
||||
string version_id = 15;
|
||||
string version_name = 16;
|
||||
WorkPath work_path = 17;
|
||||
string workspace_id = 18;
|
||||
}
|
||||
/******************Describe Processor Task End*************************/
|
||||
|
||||
/******************Create Model Start*************************/
|
||||
message CreateModelReq{
|
||||
string project_id = 1;
|
||||
string task_id = 2;
|
||||
repeated GuideDoc model_docs = 3;
|
||||
Template template = 4;
|
||||
string model_version = 5;
|
||||
string source_job_version = 6;
|
||||
string source_location = 7;
|
||||
string source_copy = 8;
|
||||
string initial_config = 9;
|
||||
string execution_code = 10;
|
||||
string source_job_id = 11;
|
||||
string model_type = 12;
|
||||
repeated CreateModelRequestInferParams output_params = 13;
|
||||
string description = 14;
|
||||
string runtime = 15;
|
||||
string model_metrics = 16;
|
||||
string source_type = 17;
|
||||
repeated ModelDependencies dependencies= 18;
|
||||
string workspace_id = 19;
|
||||
string model_algorithm = 20;
|
||||
repeated CreateModelRequestModelApis apis = 21;
|
||||
string model_name = 22;
|
||||
repeated string install_type = 23;
|
||||
repeated CreateModelRequestInferParams input_params = 24;
|
||||
|
||||
}
|
||||
|
||||
message CreateModelResp{
|
||||
int32 code = 1; // @gotags: copier:"Code"
|
||||
string model_id = 2;
|
||||
}
|
||||
|
||||
message CreateModelRequestInferParams{
|
||||
string protocol = 1;
|
||||
bytes min = 2;
|
||||
string method = 3;
|
||||
bytes max = 4;
|
||||
string param_desc = 5;
|
||||
string param_name = 6;
|
||||
string url = 7;
|
||||
string param_type = 8;
|
||||
}
|
||||
|
||||
message CreateModelRequestModelApis{
|
||||
string protocol = 1;
|
||||
ModelInOutputParams input_params = 2;
|
||||
ModelInOutputParams output_params = 3;
|
||||
string method = 4;
|
||||
string url = 5;
|
||||
}
|
||||
|
||||
message ModelInOutputParams{
|
||||
string type = 1;
|
||||
string properties = 2;
|
||||
}
|
||||
|
||||
|
||||
message CreateModelRequestTemplateInput{
|
||||
string input = 1;
|
||||
string input_id = 2;
|
||||
}
|
||||
|
||||
message Template{
|
||||
string infer_format = 1;
|
||||
repeated CreateModelRequestTemplateInput template_inputs = 2;
|
||||
string template_id = 3;
|
||||
}
|
||||
|
||||
message GuideDoc{
|
||||
string doc_url = 1;
|
||||
string doc_name = 2;
|
||||
}
|
||||
|
||||
message ModelDependencies{
|
||||
string installer = 1;
|
||||
repeated Packages packages = 2;
|
||||
}
|
||||
|
||||
message Packages{
|
||||
string packages_version = 1;
|
||||
string package_name = 2;
|
||||
string restraint = 3;
|
||||
}
|
||||
/******************Create Model End*************************/
|
||||
|
||||
/******************List Model Start*************************/
|
||||
message ListModelReq{
|
||||
string model_name = 2;
|
||||
string project_id = 1;
|
||||
string exact_match = 3;
|
||||
string model_version = 4;
|
||||
string description = 5;
|
||||
int64 offset = 6;
|
||||
int64 limit = 7;
|
||||
string sort_by = 8;
|
||||
string workspace_id = 9;
|
||||
string model_type = 10;
|
||||
string not_model_type = 11;
|
||||
}
|
||||
|
||||
message ListModelResp{
|
||||
int32 code = 1; // @gotags: copier:"Code"
|
||||
int32 total_count = 2;
|
||||
int32 count = 3;
|
||||
repeated ModelListItem models = 4;
|
||||
|
||||
}
|
||||
|
||||
message ModelListItem {
|
||||
string model_name = 1;
|
||||
string model_version = 2;
|
||||
string model_id = 3;
|
||||
string model_type = 4;
|
||||
int32 model_size = 5;
|
||||
string tenant = 6;
|
||||
string project = 7;
|
||||
string owner = 8;
|
||||
uint32 create_at = 9;
|
||||
string description = 10;
|
||||
string workspace_id = 11;
|
||||
ModelSpecification specification = 12;
|
||||
string source_type = 13;
|
||||
string model_source = 14;
|
||||
repeated string install_type = 15;
|
||||
string model_status = 16;
|
||||
bool market_flag = 17;
|
||||
bool tunable = 18;
|
||||
bool publishable_flag = 19;
|
||||
string source_copy = 20;
|
||||
string subscription_id = 21;
|
||||
string extra = 22;
|
||||
|
||||
}
|
||||
|
||||
message ModelSpecification{
|
||||
string min_cpu = 1;
|
||||
string min_gpu = 2;
|
||||
string min_memory = 3;
|
||||
string min_ascend = 4;
|
||||
}
|
||||
/******************List Model End*************************/
|
||||
|
||||
|
||||
// Slurm Services for Shuguang Branch
|
||||
service ModelArts {
|
||||
|
@ -805,6 +1031,14 @@ service ModelArts {
|
|||
rpc ExportTask(ExportTaskReq) returns (ExportTaskResp);
|
||||
rpc GetExportTasksOfDataset(GetExportTasksOfDatasetReq) returns (GetExportTasksOfDatasetResp);
|
||||
|
||||
//processor task
|
||||
rpc CreateProcessorTask(CreateProcessorTaskReq) returns (CreateProcessorTaskResp);
|
||||
rpc DescribeProcessorTask(DescribeProcessorTaskReq) returns (DescribeProcessorTaskResp);
|
||||
|
||||
//model management
|
||||
rpc CreateModel(CreateModelReq) returns (CreateModelResp);
|
||||
rpc ListModels(ListModelReq) returns (ListModelResp);
|
||||
|
||||
//service management
|
||||
rpc CreateService(CreatServiceReq) returns (CreatServiceResp);
|
||||
rpc ListServices(ListServicesReq) returns (ListServicesResp);
|
||||
|
|
Loading…
Reference in New Issue