pcm-modelarts/pb/pcm-modelarts.proto

2925 lines
100 KiB
Protocol Buffer
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

syntax = "proto3";
package modelarts;
option go_package = "/modelarts";
message InterfaceType {
string data = 1;
}
/******************auth Start*************************/
message auth{
identity identity = 1; // @gotags: copier:"Identity"
scope scope = 2; // @gotags: copier:"Scope"
}
message identity{
methods methods = 1; // @gotags: copier:"Methods"
password password = 2; // @gotags: copier:"Password"
}
message scope{
project project = 1; // @gotags: copier:"Project"
}
message project{
string name = 1; // @gotags: copier:"Name"
}
message methods{
repeated string password = 1; // @gotags: copier:"Password"
}
message password{
user user = 1; // @gotags: copier:"User"
}
message user{
string name = 1; // @gotags: copier:"Name"
string password = 2; // @gotags: copier:"Password"
domain domain = 3; // @gotags: copier:"Domain"
}
message domain{
string name = 1; // @gotags: copier:"Name"
}
message TokenReq{
auth auth = 1; // @gotags: copier:"Auth"
}
message TokenResp{
}
/******************auth end*************************/
/******************find datasetList start*************************/
message DataSetReq{
string project_id = 1; // @gotags: copier:"ProjectId"
int32 limit = 2; // @gotags: copier:"Limit"
int32 offset = 3; // @gotags: copier:"Offset"
string modelArtsType = 4; // @gotags: copier:"ModelArtsType"
string dataset_version = 5; // @gotags: copier:"dataset_version"
string platform = 6;
}
message DataSetResp{
uint32 total_number = 1; // @gotags: copier:"TotalNumber"
repeated DataSets datasets = 2; // @gotags: copier:"Datasets"
int32 code = 3; // @gotags: copier:"Code"
string msg = 4; // @gotags: copier:"Msg"
string error_msg = 5;// @gotags: copier:"ErrorMsg"
}
message DataSets{
string dataset_id = 1; // @gotags: copier:"DatasetId"
string data_format = 2; // @gotags: copier:"DataFormat"
repeated DataSources data_sources = 3; // @gotags: copier:"DataSources"
int32 dataset_format = 4; // @gotags: copier:"DatasetFormat"
string dataset_name = 5; // @gotags: copier:"DatasetName"
int32 dataset_type = 6; // @gotags: copier:"DatasetType"
bool import_data = 7; // @gotags: copier:"ImportData"
int32 total_sample_count = 8; // @gotags: copier:"TotalSampleCount"
int64 create_time = 9; // @gotags: copier:"CreateTime"
string description = 10; // @gotags: copier:"Description"
}
message DataSources{
string data_path = 1; // @gotags: copier:"DataPath" json:"data_path"`
int32 data_type = 2; // @gotags: copier:"DataType" json:"data_type"`
}
message ImportConfig {
string import_path = 1; //gotags: copier:"ImportPath" json:"import_path"`
string import_type = 2; //gotags: copier:"ImportType" json:"import_type"`
bool import_annotations = 3; //gotags: copier:"ImportAnnotations" json:"import_annotations"`
}
/******************find datasetList end*************************/
/******************ImportTask start*************************/
//数据集导入创建
message ImportTaskDataReq{
string dataset_id = 1;
string project_id = 2;
string import_path = 3;
string modelArtsType = 4; // @gotags: copier:"ModelArtsType"
string platform = 5;
}
message ImportTaskDataResp{
string task_id = 1;// @gotags: copier:"TaskId"
int32 code = 2;// @gotags: copier:"Code"
string msg = 3;// @gotags: copier:"Msg"
string error_msg = 4;// @gotags: copier:"ErrorMsg"
}
/******************ImportTask end*************************/
/******************ListImportTasks Start*************************/
//查询数据集导入列表
message ListImportTasksReq{
string dataset_id = 1; // @gotags: copier:"DatasetId"
string project_id = 2; // @gotags: copier:"ProjectId"
int32 limit = 3; // @gotags: copier:"Limit"
int32 offset = 4; // @gotags: copier:"Offset"
string modelArtsType = 5; // @gotags: copier:"ModelArtsType"
string platform = 6;
}
message ListImportTasksResp{
uint32 total_count = 1; //@gotags: copier:"TotalCount"
repeated Import_tasks import_tasks = 2; //@gotags: copier:"ImportTasks"
int32 code = 3; //@gotags: copier:"Code"
string msg = 4; //@gotags: copier:"Msg"
string error_msg = 5; //@gotags: copier:"ErrorMsg"
}
message Import_tasks{
uint32 annotated_sample_count = 1; //@gotags: copier:"AnnotatedSampleCount"
uint64 create_time = 2; //@gotags: copier:"CreateTime"
string dataset_id = 3; //@gotags: copier:"DatasetId"
uint32 elapsed_time = 4; //@gotags: copier:"ElapsedTime"
string error_code = 5; //@gotags: copier:"Error_code"
string error_msg = 6; //@gotags: copier:"Error_msg"
uint32 finished_file_count = 7; //@gotags: copier:"FinishedFileCount"
uint32 finished_file_size = 8; //@gotags: copier:"FinishedFileSize"
string import_path = 9; //@gotags: copier:"ImportPath"
int32 import_type = 10; //@gotags: copier:"ImportType"
uint32 imported_sample_count = 11; //@gotags: copier:"ImportedSampleCount"
uint32 imported_sub_sample_count = 12; //@gotags: copier:"ImportedSubSampleCount"
string processor_task_id = 13; //@gotags: copier:"Processor_task_id"
int32 processor_task_status = 14; //@gotags: copier:"Processor_task_status"
string status = 15; //@gotags: copier:"Status"
string task_id = 16; //@gotags: copier:"TaskId"
uint32 total_file_count = 17; //@gotags: copier:"TotalFileCount"
uint32 total_file_size = 18; //@gotags: copier:"TotalFileSize"
uint32 total_sample_count = 19; //@gotags: copier:"TotalSampleCount"
uint32 total_sub_sample_count = 20; //@gotags: copier:"TotalSubSampleCount"
uint32 unconfirmed_sample_count = 21; //@gotags: copier:"Unconfirmed_sample_count"
uint64 update_ms = 22; //@gotags: copier:"Update_ms"
Data_source data_source = 23; //@gotags: copier:"Data_source"
File_statistics file_statistics = 24; //@gotags: copier:"File_statistics"
repeated Annotation_format_config annotation_format_config = 25; //@gotags: copier:"AnnotationFormatConfig"
}
message Annotation_format_config{
}
message Data_source{
string data_path = 1; //@gotags: copier:"Data_path"
int32 data_type = 2; //@gotags: copier:"Dta_type"
bool with_column_header = 3; //@gotags: copier:"With_column_header"
repeated Schema_maps schema_maps = 4; //@gotags: copier:"schema_maps"
Source_info source_info = 5; //@gotags: copier:"Source_info"
}
message Schema_maps{
string dest_name = 1; //@gotags: copier:"Dest_name"
string src_name = 2; //@gotags: copier:"Src_name"
}
message Source_info{
string cluster_id = 1; //@gotags: copier:"Cluster_id"
string cluster_mode = 2; //@gotags: copier:"Cluster_mode"
string cluster_name = 3; //@gotags: copier:"Cluster_name"
string database_name = 4; //@gotags: copier:"Database_name"
string input = 5; //@gotags: copier:"Input"
string ip = 6; //@gotags: copier:"Ip"
string port = 7; //@gotags: copier:"Port"
string queue_name = 8; //@gotags: copier:"Queue_name"
string subnet_id = 9; //@gotags: copier:"Subnet_id"
string table_name = 10; //@gotags: copier:"Table_name"
string user_name = 11; //@gotags: copier:"User_name"
string user_password = 12; //@gotags: copier:"User_password"
string vpc_id = 13; //@gotags: copier:"Vpc_id"
}
message File_statistics{
uint32 file_num_finished = 1; //@gotags: copier:"File_num_finished"
uint32 file_num_total = 2; //@gotags: copier:"File_num_total"
uint32 file_size_finished = 3; //@gotags: copier:"File_size_finished"
uint32 file_size_total = 4; //@gotags: copier:"File_size_total"
}
/******************ListImportTasks End*************************/
/******************ListTrainingJobs start*************************/
message ListTrainingJobsreq{
string project_id = 1;//@gotags: copier:"ProjectId"
int32 limit = 2;//@gotags: copier:"Limit"
int32 offSet = 3;//@gotags: copier:"Offset"
string modelArtsType = 4; // @gotags: copier:"ModelArtsType"
string platform = 5;
}
message DetailTrainingJobsReq {
string project_id = 1;
string training_job_id = 2;
string platform = 3;
}
message ListTrainingJobsresp{
int32 total = 1; //@gotags: copier:"Total"
int32 count = 2; //@gotags: copier:"Count"
int32 limit = 3; //@gotags: copier:"Limit"
int32 offset = 4; //@gotags: copier:"Offset"
string sort_by = 5; //@gotags: copier:"SortBy"
string order = 6; //@gotags: copier:"Order"
string group_by = 7; //@gotags: copier:"GroupBy"
string workspace_id = 8; //@gotags: copier:"WorkspaceID"
string ai_project = 9; //@gotags: copier:"AiProject"
repeated JobResponse items = 10; //@gotags: copier:"Items"
int32 code = 11; //@gotags: copier:"Code"
string msg = 12; //@gotags: copier:"Msg"
string error_msg = 13;// @gotags: copier:"ErrorMsg"
}
message JobResponse {
string kind = 1;
JobMetadata metadata = 2;
Status status = 3;
JobAlgorithmResponse algorithm = 4;
repeated TaskResponse tasks = 5;
Spec spec = 6;
string projectId = 7;
string error_msg = 8;
string error_code = 9;
string error_solution = 10;
}
message JobMetadata{
string id = 1; //@gotags: copier:"ID"
string name = 2; //@gotags: copier:"Name"
string description = 3;//@gotags: copier:"Description"
uint64 create_time = 4; //@gotags: copier:"CreateTime"
string workspace_id = 5; //@gotags: copier:"WorkspaceID"
string user_name = 6; //@gotags: copier:"UserName"
map<string, string> annotations = 7; //@gotags: copier:"Annotations"
map<string, string> labels = 8;
}
message Status{
string phase = 1; //@gotags: copier:"Phase"
string secondary_phase = 2; //@gotags: copier:"SecondaryPhase"
uint32 duration = 3; //@gotags: copier:"Duration"
repeated string tasks = 4; //@gotags: copier:"Tasks"
uint64 start_time = 5; //@gotags: copier:"StartTime"
repeated Task_statuses task_statuses = 6;//@gotags: copier:"TaskStatuses"
// repeated demos node_count_metrics =7;
}
message JobAlgorithmResponse{
string id = 1; //@gotags: copier:"ID"
string name = 2; //@gotags: copier:"Name"
string subscription_id = 3; //@gotags: copier:"SubscriptionID"
string item_version_id = 4; //@gotags: copier:"ItemVersionID"
string code_dir = 5; //@gotags: copier:"CodeDir"
string boot_file = 6; //@gotags: copier:"BootFile"
string autosearch_config_path = 7; //@gotags: copier:"AutosearchConfigPath"
string autosearch_framework_path = 8; //@gotags: copier:"AutosearchFrameworkPath"
string command = 9; //@gotags: copier:"Command"
repeated Parameter parameters = 10; //@gotags: copier:"Parameters"
policies policies = 11; //@gotags: copier:"Policies"
repeated Input inputs = 12; //@gotags: copier:"Inputs"
repeated Output outputs = 13; //@gotags: copier:"Outputs"
engine engine = 14; //@gotags: copier:"Engine"
string local_code_dir = 15; //@gotags: copier:"LocalCodeDir"
string working_dir = 16; //@gotags: copier:"WorkingDir"
map<string, string> environments = 17;//@gotags: copier:"Environments"
}
message TaskResponse{
string role = 1;
algorithm algorithm = 2;
FlavorResponse task_resource = 3;
}
message FlavorResponse{
string flavor_id = 1;
string flavor_name = 2;
int32 max_num = 3;
string flavor_type = 4;
billing billing = 5;
flavor_info flavor_info = 6;
map<string, string> attributes = 7;
}
message billing{
string code = 1;
int32 unit_num = 2;
}
message flavor_info{
int32 max_num = 1;
cpu cpu = 2;
gpu gpu = 3;
npu npu = 4;
memory memory = 5;
disk disk = 6;
}
message cpu{
string arch = 1;
int32 core_num = 2;
}
message npu{
int32 unit_num = 1;
string product_name = 2;
string memory = 3;
}
message gpu{
int32 unit_num = 1;
string product_name = 2;
string memory = 3;
}
message memory{
int32 size = 1;
string unit = 2;
}
message disk{
int32 size = 1;
string unit = 2;
}
message algorithm{
string code_dir = 1;
string boot_file = 2;
inputs inputs = 3;
outputs outputs = 4;
engine engine = 5;
string local_code_dir = 6;
string working_dir = 7;
}
message inputs{
string name = 1;
string local_dir = 2;
remote remote = 3;
string description = 4;
}
message outputs{
string name = 1;
string local_dir = 2;
remote remote = 3;
string mode = 4;
string period = 5;
}
message Input{
string name = 1;
string description = 2;
string local_dir = 3;
InputDataInfo remote = 4;
repeated remote_constraint remote_constraint = 5;
}
message InputDataInfo{
dataset dataset = 1;
obs obs = 2;
}
message dataset{
string id = 1;
string version_id = 2;
string obs_url = 3;
}
message obs{
string obs_url = 1;
}
message remote_constraint{
string data_type = 1;
string attributes = 2;
}
message Output{
string name = 1;
string description = 2;
string local_dir = 3;
remote remote = 4;
}
message remote{
obs1 obs = 1;
}
message obs1{
string obs_url = 1;
}
message engine{
string engine_id = 1;
string engine_name = 2;
string engine_version = 3;
string image_url = 4;
bool v1_compatible = 5;
string run_user = 6;
}
message policies{
// auto_search auto_search =1;
}
message auto_search{
string skip_search_params = 1; // @gotags: copier:"SkipSearchParams"
repeated reward_attrs reward_attrs = 2; // @gotags: copier:"RewardAttrs"
repeated search_params search_params = 3; // @gotags: copier:"SearchParams"
repeated algo_configs algo_configs = 4; // @gotags: copier:"AlgoConfigs"
}
message reward_attrs{
string name = 1; // @gotags: copier:"Name"
string mode = 2; // @gotags: copier:"Mode"
string regex = 3; // @gotags: copier:"Regex"
}
message search_params{
string name = 1; // @gotags: copier:"Name"
string param_type = 2; // @gotags: copier:"ParamType"
string lower_bound = 3; // @gotags: copier:"LowerBound"
string upper_bound = 4; // @gotags: copier:"UpperBound"
string discrete_points_num = 5; // @gotags: copier:"DiscretePointsNum"
repeated string discrete_values = 6; // @gotags: copier:"DiscreteValues"
}
message algo_configs{
string name = 1; // @gotags: copier:"Name"
repeated AutoSearchAlgoConfigParameter params = 2; // @gotags: copier:"AutoSearchAlgoConfigParameterAlRp"
}
message AutoSearchAlgoConfigParameter{
string key = 1; // @gotags: copier:"Key"
string value = 2; // @gotags: copier:"Value"
string type = 3; // @gotags: copier:"Type"
}
message Parameter{
string name = 1;
string value = 2;
string description = 3;
constraint constraint = 4;
i18n_description i18n_description = 5;
}
message i18n_description{
string language = 1; //gotags: copier:"Language"
string description = 2; //gotags: copier:"Description"
}
message constraint{
string type = 1;
bool editable = 2;
bool required = 3;
bool sensitive = 4;
string valid_type = 5;
repeated string valid_range = 6;
}
message Spec{
resource resource = 1;
repeated volumes volumes = 2;
log_export_path log_export_path = 3;
}
message resource{
string policy = 1;
string flavor_id = 2;
string flavor_name = 3;
string node_count = 4;
string pool_id = 5;
flavor_detail flavor_detail = 6;
string flavor_label = 7;
}
message flavor_detail{
string flavor_type = 1;
billing billing = 2;
flavor_info flavor_info = 3;
}
message volumes{
nfs nfs = 1;
}
message nfs{
string nfs_server_path = 1;
string local_path = 2;
bool read_only = 3;
}
message log_export_path{
string obs_url = 1;
string host_path = 2;
}
//message demos{
// repeated demo demo =1;
//}
//message demo{
// map<int32,Node_count_metricsRes> node_count_metrics =1;
//}
//message Node_count_metricsRes {
// repeated int32 values = 1;
//}
message Task_statuses{
string task = 1;
string exit_code = 2;
string message = 3;
}
/******************ListTrainingJobs end*************************/
/******************CreateTrainingJob start*************************/
//创建训练任务入参
message CreateTrainingJobReq {
string kind = 1; // @gotags: copier:"Kind"
MetadataS metadata = 2; // @gotags: copier:"Metadatas"
Algorithms algorithm = 3; // @gotags: copier:"AlgorithmsCtRq"
SpecsC spec = 4; // @gotags: copier:"SpecsCtRq"
string platform = 5;
}
//创建训练任务出参
message CreateTrainingJobResp{
string kind = 1; // @gotags: copier:"Kind"
MetadataS metadata = 2; // @gotags: copier:"Metadatas"
Status status = 3; // @gotags: copier:"Status"
Algorithms algorithm = 4; // @gotags: copier:"Algorithms"
Spec spec = 5; // @gotags: copier:"SpecCtRp"
string error_msg = 6;
string error_code = 7;
string error_solution = 8;
}
message CreateTrainingJobResp400{
string error_msg = 1;
string error_code = 2;
string error_solution = 3;
}
message MetadataS {
string id = 1; // @gotags: copier:"Id"
string name = 2; // @gotags: copier:"Name"
string description = 3; // @gotags: copier:"Description"
string workspace_id = 4; // @gotags: copier:"WorkspaceId"
map<string, string> labels = 5; // @gotags: copier:"labels"
map<string, string> annotations = 6; // @gotags: copier:"annotations"
string tags = 7; // @gotags: copier:"tags"
}
message EngineCreateTraining {
string engine_id = 1; // @gotags: copier:"EngineId"
string engine_name = 2; // @gotags: copier:"EngineName"
string engine_version = 3; // @gotags: copier:"EngineVersion"
string image_url = 4; // @gotags: copier:"ImageUrl"
}
message ConstraintCreateTraining {
string type = 1; // @gotags: copier:"Type"
bool editable = 2; // @gotags: copier:"Editable"
bool required = 3; // @gotags: copier:"Required"
bool sensitive = 4; // @gotags: copier:"Sensitive"
string valid_type = 5; // @gotags: copier:"ValidType"
}
message ParametersTrainJob {
string name = 1; // @gotags: copier:"Name"
// string description = 2; // @gotags: copier:"Description"
string value = 2; // @gotags: copier:"Value"
// ConstraintCreateTraining constraint = 4; // @gotags: copier:"ConstraintCreateTraining"
}
message PoliciesCreateTraining {
string auto_search = 1;
}
message Algorithms {
string id = 1; // @gotags: copier:"Id"
string name = 2; // @gotags: copier:"Name"
string code_dir = 3; // @gotags: copier:"CodeDir"
string boot_file = 4; // @gotags: copier:"BootFile"
EngineCreateTraining engine = 5;// @gotags: copier:"EngineCreateTraining"
repeated ParametersTrainJob parameters = 6;// @gotags: copier:"ParametersTrainJob"
PoliciesCreateTraining policies = 7;// @gotags: copier:"PoliciesCreateTraining"
string command = 8; // @gotags: copier:"Command"
string subscription_id = 9; // @gotags: copier:"SubscriptionId"
string item_version_id = 10; // @gotags: copier:"ItemVersionId"
repeated InputTraining inputs = 11; // @gotags: copier:"InputTra"
repeated OutputTraining outputs = 12; // @gotags: copier:"OutputTra"
map<string, string> environments = 13; // @gotags: copier:"Environments"
string local_code_dir = 14; //@gotags: copier:"local_code_dir"
string working_dir = 15; //@gotags: copier:"working_dir"
}
message InputTraining{
string name = 1; // @gotags: copier:"Name"
string access_method = 2; // @gotags: copier:"AccessMethod"
RemoteTra remote = 3; // @gotags: copier:"RemoteIn"
}
message OutputTraining{
string name = 1; // @gotags: copier:"Name"
string access_method = 2; // @gotags: copier:"AccessMethod"
bool prefetch_to_local = 3; // @gotags: copier:"PrefetchToLocal"
RemoteOut remote = 4; // @gotags: copier:"RemoteOut"
}
message RemoteTra{
DatasetTra dataset = 1; // @gotags: copier:"DatasetIn"
}
message RemoteOut{
ObsTra obs = 1; // @gotags: copier:"Obs"
}
message ObsTra{
string obs_url = 1; // @gotags: copier:"ObsUrl"
}
message DatasetTra{
string id = 1; // @gotags: copier:"Id"
string name = 2; // @gotags: copier:"Name"
string version_name = 3; // @gotags: copier:"VersionName"
string version_id = 4; // @gotags: copier:"VersionId"
}
message ResourceCreateTraining {
string flavor_id = 1; // @gotags: copier:"FlavorId"
int32 node_count = 2; // @gotags: copier:"NodeCount"
string policy = 3; // @gotags: copier:"Policy"
string flavor_label = 4; // @gotags: copier:"FlavorLabel"
}
message LogExportPathCreateTraining {
}
message Specs {
ResourceCreateTraining resource = 1; // @gotags: copier:"ResourceCreateTraining"
LogExportPathCreateTraining log_export_path = 2; // @gotags: copier:"LogExportPathCreateTrainingJob"
bool is_hosted_log = 3; // @gotags: copier:"IsHostedLog"
}
/******************CreateTrainingJob end*************************/
/******************CreateTrainingJobConfig start*************************/
message SpecsC {
ResourceCreateTraining resource = 1; // @gotags: copier:"Resource"
log_export_path log_export_path = 2; // @gotags: copier:"LogExportPath"
repeated volumes volumes = 3; // @gotags: copier:"Volumes"
}
message CreateTrainingJobConfigReq {
string config_name = 1;
string app_url = 2;
string boot_file_url = 3;
int32 model_id = 4;
int32 worker_server_num = 5;
int32 engine_id = 6;
int32 spec_id = 7;
repeated ParameterS parameter = 8;
string project_id = 9;
string modelArtsType = 10; // @gotags: copier:"ModelArtsType"
string platform = 11;
}
message ParameterS {
string label = 1;
string value = 2;
}
message CreateTrainingJobConfigResp{
bool is_success = 1;
string error_message = 2;
string error_code = 3;
}
/******************CreateTrainingJobConfig end*************************/
/******************DeleteTrainingJob start*************************/
message DeleteTrainingJobReq{
string project_id = 1; //@gotags: copier:"Project_id"
string training_job_id = 2; //@gotags: copier:"Training_job_id"
string modelArtsType = 3; // @gotags: copier:"ModelArtsType"
string platform = 4;
}
message DeleteTrainingJobResp{
int32 code = 1; //@gotags: copier:"Code"
string msg = 2; //@gotags: copier:"Msg"
string error_msg = 3;// @gotags: copier:"ErrorMsg"
}
/******************DeleteTrainingJob end*************************/
/******************DeleteTrainingJobConfig start*************************/
message DeleteTrainingJobConfigReq{
string project_id = 1;
string config_name = 2;
string modelArtsType = 3; // @gotags: copier:"ModelArtsType"
string platform = 4;
}
message DeleteTrainingJobConfigResp{
bool is_success = 1;
string error_message = 2;
string error_code = 3;
int32 code = 4; //@gotags: copier:"Code"
string msg = 5; //@gotags: copier:"Msg"
}
/******************DeleteTrainingJobConfig end*************************/
/******************ListTrainingJobConfig start*************************/
message ListTrainingJobConfigReq{
string project_id = 1;
int32 per_page = 2;
int32 page = 3;
string sortBy = 4;
string order = 5;
string search_content = 6;
string config_type = 7;
string modelArtsType = 8; // @gotags: copier:"ModelArtsType"
string platform = 9;
}
message ListTrainingJobConfigResp{
bool is_success = 1;
string error_message = 2;
string error_code = 3;
int32 config_total_count = 4;
repeated ConfigResponse configs = 5;
}
message ConfigResponse{
string config_name = 1;
string config_desc = 2;
uint32 create_time = 3;
int32 engine_type = 4;
string engine_name = 5;
uint32 engine_id = 6;
string engine_version = 7;
string user_image_url = 8;
string user_command = 9;
}
/******************ListTrainingJobConfig end*************************/
/******************CreateAlgorithm start*************************/
message CreateAlgorithmReq{
MetadataAlRq metadata = 1; // @gotags: copier:"MetadataCARq"
JobConfigAl job_config = 2; // @gotags: copier:"JobConfigCARq"
repeated ResourceRequirements resource_requirements = 3;// @gotags: copier:"ResourceRequirementsCARq"
AdvancedConfigAl advanced_config = 4;// @gotags: copier:"AdvancedConfigCARq"
string platform = 5;
}
message ResourceRequirements{
string key = 1;
repeated string value = 2;
string operator = 3;
}
message AdvancedConfigAl {
auto_search auto_search = 1; // @gotags: copier:"AutoSearch"
}
message MetadataAlRq {
string name = 2;
string description = 3;
string workspace_id = 4;
string ai_project = 5;
}
message ConstraintAlRq {
string type = 1;
bool editable = 2;
bool required = 3;
bool sensitive = 4;
string valid_type = 5;
repeated string valid_range = 6;
}
message ParametersAlRq {
string name = 1;
string description = 2;
i18n_description i18n_description = 3;
string value = 4;
ConstraintAlRq constraint = 5;
}
message InputsAlRq {
string name = 1;
string description = 2;
repeated remote_constraints remote_constraints = 3;
}
message remote_constraints{
string data_type = 1;
repeated attributesAlRq attributes = 2;
}
message attributesAlRq{
map<string, string> attributes = 1;
}
message OutputsAl {
string name = 1;
string description = 2;
}
message EngineAlRq {
string engine_id = 1; // @gotags: copier:"EngineId"
string engine_name = 2; // @gotags: copier:"EngineName"
string engine_version = 3; // @gotags: copier:"EngineVersion"
string image_url = 4; // @gotags: copier:"ImageUrl"
}
message Children {
string name = 1;
}
message CodeTree {
string name = 1;
repeated Children children = 2;
}
message JobConfigAl {
string code_dir = 1;
string boot_file = 2;
string command = 3;
repeated ParametersAlRq parameters = 4;
bool parameters_customization = 5;
repeated InputsAlRq inputs = 6;
repeated OutputsAl outputs = 7;
EngineAlRq engine = 8;
}
//出参
message CreateAlgorithmResp{
MetadataCrAl metadata = 1; // @gotags: copier:"MetadataCARp"
ShareInfo share_info = 2; // @gotags: copier:"Share_infoCARp"
JobConfigAl job_config = 3; // @gotags: copier:"JobConfigCARp"
repeated ResourceRequirements resource_requirements = 4;// @gotags: copier:"ResourceRequirementsCARp"
AdvancedConfigAl advanced_config = 5;// @gotags: copier:"AdvancedConfigCARp"
int32 code = 6; // @gotags: copier:"Code"
string msg = 7; // @gotags: copier:"Msg"
string error_msg = 8;// @gotags: copier:"ErrorMsg"
}
message ShareInfo{}
message MetadataCrAl {
string id = 1;
string name = 2;
string description = 3;
uint64 create_time = 4;
string workspace_id = 5;
string ai_project = 6;
string user_name = 7;
string domain_id = 8;
string source = 9;
string api_version = 10;
bool is_valid = 11;
string state = 12;
int32 size = 13;
repeated TagsAlRp tags = 14;
repeated string attr_list = 15;
int32 version_num = 16;
uint64 update_time = 17;
}
message MetadataAlRp {
string id = 1;
string name = 2;
string description = 3;
uint64 create_time = 4;
string workspace_id = 5;
string ai_project = 6;
string user_name = 7;
string domain_id = 8;
string source = 9;
string api_version = 10;
bool is_valid = 11;
string state = 12;
int32 size = 13;
repeated TagsAlRp tags = 14;
repeated string attr_list = 15;
int32 version_num = 16;
uint64 update_time = 17;
}
message TagsAlRp{
map<string, string> tags = 1;
}
message ShareInfoAlRp {
}
message ConstraintAlRp {
string type = 1;
bool editable = 2;
bool required = 3;
bool sensitive = 4;
string valid_type = 5;
repeated string valid_range = 6;
}
message ParametersAlRp {
string name = 1;
string description = 2;
i18n_description i18n_description = 3;
string value = 4;
ConstraintAlRp constraint = 5;
}
message InputsAlRp {
string name = 1;
string access_method = 2;
}
message OutputsAlRp {
string name = 1;
string access_method = 2;
bool prefetch_to_local = 3;
}
message ImageInfo {
string cpu_image_url = 1;
string gpu_image_url = 2;
string image_version = 3;
}
message EngineAlRp {
string engine_id = 1;
string engine_name = 2;
string engine_version = 3;
bool v1_compatible = 4;
string run_user = 5;
ImageInfo image_info = 6;
bool image_source = 7;
}
/******************CreateAlgorithm end*************************/
/******************ListAlgorithms start*************************/
message ListAlgorithmsReq{
string modelArtsType = 1; // @gotags: copier:"ModelArtsType"
string project_id = 2; // @gotags: copier:"ProjectId"
int32 offset = 3; // @gotags: copier:"Offset"
int32 limit = 4; // @gotags: copier:"Limit"
string platform = 5;
}
message ListAlgorithmsResp{
int32 total = 1; // @gotags: copier:"Total"
int32 count = 2; // @gotags: copier:"Count"
int32 limit = 3; // @gotags: copier:"Limit"
int32 offset = 4; // @gotags: copier:"Offset"
string sort_by = 5; // @gotags: copier:"SortBy"
string order = 6; // @gotags: copier:"Order"
string group_by = 7; // @gotags: copier:"GroupBy"
repeated AlgorithmResponse items = 8; // @gotags: copier:"Items"
string error_msg = 9;// @gotags: copier:"ErrorMsg"
string msg = 10;// @gotags: copier:"Msg"
int32 code = 11;// @gotags: copier:"Code"
}
message AlgorithmResponse{
MetadataAlRp metadata = 1; // @gotags: copier:"MetadataAlRp"
JobConfigAlRq job_config = 2; // @gotags: copier:"JobConfigAlRp"
repeated ResourceRequirements resource_requirements = 3; // @gotags: copier:"ResourceRequirementsAlRp"
AdvancedConfigAl advanced_config = 4; // @gotags: copier:"AdvancedConfigAlRp"
}
message JobConfigAlRq {
string code_dir = 1; // @gotags: copier:"CodeDir"
string boot_file = 2; // @gotags: copier:"BootFile"
string command = 3; // @gotags: copier:"Command"
repeated ParametersAlRq parameters = 4; // @gotags: copier:"ParametersAlRq"
bool parameters_customization = 5; // @gotags: copier:"ParametersCustomization"
repeated InputsAlRq inputs = 6; // @gotags: copier:"InputsAlRq"
repeated OutputsAl outputs = 7; // @gotags: copier:"OutputsAl"
EngineAlRq engine = 8; // @gotags: copier:"EngineAlRq"
}
/******************ListAlgorithms end*************************/
/******************Delete Algorithms start*************************/
message DeleteAlgorithmsReq{
string project_id = 1; // @gotags: copier:"ProjectId"
string algorithm_id = 2; // @gotags: copier:"AlgorithmId"
string modelArtsType = 3; // @gotags: copier:"ModelArtsType"
string platform = 4;
}
message DeleteAlgorithmsResp{
string msg = 1; // @gotags: copier:"Msg"
int32 code = 2; // @gotags: copier:"Code"
string error_msg = 3;// @gotags: copier:"ErrorMsg"
}
/******************Delete Algorithms end*************************/
/******************Show Algorithm By Uuid start*************************/
message ShowAlgorithmByUuidReq{
string project_id = 1; // @gotags: copier:"ProjectId"
string algorithm_id = 2; // @gotags: copier:"AlgorithmId"
string modelArtsType = 3; // @gotags: copier:"ModelArtsType"
string platform = 4;
}
message ShowAlgorithmByUuidResp{
MetadataAlRq metadata = 1; // @gotags: copier:"Metadata"
JobConfigAlRq job_config = 2; // @gotags: copier:"JobConfig"
repeated ResourceRequirements resource_requirements = 3; // @gotags: copier:"ResourceRequirements"
AdvancedConfigAl advanced_config = 4; // @gotags: copier:"AdvancedConfig"
int32 code = 5; // @gotags: copier:"Code"
string msg = 6; // @gotags: copier:"Msg"
string error_msg = 7;// @gotags: copier:"ErrorMsg"
}
/******************Show Algorithm By Uuid end*************************/
/******************TrainingJobFlavors start*************************/
message TrainingJobFlavorsReq{
string project_id = 1; // @gotags: copier:"ProjectId"
string flavor_type = 2; // @gotags: copier:"FlavorType"
string modelArtsType = 3; // @gotags: copier:"ModelArtsType"
string platform = 4;
}
message TrainingJobFlavorsResp{
int32 total_count = 1; // @gotags: copier:"TotalCount"
repeated FlavorResponse flavors = 2; // @gotags: copier:"FlavorResponse"
string msg = 3;// @gotags: copier:"Msg"
int32 code = 4;// @gotags: copier:"Code"
}
/******************TrainingJobFlavors end*************************/
/******************ListAiEngines start*************************/
message ListAiEnginesReq{
string project_id = 1; // @gotags: copier:"ProjectId"
string modelArtsType = 2; // @gotags: copier:"ModelArtsType"
string platform = 3;
}
message ListAiEnginesResp{
int32 total = 1; // @gotags: copier:"total"
repeated Items items = 2; // @gotags: copier:"items"
string msg = 3;// @gotags: copier:"Msg"
int32 code = 4;// @gotags: copier:"Code"
}
message Items{
string engine_id = 1; // @gotags: copier:"EngineId"
string engine_name = 2; // @gotags: copier:"EngineName"
string engine_version = 3; // @gotags: copier:"EngineVersion"
bool v1_compatible = 4; // @gotags: copier:"V1Compatible"
string run_user = 5; // @gotags: copier:"RunUser"
ImageInfo image_info = 6; // @gotags: copier:"ImageInfo"
bool image_source = 7; // @gotags: copier:"imageSource"
repeated Tags tags = 8; // @gotags: copier:"Tags"
}
message Tags{
string key = 1;
string value = 2;
}
/******************ListAiEngines end*************************/
/******************Task(export) Start*************************/
message ExportTaskReq{
string annotation_format = 1; // @gotags: copier:"AnnotationFormat"
int64 export_format = 2; // @gotags: copier:"ExportFormat"
ExportParams export_params = 3; // @gotags: copier:"ExportParams"
int32 export_type = 4; // @gotags: copier:"ExportType"
string path = 5; // @gotags: copier:"Path"
string sample_state = 6; // @gotags: copier:"SampleState"
string source_type_header = 7; // @gotags: copier:"SourceTypeHeader"
int32 status = 8; // @gotags: copier:"Status"
string task_id = 9; // @gotags: copier:"TaskId"
string version_format = 10; // @gotags: copier:"VersionFormat"
string version_id = 11; // @gotags: copier:"VersionId"
bool with_column_header = 12; // @gotags: copier:"WithColumnHeader"
string dataset_id = 13; // @gotags: copier:"DatasetId"
string project_id = 14; // @gotags: copier:"ProjectId"
string modelArtsType = 15; // @gotags: copier:"ModelArtsType"
string platform = 16;
}
message ExportTaskDataResp{
uint32 create_time = 1; // @gotags: copier:"CreateTime"
int64 export_format = 2; // @gotags: copier:"ExportFormat"
ExportParams export_params = 3; // @gotags: copier:"ExportParams"
int32 finished_sample_count = 4; // @gotags: copier:"FinishedSampleCount"
string path = 5; // @gotags: copier:"Path"
float progress = 6; // @gotags: copier:"Progress"
string status = 7; // @gotags: copier:"Status"
string task_id = 8; // @gotags: copier:"TaskId"
int64 total_sample_count = 9; // @gotags: copier:"TotalSampleCount"
uint32 update_time = 10; // @gotags: copier:"UpdateTime"
string version_format = 11; // @gotags: copier:"VersionFormat"
string version_id = 12; // @gotags: copier:"VersionId"
int32 code = 13; // @gotags: copier:"Code"
string msg = 14; // @gotags: copier:"Msg"
string error_msg = 15;// @gotags: copier:"ErrorMsg"
}
message ExportParams{
bool clear_hard_property = 1; // @gotags: copier:"ClearHardProperty"
string export_dataset_version_format = 2; // @gotags: copier:"ExportDatasetVersionFormat"
string export_dataset_version_name = 3; // @gotags: copier:"ExportDatasetVersionName"
string export_dest = 4; // @gotags: copier:"ExportDest"
string export_new_dataset_work_name = 5; // @gotags: copier:"ExportNewDatasetWorkName"
string export_new_dataset_work_path = 6; // @gotags: copier:"ExportNewDatasetWorkPath"
bool ratio_sample_usage = 7; // @gotags: copier:"RatioSampleUsage"
string sample_state = 8; // @gotags: copier:"SampleState"
repeated string sample = 9; // @gotags: copier:"Sample"
repeated SearchCondition search_conditions = 10; // @gotags: copier:"SearchConditions"
string train_sample_ratio = 11; // @gotags: copier:"TrainSampleRatio"
}
message SearchCondition {
string coefficient = 1; // @gotags: copier:"Coefficient"
int64 frame_in_video = 2; // @gotags: copier:"FrameInVideo"
string hard = 3; // @gotags: copier:"Hard"
string import_origin = 4; // @gotags: copier:"ImportOrigin"
string kvp = 5; // @gotags: copier:"Kvp"
SearchLabels label_list = 6; // @gotags: copier:"LabelList"
string labeler = 7; // @gotags: copier:"Labeler"
SearchProp metadata = 8; // @gotags: copier:"Metadata"
string parent_sample_id = 9; // @gotags: copier:"ParentSampleId"
string sample_dir = 10; // @gotags: copier:"SampleDir"
string sample_name = 11; // @gotags: copier:"SampleName"
string sample_time = 12; // @gotags: copier:"SampleTime"
string score = 13; // @gotags: copier:"Score"
string slice_thickness = 14; // @gotags: copier:"SliceThickness"
string study_date = 15; // @gotags: copier:"StudyDate"
string time_in_video = 16; // @gotags: copier:"TimeInVideo"
}
message SearchLabels {
repeated SearchLabel labels = 1; // @gotags: copier:"Labels"
string op = 2; // @gotags: copier:"Op"
}
message weigou{
repeated string aaa = 1; // @gotags: copier:"Aaa"
}
message SearchLabel {
string name = 1; // @gotags: copier:"Name"
string op = 2; // @gotags: copier:"Op"
// map<string,weigou> property = 3; // @gotags: copier:"Property"
int64 type = 4; // @gotags: copier:"Type"
}
message SearchProp {
string op = 1; // @gotags: copier:"Op"
map<string, weigou> props = 2; // @gotags: copier:"Props"
}
/******************Task(export) End*************************/
/******************Get Export Tasks Of Dataset Start*************************/
message GetExportTasksOfDatasetReq{
string dataset_id = 1; // @gotags: copier:"DatasetId"
string project_id = 2; // @gotags: copier:"ProjectId"
int32 export_type = 3; // @gotags: copier:"ExportType"
int32 limit = 4; // @gotags: copier:"Limit"
int32 offset = 5; // @gotags: copier:"Offset"
string modelArtsType = 6; // @gotags: copier:"ModelArtsType"
string platform = 7;
}
message GetExportTasksOfDatasetResp{
uint32 update_time = 1; // @gotags: copier:"UpdateTime"
uint32 create_time = 2; // @gotags: copier:"CreateTime"
string version_format = 3; // @gotags: copier:"VersionFormat"
string version_id = 4; // @gotags: copier:"VersionId"
int32 export_format = 5; // @gotags: copier:"ExportFormat"
ExportParams export_params = 6; // @gotags: copier:"ExportParams"
repeated ExportTaskStatus export_tasks = 7; // @gotags: copier:"ExportTasks"
int32 export_type = 8; // @gotags: copier:"ExportType"
int32 finished_sample_count = 9; // @gotags: copier:"FinishedSampleCount"
string path = 10; // @gotags: copier:"Path"
float progress = 11; // @gotags: copier:"Progress"
string status = 12; // @gotags: copier:"Status"
string task_id = 13; // @gotags: copier:"TaskId"
int64 total_count = 14; // @gotags: copier:"TotalCount"
int64 total_sample = 15; // @gotags: copier:"TotalSample"
int32 code = 16; // @gotags: copier:"Code"
string msg = 17; // @gotags: copier:"Msg"
string error_msg = 18;// @gotags: copier:"ErrorMsg"
}
message ExportTaskStatus {
string version_id = 1; // @gotags: copier:"VersionId"
uint32 create_time = 2; // @gotags: copier:"CreateTime"
string error_code = 3; // @gotags: copier:"ErrorCode"
string error_msg = 4; // @gotags: copier:"ErrorMsg"
int32 export_format = 5; // @gotags: copier:"ExportFormat"
ExportParams export_params = 6; // @gotags: copier:"ExportParams"
int32 export_type = 7; // @gotags: copier:"ExportType"
int32 finished_sample_count = 8; // @gotags: copier:"FinishedSampleCount"
string path = 9; // @gotags: copier:"Path"
float progress = 10; // @gotags: copier:"Progress"
string status = 11; // @gotags: copier:"Status"
string task_id = 12; // @gotags: copier:"TaskId"
int64 total_count = 13; // @gotags: copier:"TotalCount"
int64 total_sample = 14; // @gotags: copier:"TotalSample"
uint32 update_time = 15; // @gotags: copier:"UpdateTime"
string version_format = 16; // @gotags: copier:"VersionFormat"
}
/******************Get Export Tasks Of Dataset End*************************/
/******************Get Export Task Status Of Dataset Start*************************/
message GetExportTaskStatusOfDatasetReq{
string resource_id = 1; // @gotags: copier:"ResourceId"
string project_id = 2; // @gotags: copier:"ProjectId"
string task_id = 3; // @gotags: copier:"TaskId"
string modelArtsType = 4; // @gotags: copier:"ModelArtsType"
string platform = 5;
}
message GetExportTaskStatusOfDatasetResp{
uint32 update_time = 1; // @gotags: copier:"UpdateTime"
uint32 create_time = 2; // @gotags: copier:"CreateTime"
string version_format = 3; // @gotags: copier:"VersionFormat"
string version_id = 4; // @gotags: copier:"VersionId"
int32 export_format = 5; // @gotags: copier:"ExportFormat"
ExportParams export_params = 6; // @gotags: copier:"ExportParams"
repeated ExportTaskStatus export_tasks = 7; // @gotags: copier:"ExportTasks"
int32 export_type = 8; // @gotags: copier:"ExportType"
int32 finished_sample_count = 9; // @gotags: copier:"FinishedSampleCount"
string path = 10; // @gotags: copier:"Path"
float progress = 11; // @gotags: copier:"Progress"
string status = 12; // @gotags: copier:"Status"
string task_id = 13; // @gotags: copier:"TaskId"
int64 total_count = 14; // @gotags: copier:"TotalCount"
int64 total_sample = 15; // @gotags: copier:"TotalSample"
int32 code = 16; // @gotags: copier:"Code"
string msg = 17; // @gotags: copier:"Msg"
string error_msg = 18;// @gotags: copier:"ErrorMsg"
}
/******************Get Export Task Status Of Dataset 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;
string modelArtsType = 11; // @gotags: copier:"ModelArtsType"
string platform = 12;
}
message CreateProcessorTaskResp{
int32 code = 1; // @gotags: copier:"Code"
string task_id = 2;
string msg = 3;
}
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;
string modelArtsType = 4; // @gotags: copier:"ModelArtsType"
string platform = 5;
}
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;
string modelArtsType = 25; // @gotags: copier:"ModelArtsType"
string platform = 26;
}
message CreateModelResp{
int32 code = 1; // @gotags: copier:"Code"
string model_id = 2;
string msg = 5; // @gotags: copier:"Msg"
}
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*************************/
/******************Delete Model Start*************************/
message DeleteModelReq{
string project_id = 1;
string model_id = 2;
bool cascade = 3;
string modelArtsType = 4; // @gotags: copier:"ModelArtsType"
string platform = 5;
}
message DeleteModelResp{
int32 code = 1; // @gotags: copier:"Code"
repeated string delete_success_list = 2;
repeated DeleteModelResponseFailedList delete_failed_list = 3;
string msg = 4; // @gotags: copier:"Msg"
}
message DeleteModelResponseFailedList{
string error_msg = 1;
string error_code = 2;
string model_id = 3;
}
/******************Delete 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;
string modelArtsType = 12; // @gotags: copier:"ModelArtsType"
string platform = 13;
string model_status =14;
}
message ListModelResp{
int32 code = 1; // @gotags: copier:"Code"
int32 total_count = 2;
int32 count = 3;
repeated ModelListItem models = 4;
string msg = 5; // @gotags: copier:"Msg"
}
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*************************/
/******************Show Model Start*************************/
message ShowModelReq{
string project_id = 1;
string model_id = 2;
string modelArtsType = 3; // @gotags: copier:"ModelArtsType"
string platform = 4;
}
message ShowModelResp{
int32 code = 1; // @gotags: copier:"Code"
ShowModelDetail ShowModelDetail =2;
string msg = 3; // @gotags: copier:"Msg"
}
message ShowModelDetail{
string model_version = 2;
string source_job_version = 3;
string source_location = 4;
string source_job_id = 5;
string source_copy = 6;
string description = 7;
string project = 8;
string workspace_id = 9;
string model_algorithm = 10;
string model_name = 11;
string tenant = 12;
repeated GuideDoc model_docs = 13;
string owner = 14;
string execution_code = 15;
string schema_doc = 16;
string image_address = 17;
repeated ModelParamsInfo output_params = 18;
ModelHealth healthy = 19;
string runtime = 20;
string model_metrics = 21;
string source_type = 22;
string model_type = 23;
string model_id = 24;
repeated ModelDependencies dependencies = 25;
uint32 model_size = 26;
string model_status =27;
string apis = 28;
string model_source = 29;
bool tunable = 30;
bool market_flag = 31;
bool publishable_flag = 32;
repeated string model_labels = 33;
map<string, string> labels_map = 34;
repeated string install_type = 35;
string config = 36;
ModelSpecification specification = 37;
repeated ModelParamsInfo input_params = 38;
uint32 create_at = 39;
}
message ModelHealth{
string protocol = 1;
string initial_delay_seconds = 2;
string timeout_seconds = 3;
string url = 4;
}
message ModelParamsInfo{
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;
}
/******************Show Model End*************************/
/******************Create Service Start*************************/
message CreateServiceReq{
string workspace_id = 1; // @gotags: copier:"WorkspaceId"
Scheduler schedule = 2; // @gotags: copier:"Schedule"
string cluster_id = 3; // @gotags: copier:"ClusterId"
string infer_type = 4; // @gotags: copier:"InferType"
string vpc_id = 5; // @gotags: copier:"VpcId"
string service_name = 6; // @gotags: copier:"ServiceName"
string description = 7; // @gotags: copier:"Description"
string security_group_id = 8; // @gotags: copier:"SecurityGroupId"
string subnet_network_id = 9; // @gotags: copier:"SubnetNetworkId"
repeated ServiceConfig config = 10; // @gotags: copier:"Config"
string project_id = 11; // @gotags: copier:"ProjectId"
string modelArtsType = 12; // @gotags: copier:"ModelArtsType"
string platform = 13;
}
message CreateServiceResp{
string service_id = 1; // @gotags: copier:"ServiceId"
repeated string resource_ids = 2; // @gotags: copier:"ResourceIds"
int32 code = 3; // @gotags: copier:"Code"
string msg = 4; // @gotags: copier:"Msg"
string error_msg = 5;// @gotags: copier:"ErrorMsg"
}
message Scheduler{
int32 duration = 1; // @gotags: copier:"Duration"
string time_unit = 2; // @gotags: copier:"TimeUnit"
string type = 3; // @gotags: copier:"Type"
}
message ServiceConfig{
CustomSpec custom_spec = 1; // @gotags: copier:"CustomSpec"
map<string, string> envs = 2; // @gotags: copier:"Envs"
string specification = 3; // @gotags: copier:"Specification"
int32 weight = 4; // @gotags: copier:"Weight"
string model_id = 5; // @gotags: copier:"ModelId"
string src_path = 6; // @gotags: copier:"SrcPath"
string req_uri = 7; // @gotags: copier:"ReqUri"
string mapping_type = 8; // @gotags: copier:"MappingType"
string cluster_id = 9; // @gotags: copier:"ClusterId"
repeated string nodes = 10; // @gotags: copier:"Nodes"
string src_type = 11; // @gotags: copier:"SrcType"
string dest_path = 12; // @gotags: copier:"DestPath"
int32 instance_count = 13; // @gotags: copier:"InstanceCount"
}
message CustomSpec{
float gpu_p4 = 1; // @gotags: copier:"GpuP4"
int64 memory = 2; // @gotags: copier:"Memory"
float cpu = 3; // @gotags: copier:"Cpu"
int64 ascend_a310 = 4; // @gotags: copier:"AscendA310"
}
/******************Create Service End*************************/
/******************Delete Service Start*************************/
message DeleteServiceReq{
string project_id = 1; // @gotags: copier:"ProjectId"
string service_id = 2; // @gotags: copier:"ServiceId"
string modelArtsType = 3; // @gotags: copier:"ModelArtsType"
string platform = 4;
}
message DeleteServiceResp{
int32 code = 1; // @gotags: copier:"Code"
string msg = 2; // @gotags: copier:"Msg"
string error_msg = 3;// @gotags: copier:"ErrorMsg"
}
/******************Delete Service End*************************/
/******************Show Service Start*************************/
message ShowServiceReq{
string project_id = 1; // @gotags: copier:"ProjectId"
string service_id = 2; // @gotags: copier:"ServiceId"
string modelArtsType = 3; // @gotags: copier:"ModelArtsType"
string platform = 4;
}
message ShowServiceResp{
uint32 failed_times = 1; // @gotags: copier:"FailedTimes"
string owner = 2; // @gotags: copier:"Owner"
int32 due_time = 3; // @gotags: copier:"DueTime"
int32 finished_time = 4; // @gotags: copier:"FinishedTime"
string infer_type = 5; // @gotags: copier:"InferType"
string service_name = 6; // @gotags: copier:"ServiceName"
string description = 7; // @gotags: copier:"Description"
string project = 8; // @gotags: copier:"Project"
uint32 invocation_times = 9; // @gotags: copier:"InvocationTimes"
uint32 publish_at = 10; // @gotags: copier:"PublishAt"
string workspace_id = 11; // @gotags: copier:"WorkspaceId"
repeated Scheduler scheduler = 12; // @gotags: copier:"Scheduler"
int32 start_time = 13; // @gotags: copier:"StartTime"
string operation_time = 14; // @gotags: copier:"OperationTime"
bool is_shared = 15; // @gotags: copier:"IsShared"
string service_id = 16; // @gotags: copier:"ServiceId"
int32 progress = 17; // @gotags: copier:"Progress"
int32 shared_count = 18; // @gotags: copier:"SharedCount"
string tenant = 19; // @gotags: copier:"Tenant"
string status = 20; // @gotags: copier:"Status"
string is_opened_sample_collection = 21; // @gotags: copier:"IsOpenedSampleCollection"
int32 transition_at = 22; // @gotags: copier:"TransitionAt"
bool is_free = 23; // @gotags: copier:"IsFree"
map<string, string> additional_properties = 24; // @gotags: copier:"AdditionalProperties"
string cluster_id = 25; // @gotags: copier:"ClusterId"
string vpc_id = 26; // @gotags: copier:"VpcId"
string subnet_network_id = 27; // @gotags: copier:"SubnetNetworkId"
string security_group_id = 28; // @gotags: copier:"SecurityGroupId"
repeated QueryServiceConfig config = 29; // @gotags: copier:"Config"
string debug_url = 30; // @gotags: copier:"DebugUrl"
string access_address = 31; // @gotags: copier:"AccessAddress"
string bind_access_address = 32; // @gotags: copier:"BindAccessAddress"
string update_time = 33; // @gotags: copier:"UpdateTime"
int32 code = 34; // @gotags: copier:"Code"
string msg = 35; // @gotags: copier:"Msg"
string error_msg = 36;// @gotags: copier:"ErrorMsg"
}
message QueryServiceConfig{
string model_version = 1; // @gotags: copier:"ModelVersion"
string finished_time = 2; // @gotags: copier:"FinishedTime"
CustomSpec CustomSpec = 3; // @gotags: copier:"CustomSpec"
map<string, string> envs = 4; // @gotags: copier:"Envs"
string specification = 5; // @gotags: copier:"Specification"
int32 weight = 6; // @gotags: copier:"Weight"
string model_id = 7; // @gotags: copier:"ModelId"
string src_path = 8; // @gotags: copier:"SrcPath"
string req_uri = 9; // @gotags: copier:"ReqUri"
string mapping_type = 10; // @gotags: copier:"MappingType"
string start_time = 11; // @gotags: copier:"StartTime"
string cluster_id = 12; // @gotags: copier:"ClusterId"
repeated string nodes = 13; // @gotags: copier:"Nodes"
string mapping_rule = 14; // @gotags: copier:"MappingRule"
string model_name = 15; // @gotags: copier:"ModelName"
string src_type = 16; // @gotags: copier:"SrcType"
string dest_path = 17; // @gotags: copier:"DestPath"
int32 instance_count = 18; // @gotags: copier:"InstanceCount"
string status = 19; // @gotags: copier:"Status"
bool scaling = 20; // @gotags: copier:"Scaling"
bool support_debug = 21; // @gotags: copier:"SupportDebug"
map<string, string> additional_properties = 22; // @gotags: copier:"AdditionalProperties"
}
/******************Show Service End*************************/
/******************List Services Start*************************/
message ListServicesReq{
string project_id = 1;//@gotags: copier:"ProjectId"
int32 limit = 2;//@gotags: copier:"Limit"
int32 offSet = 3;//@gotags: copier:"Offset"
string modelArtsType = 4; // @gotags: copier:"ModelArtsType"
string platform = 5; // @gotags: copier:"Platform"
string serviceName = 6; // @gotags: copier:"serviceName"
}
message ListServicesResp{
int32 total_count = 1; // @gotags: copier:"TotalCount"
int32 count = 2; // @gotags: copier:"Count"
repeated ListServices services = 3; // @gotags: copier:"Services"
int32 code = 4; // @gotags: copier:"Code"
string msg = 5; // @gotags: copier:"Msg"
string error_msg = 6;// @gotags: copier:"ErrorMsg"
}
message ListServices{
uint32 failed_times = 1; // @gotags: copier:"FailedTimes"
string owner = 2; // @gotags: copier:"Owner"
int32 due_time = 3; // @gotags: copier:"DueTime"
int32 finished_time = 4; // @gotags: copier:"FinishedTime"
string infer_type = 5; // @gotags: copier:"InferType"
string service_name = 6; // @gotags: copier:"ServiceName"
string description = 7; // @gotags: copier:"Description"
string project = 8; // @gotags: copier:"Project"
uint32 invocation_times = 9; // @gotags: copier:"InvocationTimes"
uint32 publish_at = 10; // @gotags: copier:"PublishAt"
string workspace_id = 11; // @gotags: copier:"WorkspaceId"
repeated Scheduler scheduler = 12; // @gotags: copier:"Scheduler"
int32 start_time = 13; // @gotags: copier:"StartTime"
string operation_time = 14; // @gotags: copier:"OperationTime"
bool is_shared = 15; // @gotags: copier:"IsShared"
string service_id = 16; // @gotags: copier:"ServiceId"
int32 progress = 17; // @gotags: copier:"Progress"
int32 shared_count = 18; // @gotags: copier:"SharedCount"
string tenant = 19; // @gotags: copier:"Tenant"
string status = 20; // @gotags: copier:"Status"
string is_opened_sample_collection = 21; // @gotags: copier:"IsOpenedSampleCollection"
int32 transition_at = 22; // @gotags: copier:"TransitionAt"
bool is_free = 23; // @gotags: copier:"IsFree"
map<string, string> additional_properties = 24; // @gotags: copier:"AdditionalProperties"
}
message ListSpecificationsReq{
string project_id = 1; // @gotags: copier:"ProjectId"
bool is_personal_cluster =2;// @gotags: copier:"isPersonalCluster"
string infer_type =3; // @gotags: copier:"inferType"
int32 limit = 4;//@gotags: copier:"Limit"
int32 offSet = 5;//@gotags: copier:"Offset"
}
message ListSpecificationsResp{
message Cpu_info {
string arch = 1;
double cpu = 2;
}
message Memory_info {
string unit = 1;
uint32 memory = 2;
}
message Gpu_info {
string unit = 1;
double gpu = 2;
uint32 memory = 3;
}
message Npu_info {
string unit = 1;
uint32 npu = 2;
uint32 memory = 3;
}
message Specifications {
string specification = 1;
string billing_spec = 2;
string category = 3;
Cpu_info cpu_info = 4;
Memory_info memory_info = 5;
Gpu_info gpu_info = 6;
Npu_info npu_info = 7;
string display_en = 8;
string display_cn = 9;
bool is_open = 10;
string spec_status = 11;
bool is_free = 12;
bool over_quota = 13;
uint32 extend_params = 14;
}
uint32 total_count = 1;
uint32 count = 2;
repeated Specifications specifications = 3;
int32 code = 4; // @gotags: copier:"Code"
string msg = 5; // @gotags: copier:"Msg"
}
message UpdateServiceReq{
string project_id = 1; // @gotags: copier:"ProjectId"
string service_id = 2; // @gotags: copier:"ServiceId"
string status = 4;
}
message UpdateServiceResp{
int32 code = 1; // @gotags: copier:"Code"
string msg = 2; // @gotags: copier:"Msg"
string error_msg = 3;// @gotags: copier:"ErrorMsg"
}
/******************List Services End*************************/
/******************poos Start*************************/
message GetPoolsRuntimeMetricsReq{
string project_id = 1; // @gotags: copier:"ProjectId"
}
message GetPoolsRuntimeMetricsResp{
message Labels {
//string os.modelarts/name = 1;
//string os.modelarts/tenant.project.id = 2;
//string os.modelarts/workspace.id = 3;
}
message Metadata {
string name = 1;
string creation_timestamp = 2;
Labels labels = 3;
}
message Value {
string cpu = 1;
// string huawei.com/ascend-1980 = 2;
string memory = 3;
}
message Allocated {
Value value = 1;
string timestamp = 2;
string window = 3;
}
message Value1 {
string cpu = 1;
// string huawei.com/ascend-1980 = 2;
string memory = 3;
}
message Max_value {
string cpu = 1;
// string huawei.com/ascend-1980 = 2;
string memory = 3;
}
message Capacity {
Value1 value = 1;
Max_value max_value = 2;
string timestamp = 3;
string window = 4;
string ai_chip = 5;
}
message Table {
Allocated allocated = 1;
Capacity capacity = 2;
}
message Items {
Metadata metadata = 1;
Table table = 2;
}
int32 code = 1; //@gotags: copier:"Code"
string msg = 2; //@gotags: copier:"Msg"
string error_msg = 3; // @gotags: copier:"ErrorMsg"
string api_version = 4;
string kind = 5;
repeated Items items = 6;
}
message GetResourceFlavorsReq{
string project_id = 1; // @gotags: copier:"ProjectId"
}
message GetResourceFlavorsResp{
message Metadata {
}
message Labels {
}
message Metadata1 {
string name = 1;
Labels labels = 2;
}
message Data_volumes {
string volume_type = 1;
string size = 2;
}
message Spec {
string cpu_arch = 1;
string cpu = 2;
string memory = 3;
string type = 4;
repeated uint32 billing_modes = 5;
repeated Data_volumes data_volumes = 6;
Npu npu = 7;
string node_config_template = 8;
}
message Npu {
string type = 1;
string size = 2;
string memory = 3;
}
message Phase {
}
message Status {
Phase phase = 1;
}
message Items {
string kind = 1;
string api_version = 2;
Metadata1 metadata = 3;
Spec spec = 4;
Status status = 5;
}
string kind = 1;
string api_version = 2;
Metadata metadata = 3;
repeated Items items = 4;
}
/******************poos end*************************/
/******************List Clusters Start*************************/
message ListClustersReq{
string project_id = 1; // @gotags: copier:"ProjectId"
string Cluster_name = 2; // @gotags: copier:"ClusterName"
int64 offset = 3; // @gotags: copier:"Offset"
int64 limit = 4; // @gotags: copier:"Limit"
string sort_by = 5; // @gotags: copier:"SortBy"
string order = 6; // @gotags: copier:"Order"
string modelArtsType = 7; // @gotags: copier:"ModelArtsType"
string platform = 8;
}
message ListClustersResp{
ListClustersResp200 resp200 = 1; //@gotags: copier:"Resp200"
ListClustersResp400 resp400 = 2; //@gotags: copier:"Resp400"
}
message ListClustersResp200{
int32 count = 2; // @gotags: copier:"Count"
repeated Cluster clusters = 3; // @gotags: copier:"Clusters"
}
message ListClustersResp400{
string error_code = 1; //@gotags: copier:"ErrorCode"
string error_msg = 2; //@gotags: copier:"ErrorMsg"
}
message Cluster{
string owner = 1; // @gotags: copier:"Owner"
string cluster_name = 2; // @gotags: copier:"ClusterName"
int32 period_num = 3; // @gotags: copier:"PeriodNum"
int32 created_at = 4; // @gotags: copier:"CreatedAt"
string description = 5; // @gotags: copier:"Description"
string project = 6; // @gotags: copier:"Project"
int64 allocatable_memory = 7; // @gotags: copier:"AllocatableMemory"
string cluster_id = 8; // @gotags: copier:"ClusterId"
ClusterNode nodes = 9; // @gotags: copier:"Nodes"
float allocatable_cpu_cores = 10; // @gotags: copier:"AllocatableCpuCores"
string order_id = 11; // @gotags: copier:"OrderId"
string period_type = 12; // @gotags: copier:"PeriodType"
string tenant = 13; // @gotags: copier:"Tenant"
string status = 14; // @gotags: copier:"Status"
}
message ClusterNode{
int32 available_count = 1; // @gotags: copier:"AvailableCount"
int32 count = 2; // @gotags: copier:"Count"
string specification = 3; // @gotags: copier:"Specification"
}
/******************List Clusters End*************************/
/******************create dataset start*************************/
message CreateDataSetReq {
string workspace_id = 1; // @gotags: copier:"WorkspaceId" json:"workspace_id"
string dataset_name = 2; // @gotags: copier:"DatasetName" json:"dataset_name"
string description = 3; // @gotags: copier:"Description" json:"description"
int64 dataset_format = 4; // @gotags: copier:"DatasetFormat" json:"dataset_format"
string work_path = 5; // @gotags: copier:"WorkPath" json:"work_path"
int64 work_path_type = 6; // @gotags: copier:"WorkPathType" json:"work_path_type"
repeated DataSources data_sources = 7; // @gotags: copier:"DataSources" json:"data_sources"
ImportConfig import_config = 8; // @gotags: copier:"ImportConfig" json:"import_config"
int64 data_type = 9; // @gotags: copier:"DataType" json:"data_type"
int64 import_type = 10; // @gotags: copier:"ImportType" json:"import_type"
string platform = 11;
}
message CreateDataSetResq{
string dataset_id = 1; // @gotags: copier:"DatasetId"
int32 error_code = 2; //@gotags: copier:"error_code"
string error_msg = 3; //@gotags: copier:"error_msg"
string import_task_id = 4;// @gotags: copier:"import_task_id"
}
/******************create dataset end*************************/
/******************create dataset start*************************/
message DeleteDataSetReq {
string dataset_id = 2; // @gotags: copier:"DatasetId"
string platform = 3;
}
message DeleteDataSetResq{
int32 code = 1; //@gotags: copier:"Code"
string msg = 2; //@gotags: copier:"Msg"
string error_msg = 3;// @gotags: copier:"ErrorMsg"
}
/******************create dataset end*************************/
/******************Notebook Start*************************/
message ListNotebookReq{
string project_id = 1; // @gotags: copier:"ProjectId"
ListNotebookParam param = 2; // @gotags: copier:"Param"
string modelArtsType = 3; // @gotags: copier:"ModelArtsType"
string platform = 4; // @gotags: copier:"Platform"
}
message ListNotebookResp{
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"
int32 code = 6; // @gotags: copier:"Code"
string msg = 7; // @gotags: copier:"Msg"
string error_msg = 8;// @gotags: copier:"ErrorMsg"
}
message ListNotebookParam{
string feature = 1; // @gotags: copier:"Feature"
int32 limit = 2; // @gotags: copier:"Limit"
string name = 3; // @gotags: copier:"Name"
string pool_id = 4; // @gotags: copier:"PoolId"
int32 offset = 5; // @gotags: copier:"Offset"
string owner = 6; // @gotags: copier:"Owner"
string sort_dir = 7; // @gotags: copier:"SortDir"
string sort_key = 8; // @gotags: copier:"SortKey"
string status = 9; // @gotags: copier:"Status"
string workspaceId = 10; // @gotags: copier:"WorkspaceId"
}
message CreateNotebookReq{
string project_id = 1; // @gotags: copier:"ProjectId"
CreateNotebookParam param = 2; // @gotags: copier:"Param"
string modelArtsType = 3; // @gotags: copier:"ModelArtsType"
string platform = 4;
}
message CreateNotebookResp{
NotebookResp notebookResp = 1; // @gotags: copier:"NotebookResp"
int32 code = 2; // @gotags: copier:"Code"
string msg = 3; // @gotags: copier:"Msg"
string error_msg = 4;// @gotags: copier:"ErrorMsg"
}
message CreateNotebookParam{
string description = 1; // @gotags: copier:"Description"
int64 duration = 2; // @gotags: copier:"Duration"
repeated EndpointsReq endpoints = 3; // @gotags: copier:"Endpoints"
string feature = 4; // @gotags: copier:"Feature"
string flavor = 5; // @gotags: copier:"Flavor"
string image_id = 6; // @gotags: copier:"ImageId"
string name = 7; // @gotags: copier:"Name"
string pool_id = 8; // @gotags: copier:"PoolId"
VolumeReq volume = 9; // @gotags: copier:"Volume"
string workspace_id = 10; // @gotags: copier:"WorkspaceId"
CustomHooks hooks = 11; // @gotags: copier:"Hooks"
LeaseReq lease = 12; // @gotags: copier:"Lease"
}
message StartNotebookReq{
string id = 1; // @gotags: copier:"Id"
string project_id = 2; // @gotags: copier:"ProjectId"
StartNotebookParam param = 3; // @gotags: copier:"Param"
string modelArtsType = 4; // @gotags: copier:"ModelArtsType"
string platform = 5; // @gotags: copier:"Platform"
}
message StartNotebookResp{
NotebookResp notebookResp = 1; // @gotags: copier:"NotebookResp"
int32 code = 2; // @gotags: copier:"Code"
string msg = 3; // @gotags: copier:"Msg"
string error_msg = 4;// @gotags: copier:"ErrorMsg"
}
message StartNotebookParam{
int64 duration = 1; // @gotags: copier:"Duration"
string type = 2; // @gotags: copier:"TypeStartNotebook"
}
message StopNotebookReq{
string id = 1; // @gotags: copier:"Id"
string project_id = 2; // @gotags: copier:"ProjectId"
string modelArtsType = 3; // @gotags: copier:"ModelArtsType"
string platform = 4;
}
message StopNotebookResp{
NotebookResp notebookResp = 1; // @gotags: copier:"NotebookResp"
int32 code = 2; // @gotags: copier:"Code"
string msg = 3; // @gotags: copier:"Msg"
string error_msg = 4;// @gotags: copier:"ErrorMsg"
}
message GetNotebookStorageReq{
string instance_id = 1; // @gotags: copier:"InstanceId"
string project_id = 2; // @gotags: copier:"ProjectId"
string modelArtsType = 3; // @gotags: copier:"ModelArtsType"
string platform = 4;
}
message GetNotebookStorageResp{
int32 current = 1; // @gotags: copier:"Current"
repeated DataVolumesRes data = 2; // @gotags: copier:"Data"
int32 pages = 3; // @gotags: copier:"Pages"
int32 size = 4; // @gotags: copier:"Size"
int64 total = 5; // @gotags: copier:"Total"
}
message MountNotebookStorageReq{
string instance_id = 1; // @gotags: copier:"InstanceId"
string project_id = 2; // @gotags: copier:"ProjectId"
MountNotebookStorageParam param = 3; // @gotags: copier:"Param"
string modelArtsType = 4; // @gotags: copier:"ModelArtsType"
string platform = 5;
}
message MountNotebookStorageResp{
string category = 1; // @gotags: copier:"Category"
string id = 2; // @gotags: copier:"Id"
string mount_path = 3; // @gotags: copier:"MountPath"
string status = 4; // @gotags: copier:"Status"
string uri = 5; // @gotags: copier:"Uri"
}
message GetNotebookFlavorsReq{
string project_id =1;
string category =2;
string type =3;
int32 limit = 4;//@gotags: copier:"Limit"
int32 offSet = 5;//@gotags: copier:"Offset"
}
message GetNotebookFlavorsResp{
message Billing {
string code = 1;
uint32 unit_num = 2;
}
message Gpu {
double gpu = 1;
string gpu_memory = 2;
string type = 3;
}
message Data {
string arch = 1;
Billing billing = 2;
string category = 3;
string description = 4;
string evs_max_size = 5;
string feature = 6;
bool free = 7;
Gpu gpu = 8;
string id = 9;
uint32 memory = 10;
string name = 11;
bool sold_out = 12;
repeated string storages = 13;
uint32 vcpus = 14;
}
uint32 current = 1;
repeated Data data = 2;
uint32 pages = 3;
uint32 size = 4;
uint32 total = 5;
}
message ListImagesReq {
string project_id = 1; // @gotags: copier:"ProjectId"
int32 limit = 2;//@gotags: copier:"Limit"
int32 offset = 3;//@gotags: copier:"Offset"
string name = 4;//@gotags: copier:"Name"
string service_type = 5;//@gotags: copier:"ServiceType"
string type = 6;//@gotags: copier:"type"
string workspace_id = 7;//@gotags: copier:"workspace_id"
string sort_key =8;//@gotags: copier:"sort_key"
}
message ListImagesResp {
message Data {
string arch = 1;
uint64 create_at = 2;
string description = 3;
repeated string dev_services = 4;
string id = 5;
string name = 6;
repeated string resource_categories = 7;
string service_type = 8;
string status = 9;
string swr_path = 10;
string tag = 11;
string type = 12;
uint64 update_at = 13;
string workspace_id = 14;
}
uint32 current = 1;
repeated Data data = 2;
uint32 pages = 3;
uint32 size = 4;
uint32 total = 5;
int32 code =6; // @gotags: copier:"Code"
string message =7; // @gotags: copier:"Msg"
}
message DeleteImagesReq{
}
message DeleteImagesResp{
}
message MountNotebookStorageParam{
string category = 1; // @gotags: copier:"Category"
string mount_path = 2; // @gotags: copier:"MountPath"
string uri = 3; // @gotags: copier:"Uri"
}
message DataVolumesRes{
string category = 1; // @gotags: copier:"Category"
string id = 2; // @gotags: copier:"Id"
string mount_path = 3; // @gotags: copier:"MountPath"
string status = 4; // @gotags: copier:"Status"
string uri = 5; // @gotags: copier:"Uri"
}
message NotebookResp{
repeated ActionProgress action_progress = 1; // @gotags: copier:"ActionProgress"
string description = 2; // @gotags: copier:"Description"
repeated EndpointsRes endpoints = 3; // @gotags: copier:"Endpoints"
string fail_reason = 4; // @gotags: copier:"FailReason"
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:"WorkspaceId"
string feature = 16; // @gotags: copier:"Feature"
int64 create_at = 17; // @gotags: copier:"CreateAt" *
Hooks hooks = 18; // @gotags: copier:"Hooks" *
repeated string tags = 19; // @gotags: copier:"Tags" *
int64 update_at = 20; // @gotags: copier:"UpdateAt" *
UserNotebookResp user = 21; // @gotags: copier:"UserNotebookResp" *
string user_id = 22; // @gotags: copier:"UserId" *
repeated string billing_items = 23; // @gotags: copier:"BillingItems" *
}
message UserNotebookResp{
UserNotebookDomain domain = 1; // @gotags: copier:"UserNotebookDomain" *
string id = 2; // @gotags: copier:"Id" *
string name = 3; // @gotags: copier:"Name" *
}
message UserNotebookDomain{
string id = 1; // @gotags: copier:"Id" *
string name = 2; // @gotags: copier:"Name" *
}
message Hooks {
ContainerHooksResp containerHooks = 1; // @gotags: copier:"ContainerHooksResp" *
}
message ContainerHooksResp{
PostStart postStart = 1; // @gotags: copier:"PostStart" *
PreStart preStart = 2; // @gotags: copier:"PreStart" *
}
message PostStart{
string mode = 1; // @gotags: copier:"Mode" *
string script = 2; // @gotags: copier:"Script" *
string type = 3; // @gotags: copier:"Type" *
}
message PreStart{
string mode = 1; // @gotags: copier:"Mode" *
string script = 2; // @gotags: copier:"Script" *
string type = 3; // @gotags: copier:"Type" *
}
message ActionProgress{
int32 step = 1; // @gotags: copier:"Step" *
string status = 2; // @gotags: copier:"Status" *
string description = 3; // @gotags: copier:"Description" *
}
message JobProgress{
string notebook_id = 1; // @gotags: copier:"NotebookId"
string status = 2; // @gotags: copier:"Status"
int32 step = 3; // @gotags: copier:"Step"
string step_description = 4; // @gotags: copier:"StepDescription"
}
message EndpointsRes{
repeated string allowed_access_ips = 1; // @gotags: copier:"AllowedAccessIps"
string dev_service = 2; // @gotags: copier:"DevService"
repeated string ssh_keys = 3; // @gotags: copier:"SshKeys"
}
message Image{
string arch = 1; // @gotags: copier:"Arch"
int64 create_at = 2; // @gotags: copier:"CreateAt"
string description = 3; // @gotags: copier:"Description"
repeated string dev_services = 4; // @gotags: copier:"DevServices"
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:"ResourceCategories"
string service_type = 10; // @gotags: copier:"ServiceType"
int64 size = 11; // @gotags: copier:"Size"
string status = 12; // @gotags: copier:"Status"
string status_message = 13; // @gotags: copier:"StatusMessage"
repeated string support_res_categories = 14; // @gotags: copier:"SupportResCategories"
string swr_path = 15; // @gotags: copier:"SwrPath"
string tag = 16; // @gotags: copier:"Tag"
string type = 17; // @gotags: copier:"TypeImage"
int64 update_at = 18; // @gotags: copier:"UpdateAt"
string visibility = 19; // @gotags: copier:"Visibility"
string workspace_id = 20; // @gotags: copier:"WorkspaceId"
}
message Lease{
int64 create_at = 1; // @gotags: copier:"CreateAt"
int64 duration = 2; // @gotags: copier:"Duration"
bool enable = 3; // @gotags: copier:"Enable"
string type = 4; // @gotags: copier:"TypeLease"
int64 update_at = 5; // @gotags: copier:"UpdateAt"
}
message Pool{
string id = 1; // @gotags: copier:"Id"
string name = 2; // @gotags: copier:"Name"
}
message VolumeRes{
int64 capacity = 1; // @gotags: copier:"Capacity"
string category = 2; // @gotags: copier:"Category"
string mount_path = 3; // @gotags: copier:"MountPath"
string ownership = 4; // @gotags: copier:"Ownership"
string status = 5; // @gotags: copier:"Status"
}
message EndpointsReq{
repeated string allowed_access_ips = 1; // @gotags: copier:"AllowedAccessIps"
string dev_service = 2; // @gotags: copier:"DevService"
repeated string ssh_keys = 3; // @gotags: copier:"SshKeys"
}
message VolumeReq{
int64 capacity = 1; // @gotags: copier:"Capacity"
string category = 2; // @gotags: copier:"Category"
string ownership = 3; // @gotags: copier:"Ownership"
string uri = 4; // @gotags: copier:"Uri"
}
message CustomHooks{
ContainerHooks container_hooks = 1; // @gotags: copier:"ContainerHooks"
}
message ContainerHooks{
Config post_start = 1; // @gotags: copier:"PostStart"
Config pre_start = 2; // @gotags: copier:"PreStart"
}
message Config{
string script = 1; // @gotags: copier:"Script"
string type = 2; // @gotags: copier:"TypeConfig"
}
message LeaseReq{
int64 duration = 1; // @gotags: copier:"Duration"
string type = 2; // @gotags: copier:"TypeLeaseReq"
}
/******************Notebook End*************************/
/******************Visualization Job Start*************************/
message GetVisualizationJobReq{
string project_id = 1; // @gotags: copier:"project_id"
GetVisualizationJobParam param = 2; // @gotags: copier:"param"
string modelArtsType = 3; // @gotags: copier:"ModelArtsType"
string platform = 4;
}
message GetVisualizationJobResp{
bool is_success = 1; // @gotags: copier:"is_success"
string error_code = 2; // @gotags: copier:"error_code"
string error_message = 3; // @gotags: copier:"error_message"
int32 job_total_count = 4; // @gotags: copier:"job_total_count"
int32 job_count_limit = 5; // @gotags: copier:"job_count_limit"
repeated Jobs jobs = 6; // @gotags: copier:"jobs"
int32 quotas = 7; // @gotags: copier:"quotas"
}
message Jobs {
string job_name = 1; // @gotags: copier:"job_name"
int32 status = 2; // @gotags: copier:"status"
int64 create_time = 3; // @gotags: copier:"create_time"
int64 duration = 4; // @gotags: copier:"duration"
string job_desc = 5; // @gotags: copier:"job_desc"
string service_url = 6; // @gotags: copier:"service_url"
string train_url = 7; // @gotags: copier:"train_url"
string job_id = 8; // @gotags: copier:"job_id"
string resource_id = 9; // @gotags: copier:"resource_id"
}
message GetVisualizationJobParam{
string status = 1; // @gotags: copier:"status"
int32 per_page = 2; // @gotags: copier:"per_page"
int32 page = 3; // @gotags: copier:"page"
string sortBy = 4; // @gotags: copier:"sortBy"
string order = 5; // @gotags: copier:"order"
string search_content = 6; // @gotags: copier:"search_content"
string workspace_id = 7; // @gotags: copier:"workspace_id"
}
message CreateVisualizationJobReq{
string project_id = 1; // @gotags: copier:"project_id"
CreateVisualizationJobParam param = 2; // @gotags: copier:"param"
string modelArtsType = 3; // @gotags: copier:"ModelArtsType"
string platform = 4;
}
message CreateVisualizationJobResp{
string error_message = 1; // @gotags: copier:"error_message"
string error_code = 2; // @gotags: copier:"error_code"
int64 job_id = 3; // @gotags: copier:"job_id"
string job_name = 4; // @gotags: copier:"job_name"
int32 status = 5; // @gotags: copier:"status"
int64 create_time = 6; // @gotags: copier:"create_time"
string service_url = 7; // @gotags: copier:"service_url"
}
message CreateVisualizationJobParam{
string job_name = 1; // @gotags: copier:"job_name"
string job_desc = 2; // @gotags: copier:"job_desc"
string train_url = 3; // @gotags: copier:"train_url"
string job_type = 4; // @gotags: copier:"job_type"
Flavor flavor = 5; // @gotags: copier:"flavor"
Schedule schedule = 6; // @gotags: copier:"schedule"
}
message Flavor{
string code = 1; // @gotags: copier:"code"
}
message Schedule{
string type = 1; // @gotags: copier:"type_schedule"
string time_unit = 2; // @gotags: copier:"time_unit"
int32 duration = 3; // @gotags: copier:"duration"
}
/******************Visualization Job End*************************/
/******************reasoning start*************************/
message ImageReasoningReq{
string file =1;
bytes content =2;
string kind =3;
string platform =4;
string service_id =5;
}
message ImageReasoningResp{
string filePath =1;
string status = 2;
string message = 3;
}
message ChatglmReasoningReq{
string platform =1;
string promt =2;
string service_id =3;
}
message ChatglmReasoningResp{
}
message ImageReasoningUrlReq {
string serviceName =1; //eg:imagenet_resnet50 模型+算法
string type =2; //eg:image 类型
string card =3; //eg:cpu 芯片
//string platform =4;
}
message ImageReasoningUrlResp {
string code =1; // @gotags: copier:"Code"
string message =2; // @gotags: copier:"Msg"
string url =3;
/* int32 total_count = 1; // @gotags: copier:"TotalCount"
int32 count = 2; // @gotags: copier:"Count"
repeated ListServices services = 3; // @gotags: copier:"Services"
string error_msg = 6;// @gotags: copier:"ErrorMsg"*/
}
/******************reasoning end*************************/
message GetTrainingJobLogsPreviewReq {
string project_id = 1; //用户项目ID。获取方法请参见获取项目ID和名称。
string training_job_id = 2; //训练作业ID。
string task_id = 3; //训练作业的任务名称。
string platform = 4;
}
message GetTrainingJobLogsPreviewResp {
string content = 1; //日志内容。如果日志大小没有超过上限n兆则返回全部内容如果日志超过了上限n兆则返回最新的n兆的日志。>2022/03/01 00:00:00 (GMT+08:00)后此参数名称由“context”改为“content”。
int32 current_size =2; //当前返回的日志大小单位字节。最大为5兆。
int32 full_size = 3; //完整的日志大小(单位:字节)。
}
// Slurm Services for Shuguang Branch
service ModelArtsService {
//get modelarts Token
rpc GetToken(TokenReq) returns (TokenResp);
//get modelarts Token
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);
//get taskList 查询数据集导入任务列表
rpc GetImportTaskList(ListImportTasksReq) returns (ListImportTasksResp);
// ListTrainingJobs 查询训练作业列表
rpc GetListTrainingJobs(ListTrainingJobsreq) returns (ListTrainingJobsresp);
// GetTrainingJobs 查询训练详情
rpc GetTrainingJobs(DetailTrainingJobsReq) returns (JobResponse);
// CreateTrainingJob 创建训练作业
rpc CreateTrainingJob(CreateTrainingJobReq) returns (CreateTrainingJobResp);
// DeleteTrainingJobConfig 删除训练作业
rpc DeleteTrainingJob(DeleteTrainingJobReq) returns (DeleteTrainingJobResp);
// CreateTrainingJobConfig 创建训练作业参数
rpc CreateTrainingJobConfig(CreateTrainingJobConfigReq) returns (CreateTrainingJobConfigResp);
// DeleteTrainingJobConfig 删除训练作业参数
rpc DeleteTrainingJobConfig(DeleteTrainingJobConfigReq) returns (DeleteTrainingJobConfigResp);
// ListTrainingJobConfig 查询训练作业参数
rpc ListTrainingJobConfig(ListTrainingJobConfigReq) returns (ListTrainingJobConfigResp);
// CreateAlgorithm 创建算法
rpc CreateAlgorithm(CreateAlgorithmReq) returns (CreateAlgorithmResp);
// ListAlgorithms 查询算法
rpc ListAlgorithms(ListAlgorithmsReq) returns (ListAlgorithmsResp);
// DeleteAlgorithms 删除算法
rpc DeleteAlgorithms(DeleteAlgorithmsReq) returns (DeleteAlgorithmsResp);
// ShowAlgorithmByUuid 展示算法详情
rpc ShowAlgorithmByUuid(ShowAlgorithmByUuidReq) returns (ShowAlgorithmByUuidResp);
// training-job-flavors 获取训练作业支持的公共规格
rpc GetTrainingJobFlavors(TrainingJobFlavorsReq) returns (TrainingJobFlavorsResp);
// GET ai-engines 查询作业引擎规格
rpc GetAiEnginesList(ListAiEnginesReq) returns (ListAiEnginesResp);
// 查询训练作业指定任务的日志(预览)
rpc GetTrainingJobLogsPreview(GetTrainingJobLogsPreviewReq) returns(GetTrainingJobLogsPreviewResp);
//export task
rpc ExportTask(ExportTaskReq) returns (ExportTaskDataResp);
rpc GetExportTasksOfDataset(GetExportTasksOfDatasetReq) returns (GetExportTasksOfDatasetResp);
rpc GetExportTaskStatusOfDataset(GetExportTaskStatusOfDatasetReq) returns (GetExportTaskStatusOfDatasetResp);
//processor task
rpc CreateProcessorTask(CreateProcessorTaskReq) returns (CreateProcessorTaskResp);
rpc DescribeProcessorTask(DescribeProcessorTaskReq) returns (DescribeProcessorTaskResp);
//model management
rpc CreateModel(CreateModelReq) returns (CreateModelResp);
rpc DeleteModel(DeleteModelReq) returns (DeleteModelResp);
rpc ListModels(ListModelReq) returns (ListModelResp);
rpc ShowModels(ShowModelReq) returns (ShowModelResp);
//service management
rpc CreateService(CreateServiceReq) returns (CreateServiceResp); //部署服务
rpc ListServices(ListServicesReq) returns (ListServicesResp);
rpc ShowService(ShowServiceReq) returns (ShowServiceResp);
rpc DeleteService(DeleteServiceReq) returns (DeleteServiceResp);
rpc ListClusters(ListClustersReq) returns (ListClustersResp);
rpc ListSpecifications(ListSpecificationsReq) returns (ListSpecificationsResp); //查询支持的服务部署规格
rpc UpdateService(UpdateServiceReq)returns (UpdateServiceResp);//启停参数
//pools
rpc GetPoolsRuntimeMetrics(GetPoolsRuntimeMetricsReq) returns (GetPoolsRuntimeMetricsResp); //查询资源实时利用率
//ResourceFlavor
rpc GetResourceFlavors(GetResourceFlavorsReq) returns (GetResourceFlavorsResp); //查询资源实时利用率
//notebook task
rpc ListNotebook(ListNotebookReq) returns (ListNotebookResp);
rpc CreateNotebook(CreateNotebookReq) returns (CreateNotebookResp);
rpc StartNotebook(StartNotebookReq) returns (StartNotebookResp);
rpc StopNotebook(StopNotebookReq) returns (StopNotebookResp);
rpc GetNotebookStorage(GetNotebookStorageReq) returns (GetNotebookStorageResp); //获取动态挂载OBS实例信息列表
rpc MountNotebookStorage(MountNotebookStorageReq) returns (MountNotebookStorageResp); //动态挂载OBS
rpc GetNotebookFlavors(GetNotebookFlavorsReq)returns (GetNotebookFlavorsResp); //查询支持可切换规格列表
rpc ListImages(ListImagesReq) returns (ListImagesResp); //查询支持的镜像列表
rpc DeleteNotebook(DeleteImagesReq) returns (DeleteImagesResp); //查询支持的服务部署规格
//visualization-jobs
rpc GetVisualizationJob(GetVisualizationJobReq) returns (GetVisualizationJobResp);
rpc CreateVisualizationJob(CreateVisualizationJobReq) returns (CreateVisualizationJobResp);
//reasoning
rpc ImageReasoning(ImageReasoningReq) returns (ImageReasoningResp);
rpc ImageReasoningUrl(ImageReasoningUrlReq) returns (ImageReasoningUrlResp);
rpc ChatglmReasoning(ChatglmReasoningReq) returns (ChatglmReasoningResp);
}
message Errors {
string errorCode = 1;
string errorMessage = 2;
string detail = 3;
}
// 创建组织/删除组织/获取组织详情
message NamespaceReq {
string namespace = 1;
string kind = 2; // @gotags: copier:"kind"
string platform = 3;
}
// 组织详情
message NamespaceInfo {
uint32 id = 1; //id
string name = 2; //组织名称。小写字母开头后面跟小写字母、数字、小数点、下划线或中划线其中下划线最多允许连续两个小数点、下划线、中划线不能直接相连小写字母或数字结尾1-64个字符。
string creator_name = 3; //IAM用户名
uint32 auth = 4; //用户权限。7表示管理权限3表示编辑权限1表示读取权限。
repeated Errors errors = 5;
}
// 查询组织列表
message ListNamespacesReq {
string namespace = 1; //组织名称。
string filter = 2; //应填写namespace::{namespace}|mode::{mode}。其中{namespace}是组织名称,{mode}如果不设置,查看有权限的组织列表;设置为visible,查看可见的组织列表(部分组织:仓库有权限,组织没有权限)。
string kind = 3; // @gotags: copier:"kind"
string platform = 4;
}
// 组织列表
message ListNamespacesResp {
repeated NamespaceInfo namespaces = 1;
repeated Errors errors = 2;
}
message resp {
int32 code = 1; // @gotags: copier:"Code"
string msg = 2; // @gotags: copier:"Msg"
repeated Errors errors = 3;
}
// 仓库
message CreateRepoReq {
string repository = 1; //镜像仓库名称
string category = 2; //是否为公共仓库可选值为true或false。
string description = 3; //仓库类型可设置为app_server, linux, framework_app, database, lang, other, windows, arm。
bool is_public = 4; //镜像仓库的描述信息。
string namespace = 5; //组织名称。
string kind = 6; // @gotags: copier:"kind"
string platform = 7;
}
message DeleteRepoReq {
string namespace = 1; //组织名称
string repository = 2; //镜像仓库名称
string kind = 3; // @gotags: copier:"kind"
string platform = 4;
}
message ListRepoReq {
string namespace = 1; //组织名称
string name = 2; //镜像仓库名称。注意和filter最好分开使用如果同时使用此过滤参数将失效以filter为准。
string category = 3; //镜像仓库分类可设置为app_server, linux, framework_app, database, lang, other, windows, arm。注意和filter最好分开使用如果同时使用此过滤参数将失效以filter为准。
string limit = 4; //返回条数。
string offset = 5; //起始索引。注意offset和limit参数需要配套使用。
string order_column = 6; //按列排序可设置为updated_at按更新时间排序。注意order_column和order_type参数需要配套使用。
string order_type = 7; //排序类型可设置为desc降序、asc升序
string filter = 8; //如果使用filter至少要传递一个filter参数。应填写 namespace::
string kind = 9; // @gotags: copier:"kind"
string id = 10; // @gotags: copier:"id"
string platform = 11;
}
message ReposDetails {
string name = 1; //仓库名称
string category = 2; //仓库类型计划改造每个镜像会有多个lable标示
string description = 3; //仓库描述信息
int64 size = 4; //仓库大小
bool is_public = 5; //仓库是否为公共仓库值为true或false
int64 num_images = 6; //仓库中镜像个数0 ~ 9223372036854775807
int64 num_download = 7; //仓库下载次数
string created_at = 8; //仓库创建时间UTC日期格式时间为UTC标准时间用户需要根据本地时间计算偏移量如东8区需要+8:00
string updated_at = 9; //仓库更新时间UTC日期格式时间为UTC标准时间用户需要根据本地时间计算偏移量如东8区需要+8:00
string logo = 10; //仓库logo地址暂时未用
string url = 11; //仓库logo图片的URLURL格式。暂时未用
string path = 12; //镜像pull路径格式为 swr.cn-north-1.myhuaweicloud.com/namespace/repository
string internal_path = 13; //镜像pull路径格式为 10.125.0.198:20202/namespace/repository
string domain_name = 14; //租户名
string namespace = 15; //租户的组织名称
repeated string tags = 16; //镜像版本列表
bool status = 17; // @gotags: copier:"status" json:"status"
uint32 total_range = 18; //总记录条数
}
message ListReposDetailsResp {
repeated ReposDetails items = 1; // @gotags: json:"body,omitempty"
repeated Errors errors = 2; // @gotags: json:"errors,omitempty"
}
//查询镜像仓库概要信息
message ShowRepositoryReq {
string namespace = 1 ; //组织名称。小写字母开头,后面跟小写字母、数字、小数点、下划线或中划线(其中下划线最多允许连续两个,小数点、下划线、中划线不能直接相连),小写字母或数字结尾,1-64个字符。
string repository = 2; //镜像仓库名称
string kind = 3; // @gotags: copier:"kind"
string platform = 4;
}
message ShowRepositoryResp {
int64 id = 1; //仓库编号
int64 ns_id = 2; //组织编号
string name = 3; //仓库名称
string category = 4; //仓库类型计划改造每个镜像会有多个lable标示
string description = 5; //仓库描述信息
string creator_id = 6; //仓库创建者id
string creator_name = 7; //仓库创建者
int64 size = 8; //仓库大小
bool is_public = 9; //仓库是否为公共仓库值为true或false
int64 num_images = 10; //仓库中镜像个数0 ~ 9223372036854775807
int64 num_download = 11; //仓库下载次数
string url = 12; //仓库logo图片的URLURL格式。暂时未用
string path = 13; //镜像pull路径格式为 swr.cn-north-1.myhuaweicloud.com/namespace/repository
string internal_path = 14; //镜像pull路径格式为 10.125.0.198:20202/namespace/repository
int64 created = 15; //仓库创建时间UTC日期格式时间为UTC标准时间用户需要根据本地时间计算偏移量如东8区需要+8:00
int64 updated = 16; //仓库更新时间UTC日期格式时间为UTC标准时间用户需要根据本地时间计算偏移量如东8区需要+8:00
string domain_id = 17; //帐号ID
uint32 priority = 18; //镜像排序优先级
}
message UpdateRepoReq{
string category = 1; //仓库类型可设置为app_server, linux, framework_app, database, lang, other, windows, arm。
string description = 2; //镜像仓库的描述信息。
bool is_public = 3; //是否为公共仓库
string kind = 4; // @gotags: copier:"kind"
string namespace = 5; //组织名称
string repository = 6; //镜像仓库名称
string platform = 7;
}
message ListRepositoryTagsReq {
string namespace = 1; //组织名称
string repository = 2; //镜像仓库名称。注意和filter最好分开使用如果同时使用此过滤参数将失效以filter为准。
string tag = 3; //Tag版本名称
string limit = 4; //返回条数。
string offset = 5; //起始索引。注意offset和limit参数需要配套使用。
string order_column = 6; //按列排序可设置为updated_at按更新时间排序。注意order_column和order_type参数需要配套使用。
string order_type = 7; //排序类型可设置为desc降序、asc升序
string filter = 8; //如果使用filter至少要传递一个filter参数。应填写 namespace::
string kind = 9; // @gotags: copier:"kind"
string platform = 10;
}
message ListRepositoryTagsResp {
repeated RepositoryTags items = 1;
}
message RepositoryTags {
int64 id = 1; //tag编号
int64 repo_id = 2; //仓库编号
string Tag = 3; //Tag版本名称
string image_id = 4; //镜像id
string manifest = 5; //镜像manifest
string text_manifest = 6;
string digest = 7; //镜像hash值
int64 schema = 8; //docker协议版本值为1或2
string path = 9; //镜像pull地址格式为swr.cn-north-1.myhuaweicloud.com/namespace/repository:tag
string internal_path = 10; //cce集群内镜像pull路径格式为 10.125.0.198:20202/namespace/repository:tag
int64 size = 11; //镜像大小0 ~ 9223372036854775807
bool is_trusted = 12; //默认值为false 缺省值false
int64 created = 13; //镜像创建时间
int64 updated = 14; //镜像更新时间
string deleted = 15; //镜像删除时间
string domain_id = 16; //帐号ID
bool scanned = 17; //镜像是否被扫描过
int64 tag_type = 18; //0manifest类型1manifest list类型
}
message DeleteRepoTagReq{
string namespace = 1; //组织名称
string repository = 2; //镜像仓库名称
string tag = 3; //镜像版本名称
string Kind = 4; // @gotags: copier:"kind"
string platform = 5;
}
//FileRequest
message FileRequest {
string FileName = 1;
bytes Content = 2;
string Kind = 3; // @gotags: copier:"kind"
}
message FileResponse {
string FilePath = 1;
}
message FileData {
string filename = 1;
bytes content = 2;
}
message MetricsPoolsRequest {
}
message MetricsPoolsResponse{
message SomeMessage {
message Value {
uint32 cpu = 1;
string memory = 2;
// string nvidia.com/t4 = 3;
}
message Allocated {
Value value = 1;
string timestamp = 2;
string window = 3;
}
message Value1 {
uint32 cpu = 1;
string memory = 2;
// uint32 nvidia.com/t4 = 3;
}
message Maxvalue {
uint32 cpu = 1;
string memory = 2;
// uint32 nvidia.com/t4 = 3;
}
message Capacity {
Value1 value = 1;
Maxvalue maxValue = 2;
string timestamp = 3;
string window = 4;
}
message Table {
Allocated allocated = 1;
Capacity capacity = 2;
}
message Metadata {
string name = 1;
}
message Items {
Table table = 1;
Metadata metadata = 2;
}
string apiVersion = 1;
string kind = 2;
repeated Items items = 3;
}
}
service imagesService {
// CreateNamespace 创建组织
rpc CreateNamespace(NamespaceReq) returns (resp) {};
// 查询组织列表
rpc ListNamespaces(ListNamespacesReq) returns (ListNamespacesResp) {};
//删除组织
rpc DeleteNamespaces(NamespaceReq) returns (resp) {};
//获取组织详情
rpc ShowNamespace(NamespaceReq) returns (NamespaceInfo) {};
//在组织下创建镜像仓库
rpc CreateRepo(CreateRepoReq) returns (resp) {};
//删除组织下的镜像仓库
rpc DeleteRepo(DeleteRepoReq) returns (resp) {};
//查询镜像仓库列表
rpc ListReposDetails(ListRepoReq) returns (ListReposDetailsResp) {};
//查询镜像仓库概要信息
rpc ShowRepository(ShowRepositoryReq) returns (ShowRepositoryResp) {};
//更新镜像仓库的概要信息
rpc UpdateRepo(UpdateRepoReq) returns (resp) {};
//删除指定tag的镜像
rpc DeleteRepoTag(DeleteRepoTagReq) returns (resp) {};
//查询镜像tag列表
rpc ListRepositoryTags(ListRepositoryTagsReq) returns (ListRepositoryTagsResp) {};
// 镜像上传
rpc UploadFile(FileRequest) returns (FileResponse);
// 镜像下载
rpc DownloadFile(FileRequest) returns (FileData);
// 查询资源实时利用率
rpc getMetricsPools(MetricsPoolsRequest) returns (MetricsPoolsResponse);
}