/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the sagemaker-2017-07-24.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.SageMaker.Model { /// /// Container for the parameters to the CreateLabelingJob operation. /// 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: /// /// /// /// 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. /// /// public partial class CreateLabelingJobRequest : AmazonSageMakerRequest { private HumanTaskConfig _humanTaskConfig; private LabelingJobInputConfig _inputConfig; private string _labelAttributeName; private string _labelCategoryConfigS3Uri; private LabelingJobAlgorithmsConfig _labelingJobAlgorithmsConfig; private string _labelingJobName; private LabelingJobOutputConfig _outputConfig; private string _roleArn; private LabelingJobStoppingConditions _stoppingConditions; private List _tags = new List(); /// /// Gets and sets the property HumanTaskConfig. /// /// Configures the labeling task and how it is presented to workers; including, but not /// limited to price, keywords, and batch size (task count). /// /// [AWSProperty(Required=true)] public HumanTaskConfig HumanTaskConfig { get { return this._humanTaskConfig; } set { this._humanTaskConfig = value; } } // Check to see if HumanTaskConfig property is set internal bool IsSetHumanTaskConfig() { return this._humanTaskConfig != null; } /// /// Gets and sets the property InputConfig. /// /// 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. /// /// /// /// You must specify at least one of the following: S3DataSource or SnsDataSource. /// /// ///
  • /// /// Use SnsDataSource to specify an SNS input topic for a streaming labeling /// job. If you do not specify and SNS input topic ARN, Ground Truth will create a one-time /// labeling job that stops after all data objects in the input manifest file have been /// labeled. /// ///
  • /// /// Use S3DataSource to specify an input manifest file for both streaming /// and one-time labeling jobs. Adding an S3DataSource is optional if you /// use SnsDataSource to create a streaming labeling job. /// ///
/// /// If you use the Amazon Mechanical Turk workforce, your input data should not include /// confidential information, personal information or protected health information. Use /// ContentClassifiers to specify that your data is free of personally identifiable /// information and adult content. /// ///
[AWSProperty(Required=true)] public LabelingJobInputConfig InputConfig { get { return this._inputConfig; } set { this._inputConfig = value; } } // Check to see if InputConfig property is set internal bool IsSetInputConfig() { return this._inputConfig != null; } /// /// Gets and sets the property LabelAttributeName. /// /// 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 LabelAttributeName must meet the following requirements. /// ///
  • /// /// The name can't end with "-metadata". /// ///
  • /// /// If you are using one of the following built-in /// task types, the attribute name must end with "-ref". If the task type you /// are using is not listed below, the attribute name must not end with "-ref". /// ///
    • /// /// Image semantic segmentation (SemanticSegmentation), and adjustment (AdjustmentSemanticSegmentation) /// and verification (VerificationSemanticSegmentation) labeling jobs for /// this task type. /// ///
    • /// /// Video frame object detection (VideoObjectDetection), and adjustment and /// verification (AdjustmentVideoObjectDetection) labeling jobs for this /// task type. /// ///
    • /// /// Video frame object tracking (VideoObjectTracking), and adjustment and /// verification (AdjustmentVideoObjectTracking) labeling jobs for this task /// type. /// ///
    • /// /// 3D point cloud semantic segmentation (3DPointCloudSemanticSegmentation), /// and adjustment and verification (Adjustment3DPointCloudSemanticSegmentation) /// labeling jobs for this task type. /// ///
    • /// /// 3D point cloud object tracking (3DPointCloudObjectTracking), and adjustment /// and verification (Adjustment3DPointCloudObjectTracking) labeling jobs /// for this task type. /// ///
/// /// If you are creating an adjustment or verification labeling job, you must use a different /// LabelAttributeName than the one used in the original labeling job. The /// original labeling job is the Ground Truth labeling job that produced the labels that /// you want verified or adjusted. To learn more about adjustment and verification labeling /// jobs, see Verify /// and Adjust Labels. /// /// ///
[AWSProperty(Required=true, Min=1, Max=127)] public string LabelAttributeName { get { return this._labelAttributeName; } set { this._labelAttributeName = value; } } // Check to see if LabelAttributeName property is set internal bool IsSetLabelAttributeName() { return this._labelAttributeName != null; } /// /// Gets and sets the property LabelCategoryConfigS3Uri. /// /// The S3 URI of the file, referred to as a label category configuration file, /// that defines the categories used to label the data objects. /// /// /// /// For 3D point cloud and video frame task types, you can add label category attributes /// and frame attributes to your label category configuration file. To learn how, see /// Create /// a Labeling Category Configuration File for 3D Point Cloud Labeling Jobs. /// /// /// /// For named entity recognition jobs, in addition to "labels", you must /// provide worker instructions in the label category configuration file using the "instructions" /// parameter: "instructions": {"shortInstruction":"<h1>Add header</h1><p>Add /// Instructions</p>", "fullInstruction":"<p>Add additional instructions.</p>"}. /// For details and an example, see Create /// a Named Entity Recognition Labeling Job (API) . /// /// /// /// For all other built-in /// task types and custom /// tasks, your label category configuration file must be a JSON file in the following /// format. Identify the labels you want to use by replacing label_1, label_2,...,label_n /// with your label categories. /// /// /// /// { /// /// /// /// "document-version": "2018-11-28", /// /// /// /// "labels": [{"label": "label_1"},{"label": "label_2"},...{"label": "label_n"}] /// /// /// /// /// } /// /// /// /// Note the following about the label category configuration file: /// ///
  • /// /// For image classification and text classification (single and multi-label) you must /// specify at least two label categories. For all other task types, the minimum number /// of label categories required is one. /// ///
  • /// /// Each label category must be unique, you cannot specify duplicate label categories. /// ///
  • /// /// If you create a 3D point cloud or video frame adjustment or verification labeling /// job, you must include auditLabelAttributeName in the label category configuration. /// Use this parameter to enter the /// LabelAttributeName of the labeling job you want to adjust or verify /// annotations of. /// ///
///
[AWSProperty(Max=1024)] public string LabelCategoryConfigS3Uri { get { return this._labelCategoryConfigS3Uri; } set { this._labelCategoryConfigS3Uri = value; } } // Check to see if LabelCategoryConfigS3Uri property is set internal bool IsSetLabelCategoryConfigS3Uri() { return this._labelCategoryConfigS3Uri != null; } /// /// Gets and sets the property LabelingJobAlgorithmsConfig. /// /// Configures the information required to perform automated data labeling. /// /// public LabelingJobAlgorithmsConfig LabelingJobAlgorithmsConfig { get { return this._labelingJobAlgorithmsConfig; } set { this._labelingJobAlgorithmsConfig = value; } } // Check to see if LabelingJobAlgorithmsConfig property is set internal bool IsSetLabelingJobAlgorithmsConfig() { return this._labelingJobAlgorithmsConfig != null; } /// /// Gets and sets the property LabelingJobName. /// /// The name of the labeling job. This name is used to identify the job in a list of labeling /// jobs. Labeling job names must be unique within an Amazon Web Services account and /// region. LabelingJobName is not case sensitive. For example, Example-job /// and example-job are considered the same labeling job name by Ground Truth. /// /// [AWSProperty(Required=true, Min=1, Max=63)] public string LabelingJobName { get { return this._labelingJobName; } set { this._labelingJobName = value; } } // Check to see if LabelingJobName property is set internal bool IsSetLabelingJobName() { return this._labelingJobName != null; } /// /// Gets and sets the property OutputConfig. /// /// The location of the output data and the Amazon Web Services Key Management Service /// key ID for the key used to encrypt the output data, if any. /// /// [AWSProperty(Required=true)] public LabelingJobOutputConfig OutputConfig { get { return this._outputConfig; } set { this._outputConfig = value; } } // Check to see if OutputConfig property is set internal bool IsSetOutputConfig() { return this._outputConfig != null; } /// /// Gets and sets the property RoleArn. /// /// 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. /// /// [AWSProperty(Required=true, Min=20, Max=2048)] public string RoleArn { get { return this._roleArn; } set { this._roleArn = value; } } // Check to see if RoleArn property is set internal bool IsSetRoleArn() { return this._roleArn != null; } /// /// Gets and sets the property StoppingConditions. /// /// 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. /// /// public LabelingJobStoppingConditions StoppingConditions { get { return this._stoppingConditions; } set { this._stoppingConditions = value; } } // Check to see if StoppingConditions property is set internal bool IsSetStoppingConditions() { return this._stoppingConditions != null; } /// /// Gets and sets the property Tags. /// /// An array of key/value pairs. For more information, see Using /// Cost Allocation Tags in the Amazon Web Services Billing and Cost Management /// User Guide. /// /// [AWSProperty(Min=0, Max=50)] public List Tags { get { return this._tags; } set { this._tags = value; } } // Check to see if Tags property is set internal bool IsSetTags() { return this._tags != null && this._tags.Count > 0; } } }