Creating a Dataset Labeling Version

Function

This API is used to create a dataset labeling version.

Debugging

You can debug this API through automatic authentication in or use the SDK sample code generated by API Explorer.

URI

POST /v2/{project_id}/datasets/{dataset_id}/versions

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

dataset_id

Yes

String

Dataset ID.

project_id

Yes

String

Project ID. For details about how to obtain a project ID, see Obtaining a Project ID and Name.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

clear_hard_property

No

Boolean

Whether to clear hard example properties. Options:

  • true: Clear hard example properties. (Default value)

  • false: Do not clear hard example properties.

description

No

String

Version description. The value is empty by default. The description contains 0 to 256 characters and does not support the following special characters: !<>=&"'

export_images

No

Boolean

Whether to export images to the version output directory during release. Options:

  • true: Export images to the version output directory.

  • false: Do not export images to the version output directory. (Default value)

remove_sample_usage

No

Boolean

Whether to clear the existing usage information of a dataset during release. Options:

  • true: Clear the existing usage information of a dataset. (Default value)

  • false: Do not clear the existing usage information of a dataset.

train_evaluate_sample_ratio

No

String

Split training and verification ratio during version release. The default value is 1.00, indicating that all released versions are training sets.

version_format

No

String

Format of a dataset version. Options:

  • Default

  • CarbonData (supported only by table datasets)

  • CSV

version_name

No

String

Version name

with_column_header

No

Boolean

Whether to write the column name in the first line of the CSV file during release. This field is valid for the table dataset. Options:

  • true: Write the column name in the first line of the CSV file. (Default value)

  • false: Do not write the column name in the first line of the CSV file.

Response Parameters

Status code: 201

Table 3 Response body parameters

Parameter

Type

Description

version_id

String

Dataset version ID.

Example Requests

Creating a Dataset Labeling Version

{
  "version_name" : "V004",
  "version_format" : "Default",
  "description" : "",
  "clear_hard_property" : true
}

Example Responses

Status code: 201

Created

{
  "version_id" : "sntOdOuB0D9C6fC4TXs"
}

Status Codes

Status Code

Description

201

Created

401

Unauthorized

403

Forbidden

404

Not Found

Error Codes

See Error Codes.