训练作业p端完成
Former-commit-id: e72a41ae7520fa0cbd175c7c23d1a79285b56cce
This commit is contained in:
parent
ddd8a9cd8d
commit
b2ccfe9979
|
@ -39,6 +39,7 @@ func (l *CreateTrainingJobLogic) CreateTrainingJob(in *modelarts.CreateTrainingJ
|
||||||
if modelArtsType == l.svcCtx.Config.HaweiModelArtsType {
|
if modelArtsType == l.svcCtx.Config.HaweiModelArtsType {
|
||||||
modelArtsUrl := l.svcCtx.Config.ModelArtsUrl
|
modelArtsUrl := l.svcCtx.Config.ModelArtsUrl
|
||||||
url := modelArtsUrl + "v2/" + in.ProjectId + "/training-jobs"
|
url := modelArtsUrl + "v2/" + in.ProjectId + "/training-jobs"
|
||||||
|
//url := "https://modelarts.cn-north-4.myhuaweicloud.com/v2/0a62ffb0d48026c12fbfc011b8d23f0b/training-jobs"
|
||||||
reqByte, err := json.Marshal(in)
|
reqByte, err := json.Marshal(in)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
|
@ -264,7 +264,6 @@ message JobAlgorithmResponse{
|
||||||
repeated Environments environments=17;//@gotags: copier:"Environments"
|
repeated Environments environments=17;//@gotags: copier:"Environments"
|
||||||
}
|
}
|
||||||
message Environments{
|
message Environments{
|
||||||
map<string,string> environments =1;
|
|
||||||
}
|
}
|
||||||
message TaskResponse{
|
message TaskResponse{
|
||||||
string role =1;
|
string role =1;
|
||||||
|
@ -527,9 +526,9 @@ message ConstraintCreateTraining {
|
||||||
|
|
||||||
message ParametersTrainJob {
|
message ParametersTrainJob {
|
||||||
string name = 1; // @gotags: copier:"Name"
|
string name = 1; // @gotags: copier:"Name"
|
||||||
string description = 2; // @gotags: copier:"Description"
|
// string description = 2; // @gotags: copier:"Description"
|
||||||
string value = 3; // @gotags: copier:"Value"
|
string value = 2; // @gotags: copier:"Value"
|
||||||
ConstraintCreateTraining constraint = 4; // @gotags: copier:"ConstraintCreateTraining"
|
// ConstraintCreateTraining constraint = 4; // @gotags: copier:"ConstraintCreateTraining"
|
||||||
}
|
}
|
||||||
|
|
||||||
message PoliciesCreateTraining {
|
message PoliciesCreateTraining {
|
||||||
|
@ -544,11 +543,45 @@ message Algorithms {
|
||||||
repeated ParametersTrainJob parameters = 6;// @gotags: copier:"ParametersTrainJob"
|
repeated ParametersTrainJob parameters = 6;// @gotags: copier:"ParametersTrainJob"
|
||||||
PoliciesCreateTraining policies = 7;// @gotags: copier:"PoliciesCreateTraining"
|
PoliciesCreateTraining policies = 7;// @gotags: copier:"PoliciesCreateTraining"
|
||||||
string command =8; // @gotags: copier:"Command"
|
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 {
|
message ResourceCreateTraining {
|
||||||
string flavor_id = 1; // @gotags: copier:"FlavorId"
|
string flavor_id = 1; // @gotags: copier:"FlavorId"
|
||||||
int32 node_count = 2; // @gotags: copier:"NodeCount"
|
int32 node_count = 2; // @gotags: copier:"NodeCount"
|
||||||
|
string policy = 3; // @gotags: copier:"Policy"
|
||||||
|
string flavor_label = 4; // @gotags: copier:"FlavorLabel"
|
||||||
}
|
}
|
||||||
|
|
||||||
message LogExportPathCreateTraining {
|
message LogExportPathCreateTraining {
|
||||||
|
|
Loading…
Reference in New Issue