Skip to main content

labeling_jobs

Creates, updates, deletes, gets or lists a labeling_jobs resource.

Overview

Namelabeling_jobs
TypeResource
Idaws.sagemaker.labeling_jobs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
creation_timestring (date-time)The date and time that the labeling job was created.
failure_reasonstringIf the job failed, the reason that it failed.
human_task_configobjectConfiguration information required for human workers to complete a labeling task.
input_configobjectInput configuration information 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.
job_reference_codestringA unique identifier for work done as part of a labeling job. (pattern: <code>.+</code>)
label_attribute_namestringThe attribute used as the label in the output manifest file. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,126}</code>)
label_category_config_s3_uristringThe S3 location of the JSON file that defines the categories used to label data objects. Please note the following label-category limits: Semantic segmentation labeling jobs using automated labeling: 20 labels Box bounding labeling jobs (all): 10 labels 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" } ] } (pattern: <code>(https|s3):​//([^/]+)/?(.*)</code>)
label_countersobjectProvides a breakdown of the number of data objects labeled by humans, the number of objects labeled by machine, the number of objects than couldn't be labeled, and the total number of objects labeled.
labeling_job_algorithms_configobjectConfiguration information for automated data labeling.
labeling_job_arnstringThe Amazon Resource Name (ARN) of the labeling job. (pattern: <code>arn:aws[a-z-]:sagemaker:[a-z0-9-]:[0-9]{12}:labeling-job/.*</code>)
labeling_job_namestringThe name assigned to the labeling job when it was created. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}</code>)
labeling_job_outputobjectThe location of the output produced by the labeling job.
labeling_job_statusstringThe processing status of the labeling job. (Initializing, InProgress, Completed, Failed, Stopping, Stopped)
last_modified_timestring (date-time)The date and time that the labeling job was last updated.
output_configobjectThe location of the job's output data and the Amazon Web Services Key Management Service key ID for the key used to encrypt the output data, if any.
role_arnstringThe Amazon Resource Name (ARN) that SageMaker assumes to perform tasks on your behalf during data labeling. (pattern: <code>arn:aws[a-z-]*:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@-_/]+</code>)
stopping_conditionsobjectA set of conditions for stopping a labeling job. If any of the conditions are met, the job is automatically stopped.
tagsarrayAn array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging Amazon Web Services Resources.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_labeling_jobselectregionGets information about a labeling job.
list_labeling_jobsselectregionGets a list of labeling jobs.
create_labeling_jobinsertregion, LabelingJobName, LabelAttributeName, InputConfig, OutputConfig, RoleArn, HumanTaskConfigCreates 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 Amazon Web Services 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. You can use this operation to create a static labeling job or a streaming labeling job. A static labeling job stops if all data objects in the input manifest file identified in ManifestS3Uri have been labeled. A streaming labeling job runs perpetually until it is manually stopped, or remains idle for 10 days. You can send new data objects to an active (InProgress) streaming labeling job in real time. To learn how to create a static labeling job, see Create a Labeling Job (API) in the Amazon SageMaker Developer Guide. To learn how to create a streaming labeling job, see Create a Streaming Labeling Job.
stop_labeling_jobexecregion, LabelingJobNameStops a running labeling job. A job that is stopped cannot be restarted. Any results obtained before the job is stopped are placed in the Amazon S3 output bucket.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Gets information about a labeling job.

SELECT
creation_time,
failure_reason,
human_task_config,
input_config,
job_reference_code,
label_attribute_name,
label_category_config_s3_uri,
label_counters,
labeling_job_algorithms_config,
labeling_job_arn,
labeling_job_name,
labeling_job_output,
labeling_job_status,
last_modified_time,
output_config,
role_arn,
stopping_conditions,
tags
FROM aws.sagemaker.labeling_jobs
WHERE region = '{{ region }}' -- required
;

INSERT examples

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 Amazon Web Services 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. You can use this operation to create a static labeling job or a streaming labeling job. A static labeling job stops if all data objects in the input manifest file identified in ManifestS3Uri have been labeled. A streaming labeling job runs perpetually until it is manually stopped, or remains idle for 10 days. You can send new data objects to an active (InProgress) streaming labeling job in real time. To learn how to create a static labeling job, see Create a Labeling Job (API) in the Amazon SageMaker Developer Guide. To learn how to create a streaming labeling job, see Create a Streaming Labeling Job.

INSERT INTO aws.sagemaker.labeling_jobs (
LabelingJobName,
LabelAttributeName,
InputConfig,
OutputConfig,
RoleArn,
LabelCategoryConfigS3Uri,
StoppingConditions,
LabelingJobAlgorithmsConfig,
HumanTaskConfig,
Tags,
region
)
SELECT
'{{ LabelingJobName }}' /* required */,
'{{ LabelAttributeName }}' /* required */,
'{{ InputConfig }}' /* required */,
'{{ OutputConfig }}' /* required */,
'{{ RoleArn }}' /* required */,
'{{ LabelCategoryConfigS3Uri }}',
'{{ StoppingConditions }}',
'{{ LabelingJobAlgorithmsConfig }}',
'{{ HumanTaskConfig }}' /* required */,
'{{ Tags }}',
'{{ region }}'
RETURNING
labeling_job_arn
;

Lifecycle Methods

Stops a running labeling job. A job that is stopped cannot be restarted. Any results obtained before the job is stopped are placed in the Amazon S3 output bucket.

EXEC aws.sagemaker.labeling_jobs.stop_labeling_job
@region='{{ region }}' --required
@@json=
'{
"LabelingJobName": "{{ LabelingJobName }}"
}'
;