查询、导入任务合并分支
This commit is contained in:
parent
5df5ab1d87
commit
c5cc1e982c
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -165,6 +165,147 @@ message File_statistics{
|
||||||
|
|
||||||
/******************Job End*************************/
|
/******************Job End*************************/
|
||||||
|
|
||||||
|
/******************Task(export) Start*************************/
|
||||||
|
message ExportTaskReq{
|
||||||
|
string annotation_format = 1; //标注格式
|
||||||
|
int64 export_format = 2; //导出的目录格式
|
||||||
|
ExportParams export_params = 3; //导出数据集任务的参数
|
||||||
|
int32 export_type = 4; //导出类型
|
||||||
|
string path = 5; //导出到OBS的输出路径
|
||||||
|
string sample_state = 6; //样本状态
|
||||||
|
string source_type_header = 7; //指定导出标注文件中的OBS路径前缀
|
||||||
|
int32 status = 8; //任务状态
|
||||||
|
string task_id = 9; //任务ID
|
||||||
|
string version_format = 10; //数据集版本格式
|
||||||
|
string version_id = 11; //数据集版本ID
|
||||||
|
bool with_column_header = 12; //导出时是否将列名写到CSV文件的第一行,对于表格数据集有效
|
||||||
|
string dataset_id = 13; //数据集ID
|
||||||
|
string project_id = 14; //用户项目ID
|
||||||
|
}
|
||||||
|
|
||||||
|
message ExportTaskResp{
|
||||||
|
uint32 create_time = 1; //任务创建时间
|
||||||
|
string error_code = 2; //错误信息
|
||||||
|
string error_msg = 3; //导出的目录格式
|
||||||
|
int64 export_format = 4; //导出数据集任务的参数
|
||||||
|
ExportParams export_params = 5; //导出类型
|
||||||
|
int32 finished_sample_count = 6; //已完成的样本数量
|
||||||
|
string path = 7; //导出的输出路径
|
||||||
|
float progress = 8; //任务当前进度百分比
|
||||||
|
string status = 9; //任务状态
|
||||||
|
string task_id = 10; //任务ID
|
||||||
|
int64 total_sample_count = 11; //样本总数量
|
||||||
|
uint32 update_time = 12; //任务更新时间
|
||||||
|
string version_format = 13; //数据集版本格式
|
||||||
|
string version_id = 14; //数据集版本ID
|
||||||
|
int32 code = 15; // @gotags: copier:"Code"
|
||||||
|
}
|
||||||
|
|
||||||
|
message ExportParams{
|
||||||
|
bool clear_hard_property = 1; //是否清空难例属性
|
||||||
|
string export_dataset_version_format = 2; //导出数据集版本的格式
|
||||||
|
string export_dataset_version_name = 3; //导出数据集版本的名称。
|
||||||
|
string export_dest = 4; //导出的目的地
|
||||||
|
string export_new_dataset_work_name = 5; //导出新数据集的名称
|
||||||
|
string export_new_dataset_work_path = 6; //导出新数据集的工作目录
|
||||||
|
bool ratio_sample_usage = 7; //指定切分比例后,是否按指定比例随机分配训练-验证集
|
||||||
|
string sample_state = 8; //样本状态
|
||||||
|
repeated string sample = 9; //导出的样本ID列表
|
||||||
|
repeated SearchCondition search_conditions = 10; //导出的筛选条件,多个条件之间是或(OR)关系。
|
||||||
|
string train_sample_ratio = 11; //指定发布版本时训练集-验证集的切分比例,
|
||||||
|
}
|
||||||
|
|
||||||
|
message SearchCondition {
|
||||||
|
string coefficient = 1; //根据难度系数筛选。
|
||||||
|
int64 frame_in_video = 2; //视频中某帧
|
||||||
|
string hard = 3; //样本级别是否难例。
|
||||||
|
string import_origin = 4; //根据数据来源筛选
|
||||||
|
string kvp = 5; //CT剂量,通过剂量来筛选
|
||||||
|
SearchLabels label_list = 6; //标签搜索条件
|
||||||
|
string labeler = 7; //标注人
|
||||||
|
SearchProp metadata = 8; //通过样本属性搜索
|
||||||
|
string parent_sample_id = 9; //父样本ID
|
||||||
|
string sample_dir = 10; //根据样本所在目录搜索
|
||||||
|
string sample_name = 11; //根据样本名称搜索
|
||||||
|
string sample_time = 12; //样本加入到数据集时,会根据样本在OBS上的最后修改时间(精确到天)建立索引,此处可以根据此时间进行搜索。
|
||||||
|
string score = 13; //根据置信度筛选
|
||||||
|
string slice_thickness = 14; //DICOM层厚,通过层厚筛选样本
|
||||||
|
string study_date = 15; //DICOM扫描时间
|
||||||
|
string time_in_video = 16; //视频中某个时间
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
message SearchLabels {
|
||||||
|
repeated SearchLabel labels = 1; //标签搜索条件列表
|
||||||
|
string op = 2; //如要搜索多个标签,则op需要有值;如果只搜索一个标签,则无需指定op的值。
|
||||||
|
}
|
||||||
|
|
||||||
|
message weigou{
|
||||||
|
repeated string aaa = 1;
|
||||||
|
}
|
||||||
|
message SearchLabel {
|
||||||
|
string name = 1; //标签名
|
||||||
|
string op = 2; //多个属性之间的操作类型
|
||||||
|
map<string,weigou> property = 3; //标签属性,是Object格式,存放任意的键值对;key是属性名称,value是取值列表,
|
||||||
|
int64 type = 4; //标签类型
|
||||||
|
}
|
||||||
|
|
||||||
|
message SearchProp {
|
||||||
|
string op = 1; //多个属性值之间的关系
|
||||||
|
map<string,weigou> props = 2; //属性的搜索条件,可以有多个属性条件
|
||||||
|
}
|
||||||
|
/******************Task(export) End*************************/
|
||||||
|
|
||||||
|
/******************Get Export Tasks Of Dataset Start*************************/
|
||||||
|
message GetExportTasksOfDatasetReq{
|
||||||
|
string dataset_id = 1;
|
||||||
|
string project_id = 2;
|
||||||
|
int32 export_type = 3;
|
||||||
|
int32 limit = 4;
|
||||||
|
int32 offset = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetExportTasksOfDatasetResp{
|
||||||
|
uint32 code = 1; // @gotags: copier:"Code"
|
||||||
|
uint32 create_time = 2;
|
||||||
|
string error_code = 3;
|
||||||
|
string error_msg = 4;
|
||||||
|
int32 export_format = 5;
|
||||||
|
ExportParams export_params = 6;
|
||||||
|
repeated ExportTaskStatus export_tasks = 7;
|
||||||
|
int32 export_type = 8;
|
||||||
|
int32 finished_sample_count = 9;
|
||||||
|
string path = 10;
|
||||||
|
float progress = 11;
|
||||||
|
string status = 12;
|
||||||
|
string task_id = 13;
|
||||||
|
int64 total_count = 14;
|
||||||
|
int64 total_sample = 15;
|
||||||
|
uint32 update_time = 16;
|
||||||
|
string version_format = 17;
|
||||||
|
string version_id = 18;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ExportTaskStatus {
|
||||||
|
uint32 code = 1;
|
||||||
|
uint32 create_time = 2;
|
||||||
|
string error_code = 3;
|
||||||
|
string error_msg = 4;
|
||||||
|
int32 export_format = 5;
|
||||||
|
ExportParams export_params = 6;
|
||||||
|
int32 export_type = 7;
|
||||||
|
int32 finished_sample_count = 8;
|
||||||
|
string path = 9;
|
||||||
|
float progress = 10;
|
||||||
|
string status = 11;
|
||||||
|
string task_id = 12;
|
||||||
|
int64 total_count = 13;
|
||||||
|
int64 total_sample = 14;
|
||||||
|
uint32 update_time = 15;
|
||||||
|
string version_format = 16;
|
||||||
|
string version_id = 17;
|
||||||
|
}
|
||||||
|
/******************Get Export Tasks Of Dataset End*************************/
|
||||||
|
|
||||||
|
|
||||||
// Slurm Services for Shuguang Branch
|
// Slurm Services for Shuguang Branch
|
||||||
|
@ -177,4 +318,9 @@ service ModelArts {
|
||||||
rpc findDatasetList(findDatasetReq) returns (findDatasetResp);
|
rpc findDatasetList(findDatasetReq) returns (findDatasetResp);
|
||||||
rpc ListJob(ListImportTasks) returns (ReturnListImportTasks);
|
rpc ListJob(ListImportTasks) returns (ReturnListImportTasks);
|
||||||
|
|
||||||
|
//export task
|
||||||
|
rpc ExportTask(ExportTaskReq) returns (ExportTaskResp);
|
||||||
|
rpc GetExportTasksOfDataset(GetExportTasksOfDatasetReq) returns (GetExportTasksOfDatasetResp);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ func HttpClient(method string, url string, payload io.Reader, token string) ([]b
|
||||||
request, err := http.NewRequest(method, url, payload)
|
request, err := http.NewRequest(method, url, payload)
|
||||||
request.Header.Add("Content-Type", "application/json")
|
request.Header.Add("Content-Type", "application/json")
|
||||||
request.Header.Add("User-Agent", "API Explorer")
|
request.Header.Add("User-Agent", "API Explorer")
|
||||||
request.Header.Add("token", token)
|
request.Header.Add("x-auth-token", token)
|
||||||
client := &http.Client{}
|
client := &http.Client{}
|
||||||
res, err := client.Do(request)
|
res, err := client.Do(request)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -28,5 +28,6 @@ func HttpClient(method string, url string, payload io.Reader, token string) ([]b
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return body, err
|
return body, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue