|
|
@@ -14,6 +14,7 @@ const ( |
|
|
JobTypeFinetuning = "Finetuning" |
|
|
JobTypeFinetuning = "Finetuning" |
|
|
JobTypeDataPreprocess = "DataPreprocess" |
|
|
JobTypeDataPreprocess = "DataPreprocess" |
|
|
JobTypeDataReturn = "DataReturn" |
|
|
JobTypeDataReturn = "DataReturn" |
|
|
|
|
|
JobTypeReport = "Report" |
|
|
|
|
|
|
|
|
FileInfoTypePackage = "Package" |
|
|
FileInfoTypePackage = "Package" |
|
|
FileInfoTypeLocalFile = "LocalFile" |
|
|
FileInfoTypeLocalFile = "LocalFile" |
|
|
@@ -209,7 +210,10 @@ type BindingJobInfo struct { |
|
|
JobInfoBase |
|
|
JobInfoBase |
|
|
Type string `json:"type"` |
|
|
Type string `json:"type"` |
|
|
Info DataBinding `json:"info"` |
|
|
Info DataBinding `json:"info"` |
|
|
Name string `json:"name"` // 临时使用 |
|
|
|
|
|
|
|
|
// 下面参数用于工作流输入 |
|
|
|
|
|
PackageID cdssdk.PackageID `json:"packageID"` |
|
|
|
|
|
ClusterID ClusterID `json:"clusterID"` |
|
|
|
|
|
Output string `json:"output"` |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
type DataBinding interface { |
|
|
type DataBinding interface { |
|
|
@@ -230,15 +234,16 @@ func (d *DataBindingBase) Noop() {} |
|
|
type ModelBinding struct { |
|
|
type ModelBinding struct { |
|
|
serder.Metadata `union:"model"` |
|
|
serder.Metadata `union:"model"` |
|
|
DataBindingBase |
|
|
DataBindingBase |
|
|
Type string `json:"type"` |
|
|
|
|
|
Name string `json:"name"` |
|
|
|
|
|
Description string `json:"description"` |
|
|
|
|
|
ClusterIDs []ClusterID `json:"clusterIDs"` |
|
|
|
|
|
Category string `json:"category"` |
|
|
|
|
|
ModelType string `json:"modelType"` |
|
|
|
|
|
Env string `json:"env"` |
|
|
|
|
|
Version string `json:"version"` |
|
|
|
|
|
RepositoryName string `json:"repositoryName"` |
|
|
|
|
|
|
|
|
Type string `json:"type"` |
|
|
|
|
|
Name string `json:"name"` |
|
|
|
|
|
Description string `json:"description"` |
|
|
|
|
|
ClusterIDs []ClusterID `json:"clusterIDs"` |
|
|
|
|
|
Category string `json:"category"` |
|
|
|
|
|
ModelType string `json:"modelType"` |
|
|
|
|
|
Env string `json:"env"` |
|
|
|
|
|
Version string `json:"version"` |
|
|
|
|
|
RepositoryName string `json:"repositoryName"` |
|
|
|
|
|
PackageID cdssdk.PackageID `json:"packageID"` |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
type DatasetBinding struct { |
|
|
type DatasetBinding struct { |
|
|
@@ -250,9 +255,9 @@ type DatasetBinding struct { |
|
|
ClusterIDs []ClusterID `json:"clusterIDs"` |
|
|
ClusterIDs []ClusterID `json:"clusterIDs"` |
|
|
Description string `json:"description"` |
|
|
Description string `json:"description"` |
|
|
Category string `json:"category"` |
|
|
Category string `json:"category"` |
|
|
PackageID cdssdk.PackageID `json:"packageID"` |
|
|
|
|
|
RepositoryName string `json:"repositoryName"` |
|
|
RepositoryName string `json:"repositoryName"` |
|
|
ConsumptionPoints int64 `json:"points"` |
|
|
ConsumptionPoints int64 `json:"points"` |
|
|
|
|
|
PackageID cdssdk.PackageID `json:"packageID"` |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
type HPCJobInfo struct { |
|
|
type HPCJobInfo struct { |
|
|
@@ -455,10 +460,14 @@ type DataPreprocessJobInfo struct { |
|
|
type DataReturnJobInfo struct { |
|
|
type DataReturnJobInfo struct { |
|
|
serder.Metadata `union:"DataReturn"` |
|
|
serder.Metadata `union:"DataReturn"` |
|
|
JobInfoBase |
|
|
JobInfoBase |
|
|
Type string `json:"type"` |
|
|
|
|
|
BucketID cdssdk.BucketID `json:"bucketID"` |
|
|
|
|
|
TargetLocalJobID string `json:"targetLocalJobID"` |
|
|
|
|
|
ReportMessage TrainJobStatusReport `json:"report"` |
|
|
|
|
|
|
|
|
Type string `json:"type"` |
|
|
|
|
|
BucketID cdssdk.BucketID `json:"bucketID"` |
|
|
|
|
|
TargetLocalJobID string `json:"targetLocalJobID"` |
|
|
|
|
|
|
|
|
|
|
|
// 下面是工作流的参数 |
|
|
|
|
|
ClusterID ClusterID `json:"clusterID"` |
|
|
|
|
|
Output string `json:"output"` |
|
|
|
|
|
PackageName string `json:"packageName"` |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// MultiInstanceJobInfo 多实例(推理任务) |
|
|
// MultiInstanceJobInfo 多实例(推理任务) |
|
|
@@ -684,6 +693,9 @@ var JobOutputTypeUnion = types.NewTypeUnion[JobOutput]( |
|
|
(*UploadJobOutput)(nil), |
|
|
(*UploadJobOutput)(nil), |
|
|
(*HPCJobOutput)(nil), |
|
|
(*HPCJobOutput)(nil), |
|
|
(*NotifyJobOutput)(nil), |
|
|
(*NotifyJobOutput)(nil), |
|
|
|
|
|
(*DataReturnJobOutput)(nil), |
|
|
|
|
|
(*PublicOutput)(nil), |
|
|
|
|
|
(*PCMInferenceJobOutput)(nil), |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
var _ = serder.UseTypeUnionInternallyTagged(&JobOutputTypeUnion, "type") |
|
|
var _ = serder.UseTypeUnionInternallyTagged(&JobOutputTypeUnion, "type") |
|
|
@@ -699,6 +711,17 @@ type PublicOutput struct { |
|
|
Output string `json:"output"` |
|
|
Output string `json:"output"` |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
type PCMInferenceJobOutput struct { |
|
|
|
|
|
serder.Metadata `union:"PCM_Inference"` |
|
|
|
|
|
JobOutputBase |
|
|
|
|
|
Type string `json:"type"` |
|
|
|
|
|
URL string `json:"url"` |
|
|
|
|
|
ID string `json:"id"` |
|
|
|
|
|
AdapterID string `json:"adapterId"` |
|
|
|
|
|
ClusterID ClusterID `json:"clusterId"` |
|
|
|
|
|
InstanceID string `json:"instanceId"` |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
type NotifyJobOutput struct { |
|
|
type NotifyJobOutput struct { |
|
|
serder.Metadata `union:"Notify"` |
|
|
serder.Metadata `union:"Notify"` |
|
|
JobOutputBase |
|
|
JobOutputBase |
|
|
@@ -709,15 +732,19 @@ type NotifyJobOutput struct { |
|
|
type HPCJobOutput struct { |
|
|
type HPCJobOutput struct { |
|
|
serder.Metadata `union:"HPCSlurm"` |
|
|
serder.Metadata `union:"HPCSlurm"` |
|
|
JobOutputBase |
|
|
JobOutputBase |
|
|
Type string `json:"type"` |
|
|
|
|
|
Output string `json:"output"` |
|
|
|
|
|
|
|
|
Type string `json:"type"` |
|
|
|
|
|
Name string `json:"name"` |
|
|
|
|
|
Output string `json:"output"` |
|
|
|
|
|
ClusterID ClusterID `json:"clusterID"` |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
type AIJobOutput struct { |
|
|
type AIJobOutput struct { |
|
|
serder.Metadata `union:"AI"` |
|
|
serder.Metadata `union:"AI"` |
|
|
JobOutputBase |
|
|
JobOutputBase |
|
|
Type string `json:"type"` |
|
|
|
|
|
Output string `json:"output"` |
|
|
|
|
|
|
|
|
Type string `json:"type"` |
|
|
|
|
|
Name string `json:"name"` |
|
|
|
|
|
Output string `json:"output"` |
|
|
|
|
|
ClusterID ClusterID `json:"clusterID"` |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
type BindingJobOutput struct { |
|
|
type BindingJobOutput struct { |
|
|
@@ -737,9 +764,9 @@ type UploadJobOutput struct { |
|
|
type DataReturnJobOutput struct { |
|
|
type DataReturnJobOutput struct { |
|
|
serder.Metadata `union:"DataReturn"` |
|
|
serder.Metadata `union:"DataReturn"` |
|
|
JobOutputBase |
|
|
JobOutputBase |
|
|
Type string `json:"type"` |
|
|
|
|
|
ReportMessage TrainJobStatusReport `json:"report"` |
|
|
|
|
|
PackageID cdssdk.PackageID `json:"packageID"` |
|
|
|
|
|
|
|
|
Type string `json:"type"` |
|
|
|
|
|
//ReportMessage TrainJobStatusReport `json:"report"` |
|
|
|
|
|
PackageID cdssdk.PackageID `json:"packageID"` |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
type JobStatusReport interface { |
|
|
type JobStatusReport interface { |
|
|
@@ -772,10 +799,14 @@ type TrainJobStatusReport struct { |
|
|
type InferenceJobStatusReport struct { |
|
|
type InferenceJobStatusReport struct { |
|
|
serder.Metadata `union:"Inference"` |
|
|
serder.Metadata `union:"Inference"` |
|
|
JobStatusReportBase |
|
|
JobStatusReportBase |
|
|
Type string `json:"type"` |
|
|
|
|
|
TaskName string `json:"taskName"` |
|
|
|
|
|
TaskID string `json:"taskID"` |
|
|
|
|
|
Status bool `json:"status"` |
|
|
|
|
|
Message string `json:"message"` |
|
|
|
|
|
URL string `json:"url"` |
|
|
|
|
|
|
|
|
Type string `json:"type"` |
|
|
|
|
|
TaskName string `json:"taskName"` |
|
|
|
|
|
TaskID string `json:"taskID"` |
|
|
|
|
|
Status bool `json:"status"` |
|
|
|
|
|
Message string `json:"message"` |
|
|
|
|
|
URL string `json:"url"` |
|
|
|
|
|
ID string `json:"id"` |
|
|
|
|
|
AdapterID string `json:"adapterId"` |
|
|
|
|
|
ClusterID ClusterID `json:"clusterId"` |
|
|
|
|
|
InstanceID string `json:"instanceId"` |
|
|
} |
|
|
} |