From d60d51e623c7137f26ff482cc19dc7a7873a5fca Mon Sep 17 00:00:00 2001 From: tzwang Date: Mon, 6 Mar 2023 16:37:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0AICore=20notebook=20types?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adaptor/AIComputing/AICore/api/AICore.api | 104 +++++ .../internal/handler/listnotebookhandler.go | 28 ++ .../AICore/api/internal/handler/routes.go | 23 +- .../api/internal/logic/listnotebooklogic.go | 30 ++ .../AICore/api/internal/types/types.go | 385 +++++++++++++++++- .../modelarts/rpc/modelarts/modelarts.pb.go | 144 +++---- .../modelarts/rpc/pb/modelarts.proto | 144 +++---- 7 files changed, 700 insertions(+), 158 deletions(-) create mode 100644 adaptor/AIComputing/AICore/api/internal/handler/listnotebookhandler.go create mode 100644 adaptor/AIComputing/AICore/api/internal/logic/listnotebooklogic.go diff --git a/adaptor/AIComputing/AICore/api/AICore.api b/adaptor/AIComputing/AICore/api/AICore.api index d3cfc44..aed3076 100644 --- a/adaptor/AIComputing/AICore/api/AICore.api +++ b/adaptor/AIComputing/AICore/api/AICore.api @@ -308,6 +308,104 @@ type ( } ) /******************CreateTrainingJob end*************************/ + +/******************Notebook Type start*************************/ +type ( + ListNotebookReq { + Project_id string `json:"project_id"` + Param ListNotebookParam `json:"param"` + } + ListNotebookResp { + Current int32 `json:"current"` + Data []NotebookResp `json:"data"` + Pages int32 `json:"pages"` + Size int32 `json:"size"` + Total int64 `json:"total"` + } + ListNotebookParam { + Feature string `json:"feature"` + Limit int32 `json:"limit"` + Name string `json:"name"` + Pool_id string `json:"pool_id"` + Offset int32 `json:"offset"` + Owner string `json:"owner"` + Sort_dir string `json:"sort_dir"` + Sort_key string `json:"sort_key"` + Status string `json:"status"` + WorkspaceId string `json:"workspaceId"` + } + NotebookResp { + Action_progress []JobProgress `json:"action_progress"` + Description string `json:"description"` + Endpoints []EndpointsRes `json:"endpoints"` + Fail_reason string `json:"fail_reason"` + Flavor string `json:"flavor"` + Id string `json:"id"` + Image Image `json:"image"` + Lease Lease `json:"lease"` + Name string `json:"name"` + Pool Pool `json:"pool"` + Status string `json:"status"` + Token string `json:"token"` + Url string `json:"url"` + Volume VolumeRes `json:"volume"` + Workspace_id string `json:"workspace_id"` + Feature string `json:"feature"` + } + JobProgress { + Notebook_id string `json:"notebook_id"` + Status string `json:"status"` + Step int32 `json:"step"` + Step_description string `json:"step_description"` + } + EndpointsRes { + Allowed_access_ips []string `json:"allowed_access_ips"` + Dev_service string `json:"dev_service"` + Ssh_keys []string `json:"ssh_keys"` + } + Image { + Arch string `json:"arch"` + Create_at int64 `json:"create_at"` + Description string `json:"description"` + Dev_services []string `json:"dev_services"` + Id string `json:"id"` + Name string `json:"name"` + Namespace string `json:"namespace"` + Origin string `json:"origin"` + Resource_categories []string `json:"resource_categories"` + Service_type string `json:"service_type"` + Size int64 `json:"size"` + Status string `json:"status"` + Status_message string `json:"status_message"` + Support_res_categories []string `json:"support_res_categories"` + Swr_path string `json:"swr_path"` + Tag string `json:"tag"` + Type_image string `json:"type"` + Update_at int64 `json:"update_at"` + Visibility string `json:"visibility"` + Workspace_id string `json:"workspace_id"` + } + Lease { + Create_at int64 `json:"create_at"` + Duration int64 `json:"duration"` + Enable bool `json:"enable"` + Type_lease string `json:"type"` + Update_at int64 `json:"update_at"` + } + Pool { + Id string `json:"id"` + Name string `json:"name"` + } + VolumeRes { + Capacity int64 `json:"capacity"` + Category string `json:"category"` + Mount_path string `json:"mount_path"` + Ownership string `json:"ownership"` + Status string `json:"status"` + } +) +/******************Notebook Type end*************************/ + service AICore-api { @handler listDataSetHandler @@ -324,4 +422,10 @@ service AICore-api { // CreateTrainingJob 创建训练作业 @handler CreateTrainingJobHandler post /CreateTrainingJob (CreateTrainingJobReq) returns (CreateTrainingJobResp) + + /******************Notebook Method start*************************/ + @handler listNotebookHandler + get /listNotebook (ListNotebookReq) returns (ListNotebookResp) + + /******************Notebook Method end*************************/ } \ No newline at end of file diff --git a/adaptor/AIComputing/AICore/api/internal/handler/listnotebookhandler.go b/adaptor/AIComputing/AICore/api/internal/handler/listnotebookhandler.go new file mode 100644 index 0000000..fef5dfb --- /dev/null +++ b/adaptor/AIComputing/AICore/api/internal/handler/listnotebookhandler.go @@ -0,0 +1,28 @@ +package handler + +import ( + "net/http" + + "PCM/adaptor/AIComputing/AICore/api/internal/logic" + "PCM/adaptor/AIComputing/AICore/api/internal/svc" + "PCM/adaptor/AIComputing/AICore/api/internal/types" + "github.com/zeromicro/go-zero/rest/httpx" +) + +func listNotebookHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + var req types.ListNotebookReq + if err := httpx.Parse(r, &req); err != nil { + httpx.ErrorCtx(r.Context(), w, err) + return + } + + l := logic.NewListNotebookLogic(r.Context(), svcCtx) + resp, err := l.ListNotebook(&req) + if err != nil { + httpx.ErrorCtx(r.Context(), w, err) + } else { + httpx.OkJsonCtx(r.Context(), w, resp) + } + } +} diff --git a/adaptor/AIComputing/AICore/api/internal/handler/routes.go b/adaptor/AIComputing/AICore/api/internal/handler/routes.go index 414caba..718f46e 100644 --- a/adaptor/AIComputing/AICore/api/internal/handler/routes.go +++ b/adaptor/AIComputing/AICore/api/internal/handler/routes.go @@ -19,13 +19,28 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { }, { Method: http.MethodPost, - Path: "/createDataSet", - Handler: CreateDataSetHandler(serverCtx), + Path: "/CreateTask", + Handler: CreateTaskHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/ListImport", + Handler: ListImportHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/GetListTrainingJobs", + Handler: GetListTrainingJobsHandler(serverCtx), }, { Method: http.MethodPost, - Path: "/CreateTask", - Handler: CreateTaskHandler(serverCtx), + Path: "/CreateTrainingJob", + Handler: CreateTrainingJobHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/listNotebook", + Handler: listNotebookHandler(serverCtx), }, }, ) diff --git a/adaptor/AIComputing/AICore/api/internal/logic/listnotebooklogic.go b/adaptor/AIComputing/AICore/api/internal/logic/listnotebooklogic.go new file mode 100644 index 0000000..eed626b --- /dev/null +++ b/adaptor/AIComputing/AICore/api/internal/logic/listnotebooklogic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "PCM/adaptor/AIComputing/AICore/api/internal/svc" + "PCM/adaptor/AIComputing/AICore/api/internal/types" + + "github.com/zeromicro/go-zero/core/logx" +) + +type ListNotebookLogic struct { + logx.Logger + ctx context.Context + svcCtx *svc.ServiceContext +} + +func NewListNotebookLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListNotebookLogic { + return &ListNotebookLogic{ + Logger: logx.WithContext(ctx), + ctx: ctx, + svcCtx: svcCtx, + } +} + +func (l *ListNotebookLogic) ListNotebook(req *types.ListNotebookReq) (resp *types.ListNotebookResp, err error) { + // todo: add your logic here and delete this line + + return +} diff --git a/adaptor/AIComputing/AICore/api/internal/types/types.go b/adaptor/AIComputing/AICore/api/internal/types/types.go index 4291a05..4fbf4c6 100644 --- a/adaptor/AIComputing/AICore/api/internal/types/types.go +++ b/adaptor/AIComputing/AICore/api/internal/types/types.go @@ -27,16 +27,6 @@ type ListDataSetResp struct { DataSet []DataSet `json:"dataSets"` } -type ImportTaskDataReq struct { - ProjectId string `json:"projectId"` - DatasetId string `json:"datasetId"` - ImportPath string `json:"importPath"` -} - -type ImportTaskDataResp struct { - TaskId string `json:"TaskId"` -} - type CreateDataSetReq struct { DatasetId string `json:"datasetId"` DatasetType int32 `json:"datasetType"` @@ -51,3 +41,378 @@ type CreateDataSetReq struct { type CreateDataSetResp struct { Dataset_id string `json:"datasetId"` } + +type ImportTaskDataReq struct { + ProjectId string `json:"projectId"` + DatasetId string `json:"datasetId"` + ImportPath string `json:"importPath"` +} + +type ImportTaskDataResp struct { + TaskId string `json:"taskId"` +} + +type ListImportTasksReq struct { + ProjectId string `json:"projectId"` + DatasetId string `json:"datasetId"` + Limit int32 `json:"limit,optional"` + Offset int32 `json:"offset,optional"` +} + +type ListImportTasksResp struct { + TotalCount uint32 `json:"totalCount"` + ImportTasks []ImportTasks `json:"importTasks"` +} + +type ImportTasks struct { + Status string `json:"status,omitempty"` + TaskId string `json:"task_id,omitempty"` + DatasetId string `json:"dataset_id,omitempty"` + ImportPath string `json:"import_path,omitempty"` + ImportType int32 `json:"import_type,omitempty"` + TotalSampleCount uint32 `json:"total_sample_count,omitempty"` + ImportedSampleCount uint32 `json:"imported_sample_count,omitempty"` + AnnotatedSampleCount uint32 `json:"annotated_sample_count,omitempty"` + TotalSubSampleCount uint32 `json:"total_sub_sample_count,omitempty"` + ImportedSubSampleCount uint32 `json:"imported_sub_sample_count,omitempty"` + TotalFileSize uint32 `json:"total_file_size,omitempty"` + FinishedFileCount uint32 `json:"finished_file_count,omitempty"` + FinishedFileSize uint32 `json:"finished_file_size,omitempty"` + TotalFileCount uint32 `json:"total_file_count,omitempty"` + CreateTime uint32 `json:"create_time,omitempty"` + ElapsedTime uint32 `json:"elapsed_time,omitempty"` + AnnotationFormatConfig []interface{} `json:"annotation_format_config"` +} + +type Annotations struct { + JobTemplate string `json:"job_template"` + KeyTask string `json:"key_task"` +} + +type TrainingExperimentReference struct { +} + +type Metadata struct { + ID string `json:"id"` + Name string `json:"name"` + Description string `json:"description"` + CreateTime uint32 `json:"create_time"` + WorkspaceID string `json:"workspace_id"` + AiProject string `json:"ai_project"` + UserName string `json:"user_name"` + Annotations Annotations `json:"annotations"` + TrainingExperimentReference TrainingExperimentReference `json:"training_experiment_reference"` + Tags []interface{} `json:"tags"` +} + +type CPUUsage struct { + Average int32 `json:"average"` + Max int32 `json:"max"` + Min int32 `json:"min"` +} + +type MemUsage struct { + Average int32 `json:"average"` + Max int32 `json:"max"` + Min int32 `json:"min"` +} + +type Util struct { + Average int32 `json:"average"` + Max int32 `json:"max"` + Min int32 `json:"min"` +} + +type Gpu struct { + MemUsage MemUsage `json:"mem_usage"` + Util Util `json:"util"` + UnitNum int32 `json:"unit_num"` + ProductName string `json:"product_name"` + Memory string `json:"memory"` +} + +type MetricsStatistics struct { + CPUUsage CPUUsage `json:"cpu_usage"` + Gpu Gpu `json:"gpu"` + MemUsage MemUsage `json:"mem_usage"` +} + +type Status struct { + Phase string `json:"phase"` + SecondaryPhase string `json:"secondary_phase"` + Duration int32 `json:"duration"` + IsHanged bool `json:"is_hanged"` + RetryCount int32 `json:"retry_count"` + StartTime int32 `json:"start_time"` + Tasks []string `json:"tasks"` + MetricsStatistics MetricsStatistics `json:"metrics_statistics"` +} + +type Constraint struct { + Type string `json:"type"` + Editable bool `json:"editable"` + Required bool `json:"required"` + Sensitive bool `json:"sensitive"` + ValidType string `json:"valid_type"` + ValidRange interface{} `json:"valid_range"` +} + +type Parameters struct { + Name string `json:"name"` + Description string `json:"description"` + I18NDescription interface{} `json:"i18n_description"` + Value string `json:"value"` + Constraint Constraint `json:"constraint"` +} + +type Obs struct { + ObsURL string `json:"obs_url"` +} + +type Remote struct { + Obs Obs `json:"obs"` +} + +type Attributes struct { + DataFormat []string `json:"data_format"` + DataSegmentation []string `json:"data_segmentation"` + DatasetType []string `json:"dataset_type"` + IsFree string `json:"is_free"` + MaxFreeJobCount string `json:"max_free_job_count"` +} + +type RemoteConstraints struct { + DataType string `json:"data_type"` + Attributes Attributes `json:"attributes,omitempty"` +} + +type Inputs struct { + Name string `json:"name"` + Description string `json:"description"` + LocalDir string `json:"local_dir"` + AccessMethod string `json:"access_method"` + Remote Remote `json:"remote"` + RemoteConstraints []RemoteConstraints `json:"remote_constraints"` +} + +type Outputs struct { + Name string `json:"name"` + LocalDir string `json:"local_dir"` + AccessMethod string `json:"access_method"` + Remote Remote `json:"remote"` + Mode string `json:"mode"` + Period int32 `json:"period"` + PrefetchToLocal bool `json:"prefetch_to_local"` +} + +type Engine struct { + EngineID string `json:"engine_id"` + EngineName string `json:"engine_name"` + EngineVersion string `json:"engine_version"` + V1Compatible bool `json:"v1_compatible"` + RunUser string `json:"run_user"` + ImageSource bool `json:"image_source"` +} + +type Policies struct { +} + +type Algorithm struct { + ID string `json:"id"` + Name string `json:"name"` + V1Algorithm bool `json:"v1_algorithm"` + SubscriptionID string `json:"subscription_id"` + ItemVersionID string `json:"item_version_id"` + ContentID string `json:"content_id"` + Parameters []Parameters `json:"parameters"` + ParametersCustomization bool `json:"parameters_customization"` + Inputs []Inputs `json:"inputs"` + Outputs []Outputs `json:"outputs"` + Engine Engine `json:"engine"` + Policies Policies `json:"policies"` +} + +type Billing struct { + Code string `json:"code"` + UnitNum int32 `json:"unit_num"` +} + +type CPU struct { + Arch string `json:"arch"` + CoreNum int32 `json:"core_num"` +} + +type Memory struct { + Size int `json:"size"` + Unit string `json:"unit"` +} + +type Disk struct { + Size int32 `json:"size"` + Unit string `json:"unit"` +} + +type FlavorInfo struct { + CPU CPU `json:"cpu"` + Gpu Gpu `json:"gpu"` + Memory Memory `json:"memory"` + Disk Disk `json:"disk"` +} + +type FlavorDetail struct { + FlavorType string `json:"flavor_type"` + Billing Billing `json:"billing"` + Attributes Attributes `json:"attributes"` + FlavorInfo FlavorInfo `json:"flavor_info"` +} + +type Resource struct { + Policy string `json:"policy"` + FlavorID string `json:"flavor_id"` + FlavorName string `json:"flavor_name"` + NodeCount int32 `json:"node_count"` + FlavorDetail FlavorDetail `json:"flavor_detail"` +} + +type LogExportPath struct { +} + +type Spec struct { + Resource Resource `json:"resource"` + LogExportPath LogExportPath `json:"log_export_path"` + IsHostedLog bool `json:"is_hosted_log"` +} + +type Items struct { + Kind string `json:"kind"` + Metadata Metadata `json:"metadata"` + Status Status `json:"status"` + Algorithm Algorithm `json:"algorithm,omitempty"` + Spec Spec `json:"spec"` +} + +type ListTrainingJobsreq struct { + ProjectId string `json:"projectId"` +} + +type ListTrainingJobsresp struct { + Total int32 `json:"total"` + Count int32 `json:"count"` + Limit int32 `json:"limit"` + Offset int32 `json:"offset"` + SortBy string `json:"sort_by"` + Order string `json:"order"` + GroupBy string `json:"group_by"` + WorkspaceID string `json:"workspace_id"` + AiProject string `json:"ai_project"` + Items []Items `json:"items"` +} + +type CreateTrainingJobReq struct { + ProjectId string `json:"projectId"` +} + +type CreateTrainingJobResp struct { +} + +type ListNotebookReq struct { + Project_id string `json:"project_id"` + Param ListNotebookParam `json:"param"` +} + +type ListNotebookResp struct { + Current int32 `json:"current"` + Data []NotebookResp `json:"data"` + Pages int32 `json:"pages"` + Size int32 `json:"size"` + Total int64 `json:"total"` +} + +type ListNotebookParam struct { + Feature string `json:"feature"` + Limit int32 `json:"limit"` + Name string `json:"name"` + Pool_id string `json:"pool_id"` + Offset int32 `json:"offset"` + Owner string `json:"owner"` + Sort_dir string `json:"sort_dir"` + Sort_key string `json:"sort_key"` + Status string `json:"status"` + WorkspaceId string `json:"workspaceId"` +} + +type NotebookResp struct { + Action_progress []JobProgress `json:"action_progress"` + Description string `json:"description"` + Endpoints []EndpointsRes `json:"endpoints"` + Fail_reason string `json:"fail_reason"` + Flavor string `json:"flavor"` + Id string `json:"id"` + Image Image `json:"image"` + Lease Lease `json:"lease"` + Name string `json:"name"` + Pool Pool `json:"pool"` + Status string `json:"status"` + Token string `json:"token"` + Url string `json:"url"` + Volume VolumeRes `json:"volume"` + Workspace_id string `json:"workspace_id"` + Feature string `json:"feature"` +} + +type JobProgress struct { + Notebook_id string `json:"notebook_id"` + Status string `json:"status"` + Step int32 `json:"step"` + Step_description string `json:"step_description"` +} + +type EndpointsRes struct { + Allowed_access_ips []string `json:"allowed_access_ips"` + Dev_service string `json:"dev_service"` + Ssh_keys []string `json:"ssh_keys"` +} + +type Image struct { + Arch string `json:"arch"` + Create_at int64 `json:"create_at"` + Description string `json:"description"` + Dev_services []string `json:"dev_services"` + Id string `json:"id"` + Name string `json:"name"` + Namespace string `json:"namespace"` + Origin string `json:"origin"` + Resource_categories []string `json:"resource_categories"` + Service_type string `json:"service_type"` + Size int64 `json:"size"` + Status string `json:"status"` + Status_message string `json:"status_message"` + Support_res_categories []string `json:"support_res_categories"` + Swr_path string `json:"swr_path"` + Tag string `json:"tag"` + Type_image string `json:"type"` + Update_at int64 `json:"update_at"` + Visibility string `json:"visibility"` + Workspace_id string `json:"workspace_id"` +} + +type Lease struct { + Create_at int64 `json:"create_at"` + Duration int64 `json:"duration"` + Enable bool `json:"enable"` + Type_lease string `json:"type"` + Update_at int64 `json:"update_at"` +} + +type Pool struct { + Id string `json:"id"` + Name string `json:"name"` +} + +type VolumeRes struct { + Capacity int64 `json:"capacity"` + Category string `json:"category"` + Mount_path string `json:"mount_path"` + Ownership string `json:"ownership"` + Status string `json:"status"` +} diff --git a/adaptor/AIComputing/modelarts/rpc/modelarts/modelarts.pb.go b/adaptor/AIComputing/modelarts/rpc/modelarts/modelarts.pb.go index e90a6f6..1136dc0 100644 --- a/adaptor/AIComputing/modelarts/rpc/modelarts/modelarts.pb.go +++ b/adaptor/AIComputing/modelarts/rpc/modelarts/modelarts.pb.go @@ -14620,8 +14620,8 @@ type ListNotebookReq struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - Param *ListNotebookParam `protobuf:"bytes,2,opt,name=param,proto3" json:"param,omitempty"` + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` // @gotags: copier:"project_id" + Param *ListNotebookParam `protobuf:"bytes,2,opt,name=param,proto3" json:"param,omitempty"` // @gotags: copier:"param" } func (x *ListNotebookReq) Reset() { @@ -14675,11 +14675,11 @@ type ListNotebookResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Current int32 `protobuf:"varint,1,opt,name=current,proto3" json:"current,omitempty"` - Data []*NotebookResp `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"` - Pages int32 `protobuf:"varint,3,opt,name=pages,proto3" json:"pages,omitempty"` - Size int32 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"` - Total int64 `protobuf:"varint,5,opt,name=total,proto3" json:"total,omitempty"` + Current int32 `protobuf:"varint,1,opt,name=current,proto3" json:"current,omitempty"` // @gotags: copier:"current" + Data []*NotebookResp `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"` // @gotags: copier:"data" + Pages int32 `protobuf:"varint,3,opt,name=pages,proto3" json:"pages,omitempty"` // @gotags: copier:"pages" + Size int32 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"` // @gotags: copier:"size" + Total int64 `protobuf:"varint,5,opt,name=total,proto3" json:"total,omitempty"` // @gotags: copier:"total" } func (x *ListNotebookResp) Reset() { @@ -14754,16 +14754,16 @@ type ListNotebookParam struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Feature string `protobuf:"bytes,1,opt,name=feature,proto3" json:"feature,omitempty"` - Limit int32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - PoolId string `protobuf:"bytes,4,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` - Offset int32 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"` - Owner string `protobuf:"bytes,6,opt,name=owner,proto3" json:"owner,omitempty"` - SortDir string `protobuf:"bytes,7,opt,name=sort_dir,json=sortDir,proto3" json:"sort_dir,omitempty"` - SortKey string `protobuf:"bytes,8,opt,name=sort_key,json=sortKey,proto3" json:"sort_key,omitempty"` - Status string `protobuf:"bytes,9,opt,name=status,proto3" json:"status,omitempty"` - WorkspaceId string `protobuf:"bytes,10,opt,name=workspaceId,proto3" json:"workspaceId,omitempty"` + Feature string `protobuf:"bytes,1,opt,name=feature,proto3" json:"feature,omitempty"` // @gotags: copier:"feature" + Limit int32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` // @gotags: copier:"limit" + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // @gotags: copier:"name" + PoolId string `protobuf:"bytes,4,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` // @gotags: copier:"pool_id" + Offset int32 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"` // @gotags: copier:"offset" + Owner string `protobuf:"bytes,6,opt,name=owner,proto3" json:"owner,omitempty"` // @gotags: copier:"owner" + SortDir string `protobuf:"bytes,7,opt,name=sort_dir,json=sortDir,proto3" json:"sort_dir,omitempty"` // @gotags: copier:"sort_dir" + SortKey string `protobuf:"bytes,8,opt,name=sort_key,json=sortKey,proto3" json:"sort_key,omitempty"` // @gotags: copier:"sort_key" + Status string `protobuf:"bytes,9,opt,name=status,proto3" json:"status,omitempty"` // @gotags: copier:"status" + WorkspaceId string `protobuf:"bytes,10,opt,name=workspaceId,proto3" json:"workspaceId,omitempty"` // @gotags: copier:"workspaceId" } func (x *ListNotebookParam) Reset() { @@ -15795,22 +15795,22 @@ type NotebookResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ActionProgress []*JobProgress `protobuf:"bytes,1,rep,name=action_progress,json=actionProgress,proto3" json:"action_progress,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - Endpoints []*EndpointsRes `protobuf:"bytes,3,rep,name=endpoints,proto3" json:"endpoints,omitempty"` - FailReason string `protobuf:"bytes,4,opt,name=fail_reason,json=failReason,proto3" json:"fail_reason,omitempty"` - Flavor string `protobuf:"bytes,5,opt,name=flavor,proto3" json:"flavor,omitempty"` - Id string `protobuf:"bytes,6,opt,name=id,proto3" json:"id,omitempty"` - Image *Image `protobuf:"bytes,7,opt,name=image,proto3" json:"image,omitempty"` - Lease *Lease `protobuf:"bytes,8,opt,name=lease,proto3" json:"lease,omitempty"` - Name string `protobuf:"bytes,9,opt,name=name,proto3" json:"name,omitempty"` - Pool *Pool `protobuf:"bytes,10,opt,name=pool,proto3" json:"pool,omitempty"` - Status string `protobuf:"bytes,11,opt,name=status,proto3" json:"status,omitempty"` - Token string `protobuf:"bytes,12,opt,name=token,proto3" json:"token,omitempty"` - Url string `protobuf:"bytes,13,opt,name=url,proto3" json:"url,omitempty"` - Volume *VolumeRes `protobuf:"bytes,14,opt,name=volume,proto3" json:"volume,omitempty"` - WorkspaceId string `protobuf:"bytes,15,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` - Feature string `protobuf:"bytes,16,opt,name=feature,proto3" json:"feature,omitempty"` + ActionProgress []*JobProgress `protobuf:"bytes,1,rep,name=action_progress,json=actionProgress,proto3" json:"action_progress,omitempty"` // @gotags: copier:"action_progress" + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` // @gotags: copier:"description" + Endpoints []*EndpointsRes `protobuf:"bytes,3,rep,name=endpoints,proto3" json:"endpoints,omitempty"` // @gotags: copier:"endpoints" + FailReason string `protobuf:"bytes,4,opt,name=fail_reason,json=failReason,proto3" json:"fail_reason,omitempty"` // @gotags: copier:"fail_reason" + Flavor string `protobuf:"bytes,5,opt,name=flavor,proto3" json:"flavor,omitempty"` // @gotags: copier:"flavor" + Id string `protobuf:"bytes,6,opt,name=id,proto3" json:"id,omitempty"` // @gotags: copier:"id" + Image *Image `protobuf:"bytes,7,opt,name=image,proto3" json:"image,omitempty"` // @gotags: copier:"image" + Lease *Lease `protobuf:"bytes,8,opt,name=lease,proto3" json:"lease,omitempty"` // @gotags: copier:"lease" + Name string `protobuf:"bytes,9,opt,name=name,proto3" json:"name,omitempty"` // @gotags: copier:"name" + Pool *Pool `protobuf:"bytes,10,opt,name=pool,proto3" json:"pool,omitempty"` // @gotags: copier:"pool" + Status string `protobuf:"bytes,11,opt,name=status,proto3" json:"status,omitempty"` // @gotags: copier:"status" + Token string `protobuf:"bytes,12,opt,name=token,proto3" json:"token,omitempty"` // @gotags: copier:"token" + Url string `protobuf:"bytes,13,opt,name=url,proto3" json:"url,omitempty"` // @gotags: copier:"url" + Volume *VolumeRes `protobuf:"bytes,14,opt,name=volume,proto3" json:"volume,omitempty"` // @gotags: copier:"volume" + WorkspaceId string `protobuf:"bytes,15,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` // @gotags: copier:"workspace_id" + Feature string `protobuf:"bytes,16,opt,name=feature,proto3" json:"feature,omitempty"` // @gotags: copier:"feature" } func (x *NotebookResp) Reset() { @@ -15962,10 +15962,10 @@ type JobProgress struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - NotebookId string `protobuf:"bytes,1,opt,name=notebook_id,json=notebookId,proto3" json:"notebook_id,omitempty"` - Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` - Step int32 `protobuf:"varint,3,opt,name=step,proto3" json:"step,omitempty"` - StepDescription string `protobuf:"bytes,4,opt,name=step_description,json=stepDescription,proto3" json:"step_description,omitempty"` + NotebookId string `protobuf:"bytes,1,opt,name=notebook_id,json=notebookId,proto3" json:"notebook_id,omitempty"` // @gotags: copier:"notebook_id" + Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` // @gotags: copier:"status" + Step int32 `protobuf:"varint,3,opt,name=step,proto3" json:"step,omitempty"` // @gotags: copier:"step" + StepDescription string `protobuf:"bytes,4,opt,name=step_description,json=stepDescription,proto3" json:"step_description,omitempty"` // @gotags: copier:"step_description" } func (x *JobProgress) Reset() { @@ -16033,9 +16033,9 @@ type EndpointsRes struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - AllowedAccessIps []string `protobuf:"bytes,1,rep,name=allowed_access_ips,json=allowedAccessIps,proto3" json:"allowed_access_ips,omitempty"` - DevService string `protobuf:"bytes,2,opt,name=dev_service,json=devService,proto3" json:"dev_service,omitempty"` - SshKeys []string `protobuf:"bytes,3,rep,name=ssh_keys,json=sshKeys,proto3" json:"ssh_keys,omitempty"` + AllowedAccessIps []string `protobuf:"bytes,1,rep,name=allowed_access_ips,json=allowedAccessIps,proto3" json:"allowed_access_ips,omitempty"` // @gotags: copier:"allowed_access_ips" + DevService string `protobuf:"bytes,2,opt,name=dev_service,json=devService,proto3" json:"dev_service,omitempty"` // @gotags: copier:"dev_service" + SshKeys []string `protobuf:"bytes,3,rep,name=ssh_keys,json=sshKeys,proto3" json:"ssh_keys,omitempty"` // @gotags: copier:"ssh_keys" } func (x *EndpointsRes) Reset() { @@ -16096,26 +16096,26 @@ type Image struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Arch string `protobuf:"bytes,1,opt,name=arch,proto3" json:"arch,omitempty"` - CreateAt int64 `protobuf:"varint,2,opt,name=create_at,json=createAt,proto3" json:"create_at,omitempty"` - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - DevServices []string `protobuf:"bytes,4,rep,name=dev_services,json=devServices,proto3" json:"dev_services,omitempty"` - Id string `protobuf:"bytes,5,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` - Namespace string `protobuf:"bytes,7,opt,name=namespace,proto3" json:"namespace,omitempty"` - Origin string `protobuf:"bytes,8,opt,name=origin,proto3" json:"origin,omitempty"` - ResourceCategories []string `protobuf:"bytes,9,rep,name=resource_categories,json=resourceCategories,proto3" json:"resource_categories,omitempty"` - ServiceType string `protobuf:"bytes,10,opt,name=service_type,json=serviceType,proto3" json:"service_type,omitempty"` - Size int64 `protobuf:"varint,11,opt,name=size,proto3" json:"size,omitempty"` - Status string `protobuf:"bytes,12,opt,name=status,proto3" json:"status,omitempty"` - StatusMessage string `protobuf:"bytes,13,opt,name=status_message,json=statusMessage,proto3" json:"status_message,omitempty"` - SupportResCategories []string `protobuf:"bytes,14,rep,name=support_res_categories,json=supportResCategories,proto3" json:"support_res_categories,omitempty"` - SwrPath string `protobuf:"bytes,15,opt,name=swr_path,json=swrPath,proto3" json:"swr_path,omitempty"` - Tag string `protobuf:"bytes,16,opt,name=tag,proto3" json:"tag,omitempty"` - Type string `protobuf:"bytes,17,opt,name=type,proto3" json:"type,omitempty"` - UpdateAt int64 `protobuf:"varint,18,opt,name=update_at,json=updateAt,proto3" json:"update_at,omitempty"` - Visibility string `protobuf:"bytes,19,opt,name=visibility,proto3" json:"visibility,omitempty"` - WorkspaceId string `protobuf:"bytes,20,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` + Arch string `protobuf:"bytes,1,opt,name=arch,proto3" json:"arch,omitempty"` // @gotags: copier:"arch" + CreateAt int64 `protobuf:"varint,2,opt,name=create_at,json=createAt,proto3" json:"create_at,omitempty"` // @gotags: copier:"create_at" + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` // @gotags: copier:"description" + DevServices []string `protobuf:"bytes,4,rep,name=dev_services,json=devServices,proto3" json:"dev_services,omitempty"` // @gotags: copier:"dev_services" + Id string `protobuf:"bytes,5,opt,name=id,proto3" json:"id,omitempty"` // @gotags: copier:"id" + Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` // @gotags: copier:"name" + Namespace string `protobuf:"bytes,7,opt,name=namespace,proto3" json:"namespace,omitempty"` // @gotags: copier:"namespace" + Origin string `protobuf:"bytes,8,opt,name=origin,proto3" json:"origin,omitempty"` // @gotags: copier:"origin" + ResourceCategories []string `protobuf:"bytes,9,rep,name=resource_categories,json=resourceCategories,proto3" json:"resource_categories,omitempty"` // @gotags: copier:"resource_categories" + ServiceType string `protobuf:"bytes,10,opt,name=service_type,json=serviceType,proto3" json:"service_type,omitempty"` // @gotags: copier:"service_type" + Size int64 `protobuf:"varint,11,opt,name=size,proto3" json:"size,omitempty"` // @gotags: copier:"size" + Status string `protobuf:"bytes,12,opt,name=status,proto3" json:"status,omitempty"` // @gotags: copier:"status" + StatusMessage string `protobuf:"bytes,13,opt,name=status_message,json=statusMessage,proto3" json:"status_message,omitempty"` // @gotags: copier:"status_message" + SupportResCategories []string `protobuf:"bytes,14,rep,name=support_res_categories,json=supportResCategories,proto3" json:"support_res_categories,omitempty"` // @gotags: copier:"support_res_categories" + SwrPath string `protobuf:"bytes,15,opt,name=swr_path,json=swrPath,proto3" json:"swr_path,omitempty"` // @gotags: copier:"swr_path" + Tag string `protobuf:"bytes,16,opt,name=tag,proto3" json:"tag,omitempty"` // @gotags: copier:"tag" + Type string `protobuf:"bytes,17,opt,name=type,proto3" json:"type,omitempty"` // @gotags: copier:"type_image" + UpdateAt int64 `protobuf:"varint,18,opt,name=update_at,json=updateAt,proto3" json:"update_at,omitempty"` // @gotags: copier:"update_at" + Visibility string `protobuf:"bytes,19,opt,name=visibility,proto3" json:"visibility,omitempty"` // @gotags: copier:"visibility" + WorkspaceId string `protobuf:"bytes,20,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` // @gotags: copier:"workspace_id" } func (x *Image) Reset() { @@ -16295,11 +16295,11 @@ type Lease struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - CreateAt int64 `protobuf:"varint,1,opt,name=create_at,json=createAt,proto3" json:"create_at,omitempty"` - Duration int64 `protobuf:"varint,2,opt,name=duration,proto3" json:"duration,omitempty"` - Enable bool `protobuf:"varint,3,opt,name=enable,proto3" json:"enable,omitempty"` - Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` - UpdateAt int64 `protobuf:"varint,5,opt,name=update_at,json=updateAt,proto3" json:"update_at,omitempty"` + CreateAt int64 `protobuf:"varint,1,opt,name=create_at,json=createAt,proto3" json:"create_at,omitempty"` // @gotags: copier:"create_at" + Duration int64 `protobuf:"varint,2,opt,name=duration,proto3" json:"duration,omitempty"` // @gotags: copier:"duration" + Enable bool `protobuf:"varint,3,opt,name=enable,proto3" json:"enable,omitempty"` // @gotags: copier:"enable" + Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` // @gotags: copier:"type_lease" + UpdateAt int64 `protobuf:"varint,5,opt,name=update_at,json=updateAt,proto3" json:"update_at,omitempty"` // @gotags: copier:"update_at" } func (x *Lease) Reset() { @@ -16374,8 +16374,8 @@ type Pool struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // @gotags: copier:"id" + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // @gotags: copier:"name" } func (x *Pool) Reset() { @@ -16429,11 +16429,11 @@ type VolumeRes struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Capacity int64 `protobuf:"varint,1,opt,name=capacity,proto3" json:"capacity,omitempty"` - Category string `protobuf:"bytes,2,opt,name=category,proto3" json:"category,omitempty"` - MountPath string `protobuf:"bytes,3,opt,name=mount_path,json=mountPath,proto3" json:"mount_path,omitempty"` - Ownership string `protobuf:"bytes,4,opt,name=ownership,proto3" json:"ownership,omitempty"` - Status string `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` + Capacity int64 `protobuf:"varint,1,opt,name=capacity,proto3" json:"capacity,omitempty"` // @gotags: copier:"capacity" + Category string `protobuf:"bytes,2,opt,name=category,proto3" json:"category,omitempty"` // @gotags: copier:"category" + MountPath string `protobuf:"bytes,3,opt,name=mount_path,json=mountPath,proto3" json:"mount_path,omitempty"` // @gotags: copier:"mount_path" + Ownership string `protobuf:"bytes,4,opt,name=ownership,proto3" json:"ownership,omitempty"` // @gotags: copier:"ownership" + Status string `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` // @gotags: copier:"status" } func (x *VolumeRes) Reset() { diff --git a/adaptor/AIComputing/modelarts/rpc/pb/modelarts.proto b/adaptor/AIComputing/modelarts/rpc/pb/modelarts.proto index 41eb034..ce1ec6c 100644 --- a/adaptor/AIComputing/modelarts/rpc/pb/modelarts.proto +++ b/adaptor/AIComputing/modelarts/rpc/pb/modelarts.proto @@ -1543,27 +1543,27 @@ message CreateDataSetResq{ /******************Notebook Start*************************/ message ListNotebookReq{ - string project_id = 1; - ListNotebookParam param = 2; + string project_id = 1; // @gotags: copier:"project_id" + ListNotebookParam param = 2; // @gotags: copier:"param" } message ListNotebookResp{ - int32 current = 1; - repeated NotebookResp data = 2; - int32 pages = 3; - int32 size = 4; - int64 total = 5; + int32 current = 1; // @gotags: copier:"current" + repeated NotebookResp data = 2; // @gotags: copier:"data" + int32 pages = 3; // @gotags: copier:"pages" + int32 size = 4; // @gotags: copier:"size" + int64 total = 5; // @gotags: copier:"total" } message ListNotebookParam{ - string feature = 1; - int32 limit = 2; - string name = 3; - string pool_id = 4; - int32 offset = 5; - string owner = 6; - string sort_dir = 7; - string sort_key = 8; - string status = 9; - string workspaceId = 10; + string feature = 1; // @gotags: copier:"feature" + int32 limit = 2; // @gotags: copier:"limit" + string name = 3; // @gotags: copier:"name" + string pool_id = 4; // @gotags: copier:"pool_id" + int32 offset = 5; // @gotags: copier:"offset" + string owner = 6; // @gotags: copier:"owner" + string sort_dir = 7; // @gotags: copier:"sort_dir" + string sort_key = 8; // @gotags: copier:"sort_key" + string status = 9; // @gotags: copier:"status" + string workspaceId = 10; // @gotags: copier:"workspaceId" } message CreateNotebookReq{ @@ -1649,73 +1649,73 @@ message DataVolumesRes{ } message NotebookResp{ - repeated JobProgress action_progress = 1; - string description = 2; - repeated EndpointsRes endpoints = 3; - string fail_reason = 4; - string flavor = 5; - string id = 6; - Image image = 7; - Lease lease = 8; - string name = 9; - Pool pool = 10; - string status = 11; - string token = 12; - string url = 13; - VolumeRes volume = 14; - string workspace_id = 15; - string feature = 16; + repeated JobProgress action_progress = 1; // @gotags: copier:"action_progress" + string description = 2; // @gotags: copier:"description" + repeated EndpointsRes endpoints = 3; // @gotags: copier:"endpoints" + string fail_reason = 4; // @gotags: copier:"fail_reason" + string flavor = 5; // @gotags: copier:"flavor" + string id = 6; // @gotags: copier:"id" + Image image = 7; // @gotags: copier:"image" + Lease lease = 8; // @gotags: copier:"lease" + string name = 9; // @gotags: copier:"name" + Pool pool = 10; // @gotags: copier:"pool" + string status = 11; // @gotags: copier:"status" + string token = 12; // @gotags: copier:"token" + string url = 13; // @gotags: copier:"url" + VolumeRes volume = 14; // @gotags: copier:"volume" + string workspace_id = 15; // @gotags: copier:"workspace_id" + string feature = 16; // @gotags: copier:"feature" } message JobProgress{ - string notebook_id = 1; - string status = 2; - int32 step = 3; - string step_description = 4; + string notebook_id = 1; // @gotags: copier:"notebook_id" + string status = 2; // @gotags: copier:"status" + int32 step = 3; // @gotags: copier:"step" + string step_description = 4; // @gotags: copier:"step_description" } message EndpointsRes{ - repeated string allowed_access_ips = 1; - string dev_service = 2; - repeated string ssh_keys = 3; + repeated string allowed_access_ips = 1; // @gotags: copier:"allowed_access_ips" + string dev_service = 2; // @gotags: copier:"dev_service" + repeated string ssh_keys = 3; // @gotags: copier:"ssh_keys" } message Image{ - string arch = 1; - int64 create_at = 2; - string description = 3; - repeated string dev_services = 4; - string id = 5; - string name = 6; - string namespace = 7; - string origin = 8; - repeated string resource_categories = 9; - string service_type = 10; - int64 size = 11; - string status = 12; - string status_message = 13; - repeated string support_res_categories = 14; - string swr_path = 15; - string tag = 16; - string type = 17; - int64 update_at = 18; - string visibility = 19; - string workspace_id = 20; + string arch = 1; // @gotags: copier:"arch" + int64 create_at = 2; // @gotags: copier:"create_at" + string description = 3; // @gotags: copier:"description" + repeated string dev_services = 4; // @gotags: copier:"dev_services" + string id = 5; // @gotags: copier:"id" + string name = 6; // @gotags: copier:"name" + string namespace = 7; // @gotags: copier:"namespace" + string origin = 8; // @gotags: copier:"origin" + repeated string resource_categories = 9; // @gotags: copier:"resource_categories" + string service_type = 10; // @gotags: copier:"service_type" + int64 size = 11; // @gotags: copier:"size" + string status = 12; // @gotags: copier:"status" + string status_message = 13; // @gotags: copier:"status_message" + repeated string support_res_categories = 14; // @gotags: copier:"support_res_categories" + string swr_path = 15; // @gotags: copier:"swr_path" + string tag = 16; // @gotags: copier:"tag" + string type = 17; // @gotags: copier:"type_image" + int64 update_at = 18; // @gotags: copier:"update_at" + string visibility = 19; // @gotags: copier:"visibility" + string workspace_id = 20; // @gotags: copier:"workspace_id" } message Lease{ - int64 create_at = 1; - int64 duration = 2; - bool enable = 3; - string type = 4; - int64 update_at = 5; + int64 create_at = 1; // @gotags: copier:"create_at" + int64 duration = 2; // @gotags: copier:"duration" + bool enable = 3; // @gotags: copier:"enable" + string type = 4; // @gotags: copier:"type_lease" + int64 update_at = 5; // @gotags: copier:"update_at" } message Pool{ - string id = 1; - string name = 2; + string id = 1; // @gotags: copier:"id" + string name = 2; // @gotags: copier:"name" } message VolumeRes{ - int64 capacity = 1; - string category = 2; - string mount_path = 3; - string ownership = 4; - string status = 5; + int64 capacity = 1; // @gotags: copier:"capacity" + string category = 2; // @gotags: copier:"category" + string mount_path = 3; // @gotags: copier:"mount_path" + string ownership = 4; // @gotags: copier:"ownership" + string status = 5; // @gotags: copier:"status" } message EndpointsReq{ repeated string allowed_access_ips = 1;