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

Resource Orchestration Service:ALIYUN::PAI::DatasetVersion

最終更新日:Mar 27, 2025

ALIYUN::PAI::DatasetVersion は、データセットバージョンを作成するために使用されます。

構文

{
  "Type": "ALIYUN::PAI::DatasetVersion",
  "Properties": {
    "DataSourceType": String, // データソースのタイプ
    "DatasetId": String, // データセット ID
    "Property": String, // データセットのプロパティ
    "Uri": String, // URI 設定
    "Description": String, // データセットバージョンの説明
    "DataSize": Integer, // データセットファイルのサイズ
    "DataCount": Integer, // データセットファイルの数
    "Labels": List, // データセットバージョンのラベル
    "Options": String, // 拡張フィールド
    "SourceType": String, // データソースのタイプ
    "SourceId": String // データソースの ID
  }
}

プロパティ

プロパティ

タイプ

必須

編集可能

説明

制約

DataSourceType

String

はい

いいえ

データソースのストレージタイプ。

複数のストレージタイプはカンマ (,) で区切ります。有効な値:

  • NAS: NAS ファイルシステム (NAS)。

  • OSS: Object Storage Service (OSS)。

  • CPFS: Cloud Parallel File Storage (CPFS)。

説明

データセットバージョンの DataSourceType 値は、データセットの DataSourceType 値と同じである必要があります。データセットバージョンを作成すると、システムは値が同じかどうかを確認します。

DatasetId

String

はい

いいえ

データセットの ID。

なし。

Property

String

はい

いいえ

データセットのプロパティ。

有効な値:

  • FILE

  • DIRECTORY

Uri

String

はい

いいえ

Uniform Resource Identifier (URI) の構成。

  • DataSourceType が OSS に設定されている場合の値の形式: oss://bucket.endpoint/object

  • DataSourceType が NAS に設定されている場合の値の形式:

    • 汎用型 NAS ファイルシステムの値の形式: nas://<nasfisid>.region/subpath/to/dir/

    • CPFS 1.0 ファイルシステムの値の形式: nas://<cpfs-fsid>.region/subpath/to/dir/

    • CPFS 2.0 ファイルシステムの値の形式: nas://<cpfs-fsid>.region/<protocolserviceid>/。 CPFS 1.0 と CPFS 2.0 のファイルシステムは、ファイルシステム ID の形式で区別できます。CPFS 1.0 ファイルシステムの ID は cpfs-<8 ビット ASCII 文字> 形式です。CPFS 2.0 ファイルシステムの ID は cpfs-<16 ビット ASCII 文字> 形式です。

Description

String

いいえ

いいえ

データセットバージョンの説明。

説明を使用してデータセットバージョンを区別できます。

DataSize

Integer

いいえ

いいえ

データセットファイルのサイズ。

単位: バイト。

DataCount

Integer

いいえ

いいえ

データセットファイルの数。

なし。

Labels

List

いいえ

いいえ

データセットバージョンのラベル。

詳細については、「ラベルのプロパティ」をご参照ください。

Options

String

いいえ

はい

拡張フィールド。

このプロパティの値は JSON 文字列です。Deep Learning Containers (DLC) でデータセットを使用する場合、 mountPath フィールドを使用してデータセットのデフォルトのマウントパスを指定できます。

SourceType

String

いいえ

いいえ

データソースのタイプ。

デフォルト値: USER。有効な値:

  • PAI-PUBLIC-DATASET: Platform for AI (PAI) のパブリックデータセット。

  • ITAG: iTAG のラベル付けジョブから生成されたデータセット。

  • USER: ユーザーが登録したデータセット。

SourceId

String

いいえ

いいえ

データソースの ID。

  • SourceType が USER に設定されている場合、SourceId の値はカスタム文字列です。

  • SourceType が ITAG に設定されている場合、SourceId の値は iTAG のラベル付けジョブの ID です。

  • SourceType が PAI_PUBLIC_DATASET に設定されている場合、SourceId はデフォルトで空です。

ラベルの構文

"Labels": [
  {
    "Value": String, // ラベルの値
    "Key": String // ラベルのキー
  }
]

ラベルのプロパティ

プロパティ

タイプ

必須

編集可能

説明

制約

Key

String

はい

いいえ

ラベルのキー。

キーは 1 ~ 128 文字で、http:// または https:// を含めることはできません。aliyun または acs: で始めることはできません。

Value

String

いいえ

いいえ

ラベルの値。

値は最大 128 文字で、http:// または https:// を含めることはできません。aliyun または acs: で始めることはできません。

戻り値

Fn::GetAtt

VersionName: データセットバージョンの名前。

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  DataSourceType:
    Type: String
    Description:
      en: |-
        The data source type. The following values are supported:
        - OSS: Alibaba Cloud Object Storage (OSS).
        - NAS: Alibaba cloud file storage (NAS).
        - CPFS
    AllowedValues:
      - OSS
      - NAS
      - CPFS
    Required: true
  Uri:
    Type: String
    Description:
      en: |-
        The Uri configuration sample is as follows:
        - The data source type is OSS:'oss://bucket.endpoint/object'
        - The data source type is NAS:
        The general NAS format is: 'nas://<nasfisid>.region/subpath/to/dir/';
        CPFS1.0:'nas://<cpfs-fsid>.region/subpath/to/dir /';
        CPFS2.0:'nas://<cpfs-fsid>.region/<protocolserviceid>/'.
        CPFS1.0 and CPFS2.0 are distinguished by the format of fsid: CPFS1.0 is cpfs-<8-bit ascii characters>;CPFS2.0 is cpfs-<16 ascii characters>.
    AllowedPattern: ^(oss://|nas://).*
    Required: true
  Property:
    Type: String
    Description:
      en: |-
        The properties of the dataset. The following values are supported:
        - FILE: FILE.
        - DIRECTORY: folder.
    AllowedValues:
      - FILE
      - DIRECTORY
    Required: true
  DatasetId:
    Type: String
    Description:
      en: The ID of the dataset.
    Required: true
Resources:
  ExtensionResource:
    Type: ALIYUN::PAI::DatasetVersion
    Properties:
      DataSourceType:
        Ref: DataSourceType
      Uri:
        Ref: Uri
      Property:
        Ref: Property
      DatasetId:
        Ref: DatasetId
Outputs:
  VersionName:
    Description: Dataset version name.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - VersionName
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "DataSourceType": { // データソースタイプ
      "Type": "String",
      "Description": {
        "en": "The data source type. The following values are supported:\n- OSS: Alibaba Cloud Object Storage (OSS).\n- NAS: Alibaba cloud file storage (NAS).\n- CPFS"
      },
      "AllowedValues": [
        "OSS",
        "NAS",
        "CPFS"
      ],
      "Required": true
    },
    "Uri": { // URI 設定
      "Type": "String",
      "Description": {
        "en": "The Uri configuration sample is as follows:\n- The data source type is OSS:'oss://bucket.endpoint/object'\n- The data source type is NAS:\nThe general NAS format is: 'nas://<nasfisid>.region/subpath/to/dir/';\nCPFS1.0:'nas://<cpfs-fsid>.region/subpath/to/dir /';\nCPFS2.0:'nas://<cpfs-fsid>.region/<protocolserviceid>/'.\nCPFS1.0 and CPFS2.0 are distinguished by the format of fsid: CPFS1.0 is cpfs-<8-bit ascii characters>;CPFS2.0 is cpfs-<16 ascii characters>."
      },
      "AllowedPattern": "^(oss://|nas://).*",
      "Required": true
    },
    "Property": { // プロパティ
      "Type": "String",
      "Description": {
        "en": "The properties of the dataset. The following values are supported:\n- FILE: FILE.\n- DIRECTORY: folder."
      },
      "AllowedValues": [
        "FILE",
        "DIRECTORY"
      ],
      "Required": true
    },
    "DatasetId": { // データセット ID
      "Type": "String",
      "Description": {
        "en": "The ID of the dataset."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::PAI::DatasetVersion",
      "Properties": {
        "DataSourceType": {
          "Ref": "DataSourceType"
        },
        "Uri": {
          "Ref": "Uri"
        },
        "Property": {
          "Ref": "Property"
        },
        "DatasetId": {
          "Ref": "DatasetId"
        }
      }
    }
  },
  "Outputs": {
    "VersionName": { // データセットバージョン名
      "Description": "Dataset version name.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "VersionName"
        ]
      }
    }
  }
}