训练作业p端完成

This commit is contained in:
ll15074821352 2023-06-13 17:37:28 +08:00
parent 5eda47bdef
commit e72a41ae75
2 changed files with 38 additions and 4 deletions

View File

@ -39,6 +39,7 @@ func (l *CreateTrainingJobLogic) CreateTrainingJob(in *modelarts.CreateTrainingJ
if modelArtsType == l.svcCtx.Config.HaweiModelArtsType {
modelArtsUrl := l.svcCtx.Config.ModelArtsUrl
url := modelArtsUrl + "v2/" + in.ProjectId + "/training-jobs"
//url := "https://modelarts.cn-north-4.myhuaweicloud.com/v2/0a62ffb0d48026c12fbfc011b8d23f0b/training-jobs"
reqByte, err := json.Marshal(in)
if err != nil {
return nil, err

View File

@ -264,7 +264,6 @@ message JobAlgorithmResponse{
repeated Environments environments=17;//@gotags: copier:"Environments"
}
message Environments{
map<string,string> environments =1;
}
message TaskResponse{
string role =1;
@ -527,9 +526,9 @@ message ConstraintCreateTraining {
message ParametersTrainJob {
string name = 1; // @gotags: copier:"Name"
string description = 2; // @gotags: copier:"Description"
string value = 3; // @gotags: copier:"Value"
ConstraintCreateTraining constraint = 4; // @gotags: copier:"ConstraintCreateTraining"
// string description = 2; // @gotags: copier:"Description"
string value = 2; // @gotags: copier:"Value"
// ConstraintCreateTraining constraint = 4; // @gotags: copier:"ConstraintCreateTraining"
}
message PoliciesCreateTraining {
@ -544,11 +543,45 @@ message Algorithms {
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;
repeated OutputTraining outputs =12;
Environments environments =13;
}
message InputTraining{
string name = 1;
string access_method = 2;
RemoteTra remote = 3;
}
message OutputTraining{
string name = 1;
string access_method = 2;
bool prefetch_to_local =3;
RemoteOut remote = 4;
}
message RemoteTra{
DatasetTra dataset =1;
}
message RemoteOut{
ObsTra obs =1;
}
message ObsTra{
string obs_url =1;
}
message DatasetTra{
string id = 1;
string name = 2;
string version_name = 3;
string version_id = 4;
}
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 {