すべてのプロダクト
Search
ドキュメントセンター

Resource Orchestration Service:ALIYUN::PAIPlugin::InferenceJob

最終更新日:Mar 17, 2025

ALIYUN::PAIPlugin::InferenceJob は、予測ジョブを作成するために使用されます。

構文

{
  "Type": "ALIYUN::PAIPlugin::InferenceJob",
  "Properties": {
    "Algorithm": String,
    "CampaignId": String,
    "DataPath": String,
    "Name": String,
    "TrainingJobId": String,
    "TargetPath": String,
    "UserConfig": Map,
    "Remark": String,
    "WaitForInferenceFinish": Boolean
  }
}

プロパティ

プロパティ

タイプ

必須

編集可能

説明

制約

Algorithm

String

はい

いいえ

関連付けるアルゴリズムの ID。

なし。

CampaignId

String

はい

いいえ

関連付ける運用アクティビティの ID。

なし。

DataPath

String

はい

いいえ

予測するデータが保存されているパス。

なし。

Name

String

はい

いいえ

予測ジョブの名前。

なし。

TrainingJobId

String

はい

いいえ

関連付けるトレーニングジョブ。

なし。

TargetPath

String

はい

いいえ

データが返されるパス。

なし。

UserConfig

Map

はい

いいえ

ユーザー構成。

なし。

Remark

String

いいえ

いいえ

備考。

なし。

WaitForInferenceFinish

ブール値

いいえ

いいえ

リソースを作成する前に予測ジョブが完了するまで待機するかどうかを指定します。

最大待機時間は 40 分です。

戻り値

Fn::GetAtt

  • InferenceJobId: 予測ジョブの ID。

  • GroupId: 関連付けられているユーザーグループの ID。

説明

CampaignId プロパティなどのプロパティのマスクされた値は、ビジネス要件に基づいて変更する必要があります。

YAML 形式

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  DataPath:
    Type: String
    Description:
      ja: 推論ジョブの入力データパス。
    Required: true
  TrainingJobId:
    Type: String
    Description:
      ja: 推論ジョブのトレーニングジョブ ID。
    Required: true
  CampaignId:
    Type: String
    Description:
      ja: 推論ジョブのキャンペーン ID。
    Required: true
  TargetPath:
    Type: String
    Description:
      ja: 推論ジョブの出力結果パス。
    Required: true
  UserConfig:
    Type: Json
    Description:
      ja: 推論ジョブのユーザー設定。
    Required: true
  Algorithm:
    Type: String
    Description:
      ja: 推論ジョブのアルゴリズム。
    Required: true
  WaitForInferenceFinish:
    Type: Boolean
    Description:
      ja: リソース作成が推論タスクの完了を待機するかどうか。最長待機時間は 40 分です。
    Required: false
    Default: true
  Remark:
    Type: String
    Description:
      ja: 推論ジョブの備考。
    Required: false
  Name:
    Type: String
    Description:
      ja: 推論ジョブの名前。
    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: 推論ジョブの ID。
    Value:
      Fn::GetAtt:
        - InferenceJob
        - InferenceJobId
  GroupId:
    Description: 推論ジョブ結果に関連するグループ ID。
    Value:
      Fn::GetAtt:
        - InferenceJob
        - GroupId

JSON 形式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "DataPath": {
      "Type": "String",
      "Description": {
        "ja": "推論ジョブの入力データパス。"
      },
      "Required": true
    },
    "TrainingJobId": {
      "Type": "String",
      "Description": {
        "ja": "推論ジョブのトレーニングジョブ ID。"
      },
      "Required": true
    },
    "CampaignId": {
      "Type": "String",
      "Description": {
        "ja": "推論ジョブのキャンペーン ID。"
      },
      "Required": true
    },
    "TargetPath": {
      "Type": "String",
      "Description": {
        "ja": "推論ジョブの出力結果パス。"
      },
      "Required": true
    },
    "UserConfig": {
      "Type": "Json",
      "Description": {
        "ja": "推論ジョブのユーザー設定。"
      },
      "Required": true
    },
    "Algorithm": {
      "Type": "String",
      "Description": {
        "ja": "推論ジョブのアルゴリズム。"
      },
      "Required": true
    },
    "WaitForInferenceFinish": {
      "Type": "Boolean",
      "Description": {
        "ja": "リソース作成が推論タスクの完了を待機するかどうか。最長待機時間は 40 分です。"
      },
      "Required": false,
      "Default": true
    },
    "Remark": {
      "Type": "String",
      "Description": {
        "ja": "推論ジョブの備考。"
      },
      "Required": false
    },
    "Name": {
      "Type": "String",
      "Description": {
        "ja": "推論ジョブの名前。"
      },
      "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": "推論ジョブの ID。",
      "Value": {
        "Fn::GetAtt": [
          "InferenceJob",
          "InferenceJobId"
        ]
      }
    },
    "GroupId": {
      "Description": "推論ジョブ結果に関連するグループ ID。",
      "Value": {
        "Fn::GetAtt": [
          "InferenceJob",
          "GroupId"
        ]
      }
    }
  }
}