ALIYUN::NLPAUTOML::Dataset

ALIYUN::NLPAUTOML::Dataset类型用于创建数据集。

语法

{
  "Type": "ALIYUN::NLPAUTOML::Dataset",
  "Properties": {
    "DatasetName": String,
    "ProjectId": Integer,
    "DatasetRecord": List
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

DatasetName

String

数据集名称。

不能以数字和符号开头,长度不能超过32个字符。 

ProjectId

Integer

项目ID。

要在某个项目下创建数据集,请填写目标项目ID。 

DatasetRecord

List

标注文档内容。

需要传入JSON字符串,内容为标注数据,如下表格示例:

{"content":"这个牌子的红枣很不错","records":{"情感":"正"}}

返回值

Fn::GetAtt

DatasetId:数据集ID

示例

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  DatasetName:
    AllowedPattern: ^[a-zA-Z][-_a-zA-Z0-9]{1,32}$
    Description: The name of dataset. Cannot start with numbers and symbols, and the
      length cannot be greater than 32 characters.
    Type: String
  ProjectId:
    Description: The ID of project. To create a dataset under a certain project, fill
      in the target project ID.
    Type: Number
Resources:
  Dataset:
    Properties:
      DatasetName:
        Ref: DatasetName
      ProjectId:
        Ref: ProjectId
    Type: ALIYUN::NLPAUTOML::Dataset
Outputs:
  DatasetId:
    Description: The dataset ID.
    Value:
      Fn::GetAtt:
      - Dataset
      - DatasetId

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "DatasetName": {
      "Type": "String",
      "Description": "The name of dataset. Cannot start with numbers and symbols, and the length cannot be greater than 32 characters.",
      "AllowedPattern": "^[a-zA-Z][-_a-zA-Z0-9]{1,32}$"
    },
    "ProjectId": {
      "Type": "Number",
      "Description": "The ID of project. To create a dataset under a certain project, fill in the target project ID."
    }
  },
  "Resources": {
    "Dataset": {
      "Type": "ALIYUN::NLPAUTOML::Dataset",
      "Properties": {
        "DatasetName": {
          "Ref": "DatasetName"
        },
        "ProjectId": {
          "Ref": "ProjectId"
        }
      }
    }
  },
  "Outputs": {
    "DatasetId": {
      "Description": "The dataset ID.",
      "Value": {
        "Fn::GetAtt": [
          "Dataset",
          "DatasetId"
        ]
      }
    }
  }
}