Table Of Contents

Feedback

User Guide

First time using the AWS CLI? See the User Guide for help getting started.

[ aws . sagemaker ]

create-labeling-job

Description

Creates a job that uses workers to label the data objects in your input dataset. You can use the labeled data to train machine learning models.

You can select your workforce from one of three providers:

  • A private workforce that you create. It can include employees, contractors, and outside experts. Use a private workforce when want the data to stay within your organization or when a specific set of skills is required.
  • One or more vendors that you select from the AWS Marketplace. Vendors provide expertise in specific areas.
  • The Amazon Mechanical Turk workforce. This is the largest workforce, but it should only be used for public data or data that has been stripped of any personally identifiable information.

You can also use automated data labeling to reduce the number of data objects that need to be labeled by a human. Automated data labeling uses active learning to determine if a data object can be labeled by machine or if it needs to be sent to a human worker. For more information, see Using Automated Data Labeling .

The data objects to be labeled are contained in an Amazon S3 bucket. You create a manifest file that describes the location of each object. For more information, see Using Input and Output Data .

The output can be used as the manifest file for another labeling job or as training data for your machine learning models.

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.

Synopsis

  create-labeling-job
--labeling-job-name <value>
--label-attribute-name <value>
--input-config <value>
--output-config <value>
--role-arn <value>
[--label-category-config-s3-uri <value>]
[--stopping-conditions <value>]
[--labeling-job-algorithms-config <value>]
--human-task-config <value>
[--tags <value>]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]

Options

--labeling-job-name (string)

The name of the labeling job. This name is used to identify the job in a list of labeling jobs.

--label-attribute-name (string)

The attribute name to use for the label in the output manifest file. This is the key for the key/value pair formed with the label that a worker assigns to the object. The name can't end with "-metadata". If you are running a semantic segmentation labeling job, the attribute name must end with "-ref". If you are running any other kind of labeling job, the attribute name must not end with "-ref".

--input-config (structure)

Input data for the labeling job, such as the Amazon S3 location of the data objects and the location of the manifest file that describes the data objects.

Shorthand Syntax:

DataSource={S3DataSource={ManifestS3Uri=string}},DataAttributes={ContentClassifiers=[string,string]}

JSON Syntax:

{
  "DataSource": {
    "S3DataSource": {
      "ManifestS3Uri": "string"
    }
  },
  "DataAttributes": {
    "ContentClassifiers": ["FreeOfPersonallyIdentifiableInformation"|"FreeOfAdultContent", ...]
  }
}

--output-config (structure)

The location of the output data and the AWS Key Management Service key ID for the key used to encrypt the output data, if any.

Shorthand Syntax:

S3OutputPath=string,KmsKeyId=string

JSON Syntax:

{
  "S3OutputPath": "string",
  "KmsKeyId": "string"
}

--role-arn (string)

The Amazon Resource Number (ARN) that Amazon SageMaker assumes to perform tasks on your behalf during data labeling. You must grant this role the necessary permissions so that Amazon SageMaker can successfully complete data labeling.

--label-category-config-s3-uri (string)

The S3 URL of the file that defines the categories used to label the data objects.

The file is a JSON structure in the following format:

{

"document-version": "2018-11-28"

"labels": [

{

"label": "*label 1* "

},

{

"label": "*label 2* "

},

...

{

"label": "*label n* "

}

]

}

--stopping-conditions (structure)

A set of conditions for stopping the labeling job. If any of the conditions are met, the job is automatically stopped. You can use these conditions to control the cost of data labeling.

Shorthand Syntax:

MaxHumanLabeledObjectCount=integer,MaxPercentageOfInputDatasetLabeled=integer

JSON Syntax:

{
  "MaxHumanLabeledObjectCount": integer,
  "MaxPercentageOfInputDatasetLabeled": integer
}

--labeling-job-algorithms-config (structure)

Configures the information required to perform automated data labeling.

Shorthand Syntax:

LabelingJobAlgorithmSpecificationArn=string,InitialActiveLearningModelArn=string,LabelingJobResourceConfig={VolumeKmsKeyId=string}

JSON Syntax:

{
  "LabelingJobAlgorithmSpecificationArn": "string",
  "InitialActiveLearningModelArn": "string",
  "LabelingJobResourceConfig": {
    "VolumeKmsKeyId": "string"
  }
}

--human-task-config (structure)

Configures the information required for human workers to complete a labeling task.

Shorthand Syntax:

WorkteamArn=string,UiConfig={UiTemplateS3Uri=string},PreHumanTaskLambdaArn=string,TaskKeywords=string,string,TaskTitle=string,TaskDescription=string,NumberOfHumanWorkersPerDataObject=integer,TaskTimeLimitInSeconds=integer,TaskAvailabilityLifetimeInSeconds=integer,MaxConcurrentTaskCount=integer,AnnotationConsolidationConfig={AnnotationConsolidationLambdaArn=string},PublicWorkforceTaskPrice={AmountInUsd={Dollars=integer,Cents=integer,TenthFractionsOfACent=integer}}

JSON Syntax:

{
  "WorkteamArn": "string",
  "UiConfig": {
    "UiTemplateS3Uri": "string"
  },
  "PreHumanTaskLambdaArn": "string",
  "TaskKeywords": ["string", ...],
  "TaskTitle": "string",
  "TaskDescription": "string",
  "NumberOfHumanWorkersPerDataObject": integer,
  "TaskTimeLimitInSeconds": integer,
  "TaskAvailabilityLifetimeInSeconds": integer,
  "MaxConcurrentTaskCount": integer,
  "AnnotationConsolidationConfig": {
    "AnnotationConsolidationLambdaArn": "string"
  },
  "PublicWorkforceTaskPrice": {
    "AmountInUsd": {
      "Dollars": integer,
      "Cents": integer,
      "TenthFractionsOfACent": integer
    }
  }
}

--tags (list)

An array of key/value pairs. For more information, see Using Cost Allocation Tags in the AWS Billing and Cost Management User Guide .

Shorthand Syntax:

Key=string,Value=string ...

JSON Syntax:

[
  {
    "Key": "string",
    "Value": "string"
  }
  ...
]

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See 'aws help' for descriptions of global parameters.

Output

LabelingJobArn -> (string)

The Amazon Resource Name (ARN) of the labeling job. You use this ARN to identify the labeling job.