fit:增加modelarts DeleteDataSet 接口
This commit is contained in:
parent
b75267039e
commit
dd81d1f44b
|
@ -55,6 +55,19 @@ type CreateDataSetResp {
|
|||
}
|
||||
|
||||
/******************Create dataset end*************************/
|
||||
|
||||
/******************Delete dataset start*************************/
|
||||
|
||||
type DeleteDataSetReq {
|
||||
DatasetId string `json:"datasetId"`
|
||||
ProjectId string `json:"projectId"`
|
||||
}
|
||||
|
||||
type DeleteDataSetResp {
|
||||
}
|
||||
|
||||
/******************Delete dataset end*************************/
|
||||
|
||||
/******************ImportTask start*************************/
|
||||
type (
|
||||
ImportTaskDataReq {
|
||||
|
@ -324,4 +337,9 @@ service AICore-api {
|
|||
// CreateTrainingJob 创建训练作业
|
||||
@handler CreateTrainingJobHandler
|
||||
post /CreateTrainingJob (CreateTrainingJobReq) returns (CreateTrainingJobResp)
|
||||
@handler CreateDataSetHandler
|
||||
post /createDataSet (CreateDataSetReq) returns (CreateDataSetResp)
|
||||
@handler DeleteDataSetHandler
|
||||
delete /deleteDataSet (DeleteDataSetReq) returns (DeleteDataSetResp)
|
||||
|
||||
}
|
|
@ -17,15 +17,35 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
|||
Path: "/listDataSet",
|
||||
Handler: listDataSetHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodPost,
|
||||
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: "/CreateTrainingJob",
|
||||
Handler: CreateTrainingJobHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodPost,
|
||||
Path: "/createDataSet",
|
||||
Handler: CreateDataSetHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodPost,
|
||||
Path: "/CreateTask",
|
||||
Handler: CreateTaskHandler(serverCtx),
|
||||
Method: http.MethodDelete,
|
||||
Path: "/deleteDataSet",
|
||||
Handler: DeleteDataSetHandler(serverCtx),
|
||||
},
|
||||
},
|
||||
)
|
||||
|
|
|
@ -38,17 +38,11 @@ func (l *ListDataSetLogic) ListDataSet(req *types.ListDataSetReq) (resp *types.L
|
|||
}
|
||||
resp = &types.ListDataSetResp{}
|
||||
for i := 0; i < len(listDataSetResp.Datasets); i++ {
|
||||
historyJob := types.DataSet{}
|
||||
resp.DataSet = append(resp.DataSet, historyJob)
|
||||
dataset := types.DataSet{}
|
||||
resp.DataSet = append(resp.DataSet, dataset)
|
||||
}
|
||||
|
||||
err = copier.CopyWithOption(&resp, &listDataSetResp, copier.Option{Converters: tool.Converters})
|
||||
/*if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
for i := range resp.DataSet {
|
||||
resp.DataSet[i]. = "modelarts"
|
||||
}*/
|
||||
|
||||
return resp, nil
|
||||
}
|
||||
|
|
|
@ -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,284 @@ type CreateDataSetReq struct {
|
|||
type CreateDataSetResp struct {
|
||||
Dataset_id string `json:"datasetId"`
|
||||
}
|
||||
|
||||
type DeleteDataSetReq struct {
|
||||
DatasetId string `json:"datasetId"`
|
||||
ProjectId string `json:"projectId"`
|
||||
}
|
||||
|
||||
type DeleteDataSetResp struct {
|
||||
}
|
||||
|
||||
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 {
|
||||
}
|
||||
|
|
|
@ -40,6 +40,12 @@ func (s *ModelArtsServer) CreateDataSet(ctx context.Context, in *modelarts.Creat
|
|||
return l.CreateDataSet(in)
|
||||
}
|
||||
|
||||
// create DateSet
|
||||
func (s *ModelArtsServer) DeleteDataSet(ctx context.Context, in *modelarts.DeleteDataSetReq) (*modelarts.DeleteDataSetResq, error) {
|
||||
l := logic.NewDeleteDataSetLogic(ctx, s.svcCtx)
|
||||
return l.DeleteDataSet(in)
|
||||
}
|
||||
|
||||
// creat task 创建导入任务
|
||||
func (s *ModelArtsServer) CreateTask(ctx context.Context, in *modelarts.ImportTaskDataReq) (*modelarts.ImportTaskDataResp, error) {
|
||||
l := logic.NewCreateTaskLogic(ctx, s.svcCtx)
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -22,58 +22,60 @@ 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)
|
||||
// create DateSet
|
||||
//create DateSet
|
||||
CreateDataSet(ctx context.Context, in *CreateDataSetReq, opts ...grpc.CallOption) (*CreateDataSetResq, error)
|
||||
// creat task 创建导入任务
|
||||
//create DateSet
|
||||
DeleteDataSet(ctx context.Context, in *DeleteDataSetReq, opts ...grpc.CallOption) (*DeleteDataSetResq, error)
|
||||
//creat task 创建导入任务
|
||||
CreateTask(ctx context.Context, in *ImportTaskDataReq, opts ...grpc.CallOption) (*ImportTaskDataResp, error)
|
||||
// get taskList 查询数据集导入任务列表
|
||||
//get taskList 查询数据集导入任务列表
|
||||
GetImportTaskList(ctx context.Context, in *ListImportTasksReq, opts ...grpc.CallOption) (*ListImportTasksResp, error)
|
||||
// ListTrainingJobs 查询训练作业列表
|
||||
// ListTrainingJobs 查询训练作业列表
|
||||
GetListTrainingJobs(ctx context.Context, in *ListTrainingJobsreq, opts ...grpc.CallOption) (*ListTrainingJobsresp, error)
|
||||
// CreateTrainingJob 创建训练作业
|
||||
// CreateTrainingJob 创建训练作业
|
||||
CreateTrainingJob(ctx context.Context, in *CreateTrainingJobReq, opts ...grpc.CallOption) (*CreateTrainingJobResp, error)
|
||||
// DeleteTrainingJobConfig 删除训练作业
|
||||
// DeleteTrainingJobConfig 删除训练作业
|
||||
DeleteTrainingJob(ctx context.Context, in *DeleteTrainingJobReq, opts ...grpc.CallOption) (*DeleteTrainingJobResp, error)
|
||||
// CreateTrainingJobConfig 创建训练作业参数
|
||||
// CreateTrainingJobConfig 创建训练作业参数
|
||||
CreateTrainingJobConfig(ctx context.Context, in *CreateTrainingJobConfigReq, opts ...grpc.CallOption) (*CreateTrainingJobConfigResp, error)
|
||||
// DeleteTrainingJobConfig 删除训练作业参数
|
||||
// DeleteTrainingJobConfig 删除训练作业参数
|
||||
DeleteTrainingJobConfig(ctx context.Context, in *DeleteTrainingJobConfigReq, opts ...grpc.CallOption) (*DeleteTrainingJobConfigResp, error)
|
||||
// ListTrainingJobConfig 查询训练作业参数
|
||||
// ListTrainingJobConfig 查询训练作业参数
|
||||
ListTrainingJobConfig(ctx context.Context, in *ListTrainingJobConfigReq, opts ...grpc.CallOption) (*ListTrainingJobConfigResp, error)
|
||||
// CreateAlgorithm 创建算法
|
||||
// CreateAlgorithm 创建算法
|
||||
CreateAlgorithm(ctx context.Context, in *CreateAlgorithmReq, opts ...grpc.CallOption) (*CreateAlgorithmResp, error)
|
||||
// ListAlgorithms 查询算法
|
||||
// ListAlgorithms 查询算法
|
||||
ListAlgorithms(ctx context.Context, in *ListAlgorithmsReq, opts ...grpc.CallOption) (*ListAlgorithmsResp, 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)
|
||||
GetExportTaskStatusOfDataset(ctx context.Context, in *GetExportTaskStatusOfDatasetReq, opts ...grpc.CallOption) (*GetExportTaskStatusOfDatasetResp, error)
|
||||
// processor task
|
||||
//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
|
||||
//model management
|
||||
CreateModel(ctx context.Context, in *CreateModelReq, opts ...grpc.CallOption) (*CreateModelResp, error)
|
||||
DeleteModel(ctx context.Context, in *DeleteModelReq, opts ...grpc.CallOption) (*DeleteModelResp, error)
|
||||
ListModels(ctx context.Context, in *ListModelReq, opts ...grpc.CallOption) (*ListModelResp, error)
|
||||
ShowModels(ctx context.Context, in *ShowModelReq, opts ...grpc.CallOption) (*ShowModelResp, error)
|
||||
// service management
|
||||
//service management
|
||||
CreateService(ctx context.Context, in *CreateServiceReq, opts ...grpc.CallOption) (*CreateServiceResp, error)
|
||||
ListServices(ctx context.Context, in *ListServicesReq, opts ...grpc.CallOption) (*ListServicesResp, error)
|
||||
ShowService(ctx context.Context, in *ShowServiceReq, opts ...grpc.CallOption) (*ShowServiceResp, error)
|
||||
DeleteService(ctx context.Context, in *DeleteServiceReq, opts ...grpc.CallOption) (*DeleteServiceResp, error)
|
||||
ListClusters(ctx context.Context, in *ListClustersReq, opts ...grpc.CallOption) (*ListClustersResp, error)
|
||||
// notebook task
|
||||
//notebook task
|
||||
ListNotebook(ctx context.Context, in *ListNotebookReq, opts ...grpc.CallOption) (*ListNotebookResp, error)
|
||||
CreateNotebook(ctx context.Context, in *CreateNotebookReq, opts ...grpc.CallOption) (*CreateNotebookResp, error)
|
||||
StartNotebook(ctx context.Context, in *StartNotebookReq, opts ...grpc.CallOption) (*StartNotebookResp, error)
|
||||
StopNotebook(ctx context.Context, in *StopNotebookReq, opts ...grpc.CallOption) (*StopNotebookResp, error)
|
||||
GetNotebookStorage(ctx context.Context, in *GetNotebookStorageReq, opts ...grpc.CallOption) (*GetNotebookStorageResp, error)
|
||||
MountNotebookStorage(ctx context.Context, in *MountNotebookStorageReq, opts ...grpc.CallOption) (*MountNotebookStorageResp, error)
|
||||
// visualization-jobs
|
||||
//visualization-jobs
|
||||
GetVisualizationJob(ctx context.Context, in *GetVisualizationJobReq, opts ...grpc.CallOption) (*GetVisualizationJobResp, error)
|
||||
CreateVisualizationJob(ctx context.Context, in *CreateVisualizationJobReq, opts ...grpc.CallOption) (*CreateVisualizationJobResp, error)
|
||||
}
|
||||
|
@ -113,6 +115,15 @@ func (c *modelArtsClient) CreateDataSet(ctx context.Context, in *CreateDataSetRe
|
|||
return out, nil
|
||||
}
|
||||
|
||||
func (c *modelArtsClient) DeleteDataSet(ctx context.Context, in *DeleteDataSetReq, opts ...grpc.CallOption) (*DeleteDataSetResq, error) {
|
||||
out := new(DeleteDataSetResq)
|
||||
err := c.cc.Invoke(ctx, "/modelarts.ModelArts/DeleteDataSet", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *modelArtsClient) CreateTask(ctx context.Context, in *ImportTaskDataReq, opts ...grpc.CallOption) (*ImportTaskDataResp, error) {
|
||||
out := new(ImportTaskDataResp)
|
||||
err := c.cc.Invoke(ctx, "/modelarts.ModelArts/createTask", in, out, opts...)
|
||||
|
@ -405,58 +416,60 @@ func (c *modelArtsClient) CreateVisualizationJob(ctx context.Context, in *Create
|
|||
// 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)
|
||||
// create DateSet
|
||||
//create DateSet
|
||||
CreateDataSet(context.Context, *CreateDataSetReq) (*CreateDataSetResq, error)
|
||||
// creat task 创建导入任务
|
||||
//create DateSet
|
||||
DeleteDataSet(context.Context, *DeleteDataSetReq) (*DeleteDataSetResq, error)
|
||||
//creat task 创建导入任务
|
||||
CreateTask(context.Context, *ImportTaskDataReq) (*ImportTaskDataResp, error)
|
||||
// get taskList 查询数据集导入任务列表
|
||||
//get taskList 查询数据集导入任务列表
|
||||
GetImportTaskList(context.Context, *ListImportTasksReq) (*ListImportTasksResp, error)
|
||||
// ListTrainingJobs 查询训练作业列表
|
||||
// ListTrainingJobs 查询训练作业列表
|
||||
GetListTrainingJobs(context.Context, *ListTrainingJobsreq) (*ListTrainingJobsresp, error)
|
||||
// CreateTrainingJob 创建训练作业
|
||||
// CreateTrainingJob 创建训练作业
|
||||
CreateTrainingJob(context.Context, *CreateTrainingJobReq) (*CreateTrainingJobResp, error)
|
||||
// DeleteTrainingJobConfig 删除训练作业
|
||||
// DeleteTrainingJobConfig 删除训练作业
|
||||
DeleteTrainingJob(context.Context, *DeleteTrainingJobReq) (*DeleteTrainingJobResp, error)
|
||||
// CreateTrainingJobConfig 创建训练作业参数
|
||||
// CreateTrainingJobConfig 创建训练作业参数
|
||||
CreateTrainingJobConfig(context.Context, *CreateTrainingJobConfigReq) (*CreateTrainingJobConfigResp, error)
|
||||
// DeleteTrainingJobConfig 删除训练作业参数
|
||||
// DeleteTrainingJobConfig 删除训练作业参数
|
||||
DeleteTrainingJobConfig(context.Context, *DeleteTrainingJobConfigReq) (*DeleteTrainingJobConfigResp, error)
|
||||
// ListTrainingJobConfig 查询训练作业参数
|
||||
// ListTrainingJobConfig 查询训练作业参数
|
||||
ListTrainingJobConfig(context.Context, *ListTrainingJobConfigReq) (*ListTrainingJobConfigResp, error)
|
||||
// CreateAlgorithm 创建算法
|
||||
// CreateAlgorithm 创建算法
|
||||
CreateAlgorithm(context.Context, *CreateAlgorithmReq) (*CreateAlgorithmResp, error)
|
||||
// ListAlgorithms 查询算法
|
||||
// ListAlgorithms 查询算法
|
||||
ListAlgorithms(context.Context, *ListAlgorithmsReq) (*ListAlgorithmsResp, error)
|
||||
//export task
|
||||
ExportTask(context.Context, *ExportTaskReq) (*ExportTaskResp, error)
|
||||
GetExportTasksOfDataset(context.Context, *GetExportTasksOfDatasetReq) (*GetExportTasksOfDatasetResp, error)
|
||||
GetExportTaskStatusOfDataset(context.Context, *GetExportTaskStatusOfDatasetReq) (*GetExportTaskStatusOfDatasetResp, error)
|
||||
// processor task
|
||||
//processor task
|
||||
CreateProcessorTask(context.Context, *CreateProcessorTaskReq) (*CreateProcessorTaskResp, error)
|
||||
DescribeProcessorTask(context.Context, *DescribeProcessorTaskReq) (*DescribeProcessorTaskResp, error)
|
||||
// model management
|
||||
//model management
|
||||
CreateModel(context.Context, *CreateModelReq) (*CreateModelResp, error)
|
||||
DeleteModel(context.Context, *DeleteModelReq) (*DeleteModelResp, error)
|
||||
ListModels(context.Context, *ListModelReq) (*ListModelResp, error)
|
||||
ShowModels(context.Context, *ShowModelReq) (*ShowModelResp, error)
|
||||
// service management
|
||||
//service management
|
||||
CreateService(context.Context, *CreateServiceReq) (*CreateServiceResp, error)
|
||||
ListServices(context.Context, *ListServicesReq) (*ListServicesResp, error)
|
||||
ShowService(context.Context, *ShowServiceReq) (*ShowServiceResp, error)
|
||||
DeleteService(context.Context, *DeleteServiceReq) (*DeleteServiceResp, error)
|
||||
ListClusters(context.Context, *ListClustersReq) (*ListClustersResp, error)
|
||||
// notebook task
|
||||
//notebook task
|
||||
ListNotebook(context.Context, *ListNotebookReq) (*ListNotebookResp, error)
|
||||
CreateNotebook(context.Context, *CreateNotebookReq) (*CreateNotebookResp, error)
|
||||
StartNotebook(context.Context, *StartNotebookReq) (*StartNotebookResp, error)
|
||||
StopNotebook(context.Context, *StopNotebookReq) (*StopNotebookResp, error)
|
||||
GetNotebookStorage(context.Context, *GetNotebookStorageReq) (*GetNotebookStorageResp, error)
|
||||
MountNotebookStorage(context.Context, *MountNotebookStorageReq) (*MountNotebookStorageResp, error)
|
||||
// visualization-jobs
|
||||
//visualization-jobs
|
||||
GetVisualizationJob(context.Context, *GetVisualizationJobReq) (*GetVisualizationJobResp, error)
|
||||
CreateVisualizationJob(context.Context, *CreateVisualizationJobReq) (*CreateVisualizationJobResp, error)
|
||||
mustEmbedUnimplementedModelArtsServer()
|
||||
|
@ -475,6 +488,9 @@ func (UnimplementedModelArtsServer) GetDatasetList(context.Context, *DatasetReq)
|
|||
func (UnimplementedModelArtsServer) CreateDataSet(context.Context, *CreateDataSetReq) (*CreateDataSetResq, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateDataSet not implemented")
|
||||
}
|
||||
func (UnimplementedModelArtsServer) DeleteDataSet(context.Context, *DeleteDataSetReq) (*DeleteDataSetResq, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteDataSet not implemented")
|
||||
}
|
||||
func (UnimplementedModelArtsServer) CreateTask(context.Context, *ImportTaskDataReq) (*ImportTaskDataResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateTask not implemented")
|
||||
}
|
||||
|
@ -638,6 +654,24 @@ func _ModelArts_CreateDataSet_Handler(srv interface{}, ctx context.Context, dec
|
|||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ModelArts_DeleteDataSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteDataSetReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ModelArtsServer).DeleteDataSet(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/modelarts.ModelArts/DeleteDataSet",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ModelArtsServer).DeleteDataSet(ctx, req.(*DeleteDataSetReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ModelArts_CreateTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ImportTaskDataReq)
|
||||
if err := dec(in); err != nil {
|
||||
|
@ -1233,6 +1267,10 @@ var ModelArts_ServiceDesc = grpc.ServiceDesc{
|
|||
MethodName: "CreateDataSet",
|
||||
Handler: _ModelArts_CreateDataSet_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteDataSet",
|
||||
Handler: _ModelArts_DeleteDataSet_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "createTask",
|
||||
Handler: _ModelArts_CreateTask_Handler,
|
||||
|
|
|
@ -69,6 +69,8 @@ type (
|
|||
DatasetReq = modelarts.DatasetReq
|
||||
DatasetResp = modelarts.DatasetResp
|
||||
Datasets = modelarts.Datasets
|
||||
DeleteDataSetReq = modelarts.DeleteDataSetReq
|
||||
DeleteDataSetResq = modelarts.DeleteDataSetResq
|
||||
DeleteModelReq = modelarts.DeleteModelReq
|
||||
DeleteModelResp = modelarts.DeleteModelResp
|
||||
DeleteModelResponseFailedList = modelarts.DeleteModelResponseFailedList
|
||||
|
@ -235,6 +237,8 @@ type (
|
|||
GetDatasetList(ctx context.Context, in *DatasetReq, opts ...grpc.CallOption) (*DatasetResp, error)
|
||||
// create DateSet
|
||||
CreateDataSet(ctx context.Context, in *CreateDataSetReq, opts ...grpc.CallOption) (*CreateDataSetResq, error)
|
||||
// create DateSet
|
||||
DeleteDataSet(ctx context.Context, in *DeleteDataSetReq, opts ...grpc.CallOption) (*DeleteDataSetResq, error)
|
||||
// creat task 创建导入任务
|
||||
CreateTask(ctx context.Context, in *ImportTaskDataReq, opts ...grpc.CallOption) (*ImportTaskDataResp, error)
|
||||
// get taskList 查询数据集导入任务列表
|
||||
|
@ -314,6 +318,12 @@ func (m *defaultModelArts) CreateDataSet(ctx context.Context, in *CreateDataSetR
|
|||
return client.CreateDataSet(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// create DateSet
|
||||
func (m *defaultModelArts) DeleteDataSet(ctx context.Context, in *DeleteDataSetReq, opts ...grpc.CallOption) (*DeleteDataSetResq, error) {
|
||||
client := modelarts.NewModelArtsClient(m.cli.Conn())
|
||||
return client.DeleteDataSet(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// creat task 创建导入任务
|
||||
func (m *defaultModelArts) CreateTask(ctx context.Context, in *ImportTaskDataReq, opts ...grpc.CallOption) (*ImportTaskDataResp, error) {
|
||||
client := modelarts.NewModelArtsClient(m.cli.Conn())
|
||||
|
|
|
@ -1541,6 +1541,17 @@ message CreateDataSetResq{
|
|||
}
|
||||
/******************create dataset end*************************/
|
||||
|
||||
/******************create dataset start*************************/
|
||||
message DeleteDataSetReq {
|
||||
string project_id = 1; // @gotags: copier:"ProjectId"
|
||||
string dataset_id = 2; // @gotags: copier:"DatasetId"
|
||||
}
|
||||
|
||||
message DeleteDataSetResq{
|
||||
|
||||
}
|
||||
/******************create dataset end*************************/
|
||||
|
||||
/******************Notebook Start*************************/
|
||||
message ListNotebookReq{
|
||||
string project_id = 1;
|
||||
|
@ -1813,6 +1824,8 @@ service ModelArts {
|
|||
rpc GetDatasetList(datasetReq) returns (datasetResp);
|
||||
//create DateSet
|
||||
rpc CreateDataSet(CreateDataSetReq) returns (CreateDataSetResq);
|
||||
//create DateSet
|
||||
rpc DeleteDataSet(DeleteDataSetReq) returns (DeleteDataSetResq);
|
||||
|
||||
//creat task 创建导入任务
|
||||
rpc createTask(ImportTaskDataReq) returns(ImportTaskDataResp);
|
||||
|
|
Loading…
Reference in New Issue