Cria um job de predição no PAIPlugin.
Sintaxe
{
"Type": "ALIYUN::PAIPlugin::InferenceJob",
"Properties": {
"Algorithm": String,
"CampaignId": String,
"DataPath": String,
"Name": String,
"TrainingJobId": String,
"TargetPath": String,
"UserConfig": Map,
"Remark": String,
"WaitForInferenceFinish": Boolean
}
}
Propriedades
|
Propriedade |
Tipo |
Obrigatória |
Editável |
Descrição |
Restrição |
|
Algorithm |
String |
Sim |
Não |
ID do algoritmo associado ao job. |
Nenhuma. |
|
CampaignId |
String |
Sim |
Não |
ID da campanha associada ao job. |
Nenhuma. |
|
DataPath |
String |
Sim |
Não |
Caminho de armazenamento dos dados de entrada da predição. |
Nenhuma. |
|
Name |
String |
Sim |
Não |
Nome do job de predição. |
Nenhuma. |
|
TrainingJobId |
String |
Sim |
Não |
ID do job de treinamento associado ao job de predição. |
Nenhuma. |
|
TargetPath |
String |
Sim |
Não |
Caminho de saída dos resultados da predição. |
Nenhuma. |
|
UserConfig |
Map |
Sim |
Não |
Configurações definidas pelo usuário. |
Nenhuma. |
|
Remark |
String |
Não |
Não |
Observações. |
Nenhuma. |
|
WaitForInferenceFinish |
Boolean |
Não |
Não |
Indica se o sistema deve aguardar a conclusão do job de predição antes de criar os recursos. |
O tempo máximo de espera é de 40 minutos. |
Valores de retorno
Fn::GetAtt
InferenceJobId: ID do job de predição.
GroupId: ID do grupo de usuários associado.
Exemplos
Altere os valores mascarados das propriedades, como CampaignId, conforme os requisitos do seu negócio.
Formato YAML
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
DataPath:
Type: String
Description:
en: The input data path of inference job.
Required: true
TrainingJobId:
Type: String
Description:
en: The training job id of inference job.
Required: true
CampaignId:
Type: String
Description:
en: The campaign id of inference job.
Required: true
TargetPath:
Type: String
Description:
en: The output result path of inference job.
Required: true
UserConfig:
Type: Json
Description:
en: The user config of inference job.
Required: true
Algorithm:
Type: String
Description:
en: The algorithm of inference job.
Required: true
WaitForInferenceFinish:
Type: Boolean
Description:
en: Whether resource creation waits for the inference task to complete.The longest waiting time is 40 minutes
Required: false
Default: true
Remark:
Type: String
Description:
en: The remark of inference job.
Required: false
Name:
Type: String
Description:
en: The name of inference job.
Required: true
Resources:
InferenceJob:
Type: ALIYUN::PAIPlugin::InferenceJob
Properties:
DataPath: https://bucket.region.aliyuncs.com/folder/
TrainingJobId: '123'
CampaignId: 0a54e195-03e2-40bd-869d-b71cb302****
TargetPath: https://bucket.region.aliyuncs.com/folder/
UserConfig: {}
Algorithm: user_recall
Name: VIP customers
Outputs:
InferenceJobId:
Description: The id of inference job.
Value:
Fn::GetAtt:
- InferenceJob
- InferenceJobId
GroupId:
Description: The related group id of infernce job result.
Value:
Fn::GetAtt:
- InferenceJob
- GroupId
Formato JSON
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"DataPath": {
"Type": "String",
"Description": {
"en": "The input data path of inference job."
},
"Required": true
},
"TrainingJobId": {
"Type": "String",
"Description": {
"en": "The training job id of inference job."
},
"Required": true
},
"CampaignId": {
"Type": "String",
"Description": {
"en": "The campaign id of inference job."
},
"Required": true
},
"TargetPath": {
"Type": "String",
"Description": {
"en": "The output result path of inference job."
},
"Required": true
},
"UserConfig": {
"Type": "Json",
"Description": {
"en": "The user config of inference job."
},
"Required": true
},
"Algorithm": {
"Type": "String",
"Description": {
"en": "The algorithm of inference job."
},
"Required": true
},
"WaitForInferenceFinish": {
"Type": "Boolean",
"Description": {
"en": "Whether resource creation waits for the inference task to complete.The longest waiting time is 40 minutes"
},
"Required": false,
"Default": true
},
"Remark": {
"Type": "String",
"Description": {
"en": "The remark of inference job."
},
"Required": false
},
"Name": {
"Type": "String",
"Description": {
"en": "The name of inference job."
},
"Required": true
}
},
"Resources": {
"InferenceJob": {
"Type": "ALIYUN::PAIPlugin::InferenceJob",
"Properties": {
"DataPath": "https://bucket.region.aliyuncs.com/folder/",
"TrainingJobId": "123",
"CampaignId": "0a54e195-03e2-40bd-869d-b71cb302****",
"TargetPath": "https://bucket.region.aliyuncs.com/folder/",
"UserConfig": {},
"Algorithm": "user_recall",
"Name": "VIP customers"
}
}
},
"Outputs": {
"InferenceJobId": {
"Description": "The id of inference job.",
"Value": {
"Fn::GetAtt": [
"InferenceJob",
"InferenceJobId"
]
}
},
"GroupId": {
"Description": "The related group id of infernce job result.",
"Value": {
"Fn::GetAtt": [
"InferenceJob",
"GroupId"
]
}
}
}
}