|
|
|
@@ -134,8 +134,7 @@ type PCMInferenceJobInfo struct { |
|
|
|
Description string `json:"description"` |
|
|
|
Files JobFilesInfo `json:"files"` |
|
|
|
JobResources JobResources `json:"jobResources"` |
|
|
|
|
|
|
|
BindingName string `json:"bindingName"` |
|
|
|
BindingID DataID `json:"bindingID"` |
|
|
|
} |
|
|
|
|
|
|
|
type AIJobInfo struct { |
|
|
|
@@ -408,15 +407,6 @@ type DataReturnJobInfo struct { |
|
|
|
ReportMessage []ReportMessage `json:"reportMessage"` |
|
|
|
} |
|
|
|
|
|
|
|
type ReportMessage struct { |
|
|
|
TaskName string `json:"taskName"` |
|
|
|
TaskID string `json:"taskID"` |
|
|
|
Status bool `json:"status"` |
|
|
|
Message string `json:"message"` |
|
|
|
ClusterID ClusterID `json:"clusterID"` |
|
|
|
Output string `json:"output"` |
|
|
|
} |
|
|
|
|
|
|
|
// MultiInstanceJobInfo 多实例(推理任务) |
|
|
|
type MultiInstanceJobInfo struct { |
|
|
|
serder.Metadata `union:"MultiInstance"` |
|
|
|
@@ -629,3 +619,53 @@ type InferencePlatform struct { |
|
|
|
SimilarityThreshold string `json:"similarityThreshold"` |
|
|
|
EntriesPerFile string `json:"entriesPerFile"` |
|
|
|
} |
|
|
|
|
|
|
|
type JobOutput interface { |
|
|
|
Output() |
|
|
|
} |
|
|
|
|
|
|
|
var JobOutputTypeUnion = types.NewTypeUnion[JobOutput]( |
|
|
|
(*AIJobOutput)(nil), |
|
|
|
(*BindingJobOutput)(nil), |
|
|
|
) |
|
|
|
|
|
|
|
var _ = serder.UseTypeUnionInternallyTagged(&JobOutputTypeUnion, "type") |
|
|
|
|
|
|
|
type JobOutputBase struct{} |
|
|
|
|
|
|
|
func (d *JobOutputBase) Output() {} |
|
|
|
|
|
|
|
type PublicOutput struct { |
|
|
|
serder.Metadata `union:"object"` |
|
|
|
JobOutputBase |
|
|
|
Type string `json:"type"` |
|
|
|
} |
|
|
|
|
|
|
|
type AIJobOutput struct { |
|
|
|
serder.Metadata `union:"object"` |
|
|
|
JobOutputBase |
|
|
|
Type string `json:"type"` |
|
|
|
} |
|
|
|
|
|
|
|
type BindingJobOutput struct { |
|
|
|
serder.Metadata `union:"binding"` |
|
|
|
JobOutputBase |
|
|
|
Type string `json:"type"` |
|
|
|
BindingID DataID `json:"bindingID"` |
|
|
|
} |
|
|
|
|
|
|
|
type DataReturnJobOutput struct { |
|
|
|
serder.Metadata `union:"DataReturn"` |
|
|
|
JobOutputBase |
|
|
|
Type string `json:"type"` |
|
|
|
ReportMessage []ReportMessage `json:"reportMessage"` |
|
|
|
} |
|
|
|
|
|
|
|
type ReportMessage struct { |
|
|
|
TaskName string `json:"taskName"` |
|
|
|
TaskID string `json:"taskID"` |
|
|
|
Status bool `json:"status"` |
|
|
|
Message string `json:"message"` |
|
|
|
ClusterID ClusterID `json:"clusterID"` |
|
|
|
Output string `json:"output"` |
|
|
|
} |