ALIYUN::PAI::Run类型用于创建一次运行,运行(Run)属于一个实验(Experiment),可以与具体的workload关联,也可以是一次单纯的代码运行。
语法
{
"Type": "ALIYUN::PAI::Run",
"Properties": {
"ExperimentId": String,
"RunName": String,
"SourceId": String,
"SourceType": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
ExperimentId | String | 是 | 否 | Run 关联的实验 ID。 | 无 |
RunName | String | 否 | 是 | 运行(Run)的名称。 | 命名规则如下:
若创建时名称为空,则会使用服务端生成的随机 ID(RunID)作为名称 |
SourceId | String | 否 | 否 | Run 关联的 PAI Workload ID。 | 无 |
SourceType | String | 否 | 否 | 与 Run 关联的 PAI Workload 来源类型。 | 可选项包括 TrainingService、DLC 或为空。非必填,默认为空。 |
返回值
Fn::GetAtt
Accessibility:访问类型。
SourceType:与 Run 关联的 PAI Workload 来源类型。
SourceId:Run 关联的 PAI Workload ID。
CreateTime:运行的创建时间。
WorkspaceId:PAI Workload ID。
Params:运行的参数。
Labels:运行绑定的标签。
GmtModifiedTime:运行的更新时间。
RunName:运行的名称。
Metrics:运行的指标信息详情。
OwnerId:运行使用的主账号 ID。
UserId:运行使用的创建者 ID。
ExperimentId:Run 关联的实验 ID。
RunId:运行ID。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
ExperimentId:
Type: String
Description:
en: Resource attribute field of the experiment ID to which Run belongs.
Required: true
RunName:
Type: String
Description:
en: The name of the Run.
Required: false
Resources:
ExtensionResource:
Type: ALIYUN::PAI::Run
Properties:
ExperimentId:
Ref: ExperimentId
RunName:
Ref: RunName
Outputs:
Accessibility:
Description: Resource attribute fields representing visibility.
Value:
Fn::GetAtt:
- ExtensionResource
- Accessibility
SourceType:
Description: Run attribute fields representing the source type.
Value:
Fn::GetAtt:
- ExtensionResource
- SourceType
SourceId:
Description: Attribute Resource field representing the source task ID.
Value:
Fn::GetAtt:
- ExtensionResource
- SourceId
CreateTime:
Description: The creation time of the Run.
Value:
Fn::GetAtt:
- ExtensionResource
- CreateTime
WorkspaceId:
Description: Resource attribute field of the workspace ID to which Run belongs.
Value:
Fn::GetAtt:
- ExtensionResource
- WorkspaceId
Params:
Description: Resource attribute field representing the run parameter.
Value:
Fn::GetAtt:
- ExtensionResource
- Params
Labels:
Description: Run attribute field representing the run tag.
Value:
Fn::GetAtt:
- ExtensionResource
- Labels
GmtModifiedTime:
Description: Resource attribute fields representing edit time.
Value:
Fn::GetAtt:
- ExtensionResource
- GmtModifiedTime
RunName:
Description: The name of the Run.
Value:
Fn::GetAtt:
- ExtensionResource
- RunName
Metrics:
Description: Resource attribute field representing the run metric.
Value:
Fn::GetAtt:
- ExtensionResource
- Metrics
OwnerId:
Description: Resource attribute field representing owner.
Value:
Fn::GetAtt:
- ExtensionResource
- OwnerId
UserId:
Description: Run attribute field representing creator ID.
Value:
Fn::GetAtt:
- ExtensionResource
- UserId
ExperimentId:
Description: Resource attribute field of the experiment ID to which Run belongs.
Value:
Fn::GetAtt:
- ExtensionResource
- ExperimentId
RunId:
Description: The ID of the Run.
Value:
Fn::GetAtt:
- ExtensionResource
- RunId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"ExperimentId": {
"Type": "String",
"Description": {
"en": "Resource attribute field of the experiment ID to which Run belongs."
},
"Required": true
},
"RunName": {
"Type": "String",
"Description": {
"en": "The name of the Run."
},
"Required": false
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::PAI::Run",
"Properties": {
"ExperimentId": {
"Ref": "ExperimentId"
},
"RunName": {
"Ref": "RunName"
}
}
}
},
"Outputs": {
"Accessibility": {
"Description": "Resource attribute fields representing visibility.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Accessibility"
]
}
},
"SourceType": {
"Description": "Run attribute fields representing the source type.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"SourceType"
]
}
},
"SourceId": {
"Description": "Attribute Resource field representing the source task ID.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"SourceId"
]
}
},
"CreateTime": {
"Description": "The creation time of the Run.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"CreateTime"
]
}
},
"WorkspaceId": {
"Description": "Resource attribute field of the workspace ID to which Run belongs.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"WorkspaceId"
]
}
},
"Params": {
"Description": "Resource attribute field representing the run parameter.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Params"
]
}
},
"Labels": {
"Description": "Run attribute field representing the run tag.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Labels"
]
}
},
"GmtModifiedTime": {
"Description": "Resource attribute fields representing edit time.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"GmtModifiedTime"
]
}
},
"RunName": {
"Description": "The name of the Run.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"RunName"
]
}
},
"Metrics": {
"Description": "Resource attribute field representing the run metric.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Metrics"
]
}
},
"OwnerId": {
"Description": "Resource attribute field representing owner.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"OwnerId"
]
}
},
"UserId": {
"Description": "Run attribute field representing creator ID.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"UserId"
]
}
},
"ExperimentId": {
"Description": "Resource attribute field of the experiment ID to which Run belongs.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"ExperimentId"
]
}
},
"RunId": {
"Description": "The ID of the Run.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"RunId"
]
}
}
}
}
该文章对您有帮助吗?