提交创建算法,训练作业等出参完善

This commit is contained in:
lee 2023-03-21 09:15:42 +08:00
parent c9ef016d1c
commit b2f83c906d
2 changed files with 25 additions and 17 deletions

View File

@ -512,18 +512,18 @@ type FlavorDetail {
FlavorInfo FlavorInfo `json:"flavor_info"`
}
type Resource {
Policy string `json:"policy"`
FlavorID string `json:"flavor_id"`
FlavorName string `json:"flavor_name"`
NodeCount int32 `json:"node_count"`
FlavorDetail FlavorDetail `json:"flavor_detail"`
Policy string `json:"policy,optional"`
FlavorId string `json:"flavor_id,optional"`
FlavorName string `json:"flavor_name,optional"`
NodeCount int32 `json:"node_count,optional"`
FlavorDetail FlavorDetail `json:"flavor_detail,optional"`
}
type LogExportPathCreateTraining {
}
type Spec {
Resource Resource `json:"resource"`
LogExportPath LogExportPathCreateTraining `json:"log_export_path"`
IsHostedLog bool `json:"is_hosted_log"`
Resource Resource `json:"resource"`
LogExportPath LogExportPath `json:"log_export_path"`
IsHostedLog bool `json:"is_hosted_log"`
}
type Items {
Kind string `json:"kind"`
@ -1404,6 +1404,7 @@ type (
EngineCreateTraining EngineCreateTraining `json:"engine,optional"`
ParametersTrainJob []ParametersTrainJob `json:"parameters,optional"`
PoliciesCreateTraining PoliciesCreateTraining `json:"policies,optional"`
Command string `json:"command,optional"`
}
ResourceCreateTraining {
@ -1412,17 +1413,18 @@ type (
}
LogExportPathCreateTrainingJob {
ObsUrl string `json:"obs_url,optional"`
}
SpecsCtRq {
ResourceCreateTraining ResourceCreateTraining `json:"resource,optional"`
LogExportPathCreateTrainingJob LogExportPathCreateTrainingJob `json:"logExportPath,optional"`
IsHostedLog bool `json:"isHostedLog,optional"`
Resource ResourceCreateTraining `json:"resource,optional"`
Volumes []Volumes `json:"volumes,optional"`
LogExportPath LogExportPath `json:"log_export_path,optional"`
}
SpecCtRp {
Resource *Resource `json:"resource,optional"`
Volumes []*Volumes `json:"volumes,optional"`
LogExportPath *LogExportPath `json:"log_export_path,optional"`
Resource ResourceCreateTraining `json:"resource,optional"`
Volumes []Volumes `json:"volumes,optional"`
LogExportPath LogExportPath `json:"log_export_path,optional"`
}
LogExportPath {
ObsUrl string `json:"obs_url,optional"`

View File

@ -482,7 +482,7 @@ message CreateTrainingJobReq {
string kind = 1; // @gotags: copier:"Kind"
MetadataS metadata = 2; // @gotags: copier:"Metadatas"
Algorithms algorithm = 3; // @gotags: copier:"AlgorithmsCtRq"
Specs spec = 4; // @gotags: copier:"SpecsCtRq"
SpecsC spec = 4; // @gotags: copier:"SpecsCtRq"
string project_id =5; // @gotags: copier:"ProjectId"
}
//
@ -544,11 +544,12 @@ message Algorithms {
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"
}
message ResourceCreateTraining {
string flavor_id = 1;
int32 node_count = 2;
string flavor_id = 1; // @gotags: copier:"FlavorId"
int32 node_count = 2; // @gotags: copier:"NodeCount"
}
message LogExportPathCreateTraining {
@ -562,6 +563,11 @@ message Specs {
/******************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;