« blib/lib/Paws/SageMaker/CreateImageVersionResponse.pm
↑ Summary
blib/lib/Paws/SageMaker/CreateLabelingJobResponse.pm »
| 1 | |||
| 2 | package Paws::SageMaker::CreateLabelingJob; | ||
| 3 | use Moose; | ||
| 4 | has HumanTaskConfig => (is => 'ro', isa => 'Paws::SageMaker::HumanTaskConfig', required => 1); | ||
| 5 | has InputConfig => (is => 'ro', isa => 'Paws::SageMaker::LabelingJobInputConfig', required => 1); | ||
| 6 | has LabelAttributeName => (is => 'ro', isa => 'Str', required => 1); | ||
| 7 | has LabelCategoryConfigS3Uri => (is => 'ro', isa => 'Str'); | ||
| 8 | has LabelingJobAlgorithmsConfig => (is => 'ro', isa => 'Paws::SageMaker::LabelingJobAlgorithmsConfig'); | ||
| 9 | has LabelingJobName => (is => 'ro', isa => 'Str', required => 1); | ||
| 10 | has OutputConfig => (is => 'ro', isa => 'Paws::SageMaker::LabelingJobOutputConfig', required => 1); | ||
| 11 | has RoleArn => (is => 'ro', isa => 'Str', required => 1); | ||
| 12 | has StoppingConditions => (is => 'ro', isa => 'Paws::SageMaker::LabelingJobStoppingConditions'); | ||
| 13 | has Tags => (is => 'ro', isa => 'ArrayRef[Paws::SageMaker::Tag]'); | ||
| 14 | |||
| 15 | use MooseX::ClassAttribute; | ||
| 16 | |||
| 17 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateLabelingJob'); | ||
| 18 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::SageMaker::CreateLabelingJobResponse'); | ||
| 19 | class_has _result_key => (isa => 'Str', is => 'ro'); | ||
| 20 | 1; | ||
| 21 | |||
| 22 | ### main pod documentation begin ### | ||
| 23 | |||
| 24 | =head1 NAME | ||
| 25 | |||
| 26 | Paws::SageMaker::CreateLabelingJob - Arguments for method CreateLabelingJob on L<Paws::SageMaker> | ||
| 27 | |||
| 28 | =head1 DESCRIPTION | ||
| 29 | |||
| 30 | This class represents the parameters used for calling the method CreateLabelingJob on the | ||
| 31 | L<Amazon SageMaker Service|Paws::SageMaker> service. Use the attributes of this class | ||
| 32 | as arguments to method CreateLabelingJob. | ||
| 33 | |||
| 34 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateLabelingJob. | ||
| 35 | |||
| 36 | =head1 SYNOPSIS | ||
| 37 | |||
| 38 | my $api.sagemaker = Paws->service('SageMaker'); | ||
| 39 | my $CreateLabelingJobResponse = $api . sagemaker->CreateLabelingJob( | ||
| 40 | HumanTaskConfig => { | ||
| 41 | AnnotationConsolidationConfig => { | ||
| 42 | AnnotationConsolidationLambdaArn => 'MyLambdaFunctionArn', # max: 2048 | ||
| 43 | |||
| 44 | }, | ||
| 45 | NumberOfHumanWorkersPerDataObject => 1, # min: 1, max: 9 | ||
| 46 | PreHumanTaskLambdaArn => 'MyLambdaFunctionArn', # max: 2048 | ||
| 47 | TaskDescription => 'MyTaskDescription', # min: 1, max: 255 | ||
| 48 | TaskTimeLimitInSeconds => 1, # min: 30 | ||
| 49 | TaskTitle => 'MyTaskTitle', # min: 1, max: 128 | ||
| 50 | UiConfig => { | ||
| 51 | HumanTaskUiArn => 'MyHumanTaskUiArn', # max: 1024; OPTIONAL | ||
| 52 | UiTemplateS3Uri => 'MyS3Uri', # max: 1024; OPTIONAL | ||
| 53 | }, | ||
| 54 | WorkteamArn => 'MyWorkteamArn', # max: 256 | ||
| 55 | MaxConcurrentTaskCount => 1, # min: 1, max: 1000; OPTIONAL | ||
| 56 | PublicWorkforceTaskPrice => { | ||
| 57 | AmountInUsd => { | ||
| 58 | Cents => 1, # max: 99; OPTIONAL | ||
| 59 | Dollars => 1, # max: 2; OPTIONAL | ||
| 60 | TenthFractionsOfACent => 1, # max: 9; OPTIONAL | ||
| 61 | }, # OPTIONAL | ||
| 62 | }, # OPTIONAL | ||
| 63 | TaskAvailabilityLifetimeInSeconds => 1, # min: 60; OPTIONAL | ||
| 64 | TaskKeywords => [ | ||
| 65 | 'MyTaskKeyword', ... # min: 1, max: 30 | ||
| 66 | ], # min: 1, max: 5; OPTIONAL | ||
| 67 | }, | ||
| 68 | InputConfig => { | ||
| 69 | DataSource => { | ||
| 70 | S3DataSource => { | ||
| 71 | ManifestS3Uri => 'MyS3Uri', # max: 1024; OPTIONAL | ||
| 72 | |||
| 73 | }, # OPTIONAL | ||
| 74 | SnsDataSource => { | ||
| 75 | SnsTopicArn => 'MySnsTopicArn', # max: 2048 | ||
| 76 | |||
| 77 | }, # OPTIONAL | ||
| 78 | }, | ||
| 79 | DataAttributes => { | ||
| 80 | ContentClassifiers => [ | ||
| 81 | 'FreeOfPersonallyIdentifiableInformation', | ||
| 82 | ... # values: FreeOfPersonallyIdentifiableInformation, FreeOfAdultContent | ||
| 83 | ], # max: 256; OPTIONAL | ||
| 84 | }, # OPTIONAL | ||
| 85 | }, | ||
| 86 | LabelAttributeName => 'MyLabelAttributeName', | ||
| 87 | LabelingJobName => 'MyLabelingJobName', | ||
| 88 | OutputConfig => { | ||
| 89 | S3OutputPath => 'MyS3Uri', # max: 1024; OPTIONAL | ||
| 90 | KmsKeyId => 'MyKmsKeyId', # max: 2048; OPTIONAL | ||
| 91 | SnsTopicArn => 'MySnsTopicArn', # max: 2048 | ||
| 92 | }, | ||
| 93 | RoleArn => 'MyRoleArn', | ||
| 94 | LabelCategoryConfigS3Uri => 'MyS3Uri', # OPTIONAL | ||
| 95 | LabelingJobAlgorithmsConfig => { | ||
| 96 | LabelingJobAlgorithmSpecificationArn => | ||
| 97 | 'MyLabelingJobAlgorithmSpecificationArn', # max: 2048 | ||
| 98 | InitialActiveLearningModelArn => | ||
| 99 | 'MyModelArn', # min: 20, max: 2048; OPTIONAL | ||
| 100 | LabelingJobResourceConfig => { | ||
| 101 | VolumeKmsKeyId => 'MyKmsKeyId', # max: 2048; OPTIONAL | ||
| 102 | }, # OPTIONAL | ||
| 103 | }, # OPTIONAL | ||
| 104 | StoppingConditions => { | ||
| 105 | MaxHumanLabeledObjectCount => 1, # min: 1; OPTIONAL | ||
| 106 | MaxPercentageOfInputDatasetLabeled => 1, # min: 1, max: 100; OPTIONAL | ||
| 107 | }, # OPTIONAL | ||
| 108 | Tags => [ | ||
| 109 | { | ||
| 110 | Key => 'MyTagKey', # min: 1, max: 128 | ||
| 111 | Value => 'MyTagValue', # max: 256 | ||
| 112 | |||
| 113 | }, | ||
| 114 | ... | ||
| 115 | ], # OPTIONAL | ||
| 116 | ); | ||
| 117 | |||
| 118 | # Results: | ||
| 119 | my $LabelingJobArn = $CreateLabelingJobResponse->LabelingJobArn; | ||
| 120 | |||
| 121 | # Returns a L<Paws::SageMaker::CreateLabelingJobResponse> object. | ||
| 122 | |||
| 123 | Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object. | ||
| 124 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/api.sagemaker/CreateLabelingJob> | ||
| 125 | |||
| 126 | =head1 ATTRIBUTES | ||
| 127 | |||
| 128 | |||
| 129 | =head2 B<REQUIRED> HumanTaskConfig => L<Paws::SageMaker::HumanTaskConfig> | ||
| 130 | |||
| 131 | Configures the labeling task and how it is presented to workers; | ||
| 132 | including, but not limited to price, keywords, and batch size (task | ||
| 133 | count). | ||
| 134 | |||
| 135 | |||
| 136 | |||
| 137 | =head2 B<REQUIRED> InputConfig => L<Paws::SageMaker::LabelingJobInputConfig> | ||
| 138 | |||
| 139 | Input data for the labeling job, such as the Amazon S3 location of the | ||
| 140 | data objects and the location of the manifest file that describes the | ||
| 141 | data objects. | ||
| 142 | |||
| 143 | You must specify at least one of the following: C<S3DataSource> or | ||
| 144 | C<SnsDataSource>. | ||
| 145 | |||
| 146 | =over | ||
| 147 | |||
| 148 | =item * | ||
| 149 | |||
| 150 | Use C<SnsDataSource> to specify an SNS input topic for a streaming | ||
| 151 | labeling job. If you do not specify and SNS input topic ARN, Ground | ||
| 152 | Truth will create a one-time labeling job that stops after all data | ||
| 153 | objects in the input manifest file have been labeled. | ||
| 154 | |||
| 155 | =item * | ||
| 156 | |||
| 157 | Use C<S3DataSource> to specify an input manifest file for both | ||
| 158 | streaming and one-time labeling jobs. Adding an C<S3DataSource> is | ||
| 159 | optional if you use C<SnsDataSource> to create a streaming labeling | ||
| 160 | job. | ||
| 161 | |||
| 162 | =back | ||
| 163 | |||
| 164 | If you use the Amazon Mechanical Turk workforce, your input data should | ||
| 165 | not include confidential information, personal information or protected | ||
| 166 | health information. Use C<ContentClassifiers> to specify that your data | ||
| 167 | is free of personally identifiable information and adult content. | ||
| 168 | |||
| 169 | |||
| 170 | |||
| 171 | =head2 B<REQUIRED> LabelAttributeName => Str | ||
| 172 | |||
| 173 | The attribute name to use for the label in the output manifest file. | ||
| 174 | This is the key for the key/value pair formed with the label that a | ||
| 175 | worker assigns to the object. The C<LabelAttributeName> must meet the | ||
| 176 | following requirements. | ||
| 177 | |||
| 178 | =over | ||
| 179 | |||
| 180 | =item * | ||
| 181 | |||
| 182 | The name can't end with "-metadata". | ||
| 183 | |||
| 184 | =item * | ||
| 185 | |||
| 186 | If you are using one of the following built-in task types | ||
| 187 | (https://docs.aws.amazon.com/sagemaker/latest/dg/sms-task-types.html), | ||
| 188 | the attribute name I<must> end with "-ref". If the task type you are | ||
| 189 | using is not listed below, the attribute name I<must not> end with | ||
| 190 | "-ref". | ||
| 191 | |||
| 192 | =over | ||
| 193 | |||
| 194 | =item * | ||
| 195 | |||
| 196 | Image semantic segmentation (C<SemanticSegmentation)>, and adjustment | ||
| 197 | (C<AdjustmentSemanticSegmentation>) and verification | ||
| 198 | (C<VerificationSemanticSegmentation>) labeling jobs for this task type. | ||
| 199 | |||
| 200 | =item * | ||
| 201 | |||
| 202 | Video frame object detection (C<VideoObjectDetection>), and adjustment | ||
| 203 | and verification (C<AdjustmentVideoObjectDetection>) labeling jobs for | ||
| 204 | this task type. | ||
| 205 | |||
| 206 | =item * | ||
| 207 | |||
| 208 | Video frame object tracking (C<VideoObjectTracking>), and adjustment | ||
| 209 | and verification (C<AdjustmentVideoObjectTracking>) labeling jobs for | ||
| 210 | this task type. | ||
| 211 | |||
| 212 | =item * | ||
| 213 | |||
| 214 | 3D point cloud semantic segmentation | ||
| 215 | (C<3DPointCloudSemanticSegmentation>), and adjustment and verification | ||
| 216 | (C<Adjustment3DPointCloudSemanticSegmentation>) labeling jobs for this | ||
| 217 | task type. | ||
| 218 | |||
| 219 | =item * | ||
| 220 | |||
| 221 | 3D point cloud object tracking (C<3DPointCloudObjectTracking>), and | ||
| 222 | adjustment and verification (C<Adjustment3DPointCloudObjectTracking>) | ||
| 223 | labeling jobs for this task type. | ||
| 224 | |||
| 225 | =back | ||
| 226 | |||
| 227 | =back | ||
| 228 | |||
| 229 | If you are creating an adjustment or verification labeling job, you | ||
| 230 | must use a I<different> C<LabelAttributeName> than the one used in the | ||
| 231 | original labeling job. The original labeling job is the Ground Truth | ||
| 232 | labeling job that produced the labels that you want verified or | ||
| 233 | adjusted. To learn more about adjustment and verification labeling | ||
| 234 | jobs, see Verify and Adjust Labels | ||
| 235 | (https://docs.aws.amazon.com/sagemaker/latest/dg/sms-verification-data.html). | ||
| 236 | |||
| 237 | |||
| 238 | |||
| 239 | =head2 LabelCategoryConfigS3Uri => Str | ||
| 240 | |||
| 241 | The S3 URI of the file, referred to as a I<label category configuration | ||
| 242 | file>, that defines the categories used to label the data objects. | ||
| 243 | |||
| 244 | For 3D point cloud and video frame task types, you can add label | ||
| 245 | category attributes and frame attributes to your label category | ||
| 246 | configuration file. To learn how, see Create a Labeling Category | ||
| 247 | Configuration File for 3D Point Cloud Labeling Jobs | ||
| 248 | (https://docs.aws.amazon.com/sagemaker/latest/dg/sms-point-cloud-label-category-config.html). | ||
| 249 | |||
| 250 | For all other built-in task types | ||
| 251 | (https://docs.aws.amazon.com/sagemaker/latest/dg/sms-task-types.html) | ||
| 252 | and custom tasks | ||
| 253 | (https://docs.aws.amazon.com/sagemaker/latest/dg/sms-custom-templates.html), | ||
| 254 | your label category configuration file must be a JSON file in the | ||
| 255 | following format. Identify the labels you want to use by replacing | ||
| 256 | C<label_1>, C<label_2>,C<...>,C<label_n> with your label categories. | ||
| 257 | |||
| 258 | C<{> | ||
| 259 | |||
| 260 | C<"document-version": "2018-11-28",> | ||
| 261 | |||
| 262 | C<"labels": [{"label": "label_1"},{"label": "label_2"},...{"label": | ||
| 263 | "label_n"}]> | ||
| 264 | |||
| 265 | C<}> | ||
| 266 | |||
| 267 | Note the following about the label category configuration file: | ||
| 268 | |||
| 269 | =over | ||
| 270 | |||
| 271 | =item * | ||
| 272 | |||
| 273 | For image classification and text classification (single and | ||
| 274 | multi-label) you must specify at least two label categories. For all | ||
| 275 | other task types, the minimum number of label categories required is | ||
| 276 | one. | ||
| 277 | |||
| 278 | =item * | ||
| 279 | |||
| 280 | Each label category must be unique, you cannot specify duplicate label | ||
| 281 | categories. | ||
| 282 | |||
| 283 | =item * | ||
| 284 | |||
| 285 | If you create a 3D point cloud or video frame adjustment or | ||
| 286 | verification labeling job, you must include C<auditLabelAttributeName> | ||
| 287 | in the label category configuration. Use this parameter to enter the | ||
| 288 | C<LabelAttributeName> | ||
| 289 | (https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateLabelingJob.html#sagemaker-CreateLabelingJob-request-LabelAttributeName) | ||
| 290 | of the labeling job you want to adjust or verify annotations of. | ||
| 291 | |||
| 292 | =back | ||
| 293 | |||
| 294 | |||
| 295 | |||
| 296 | |||
| 297 | =head2 LabelingJobAlgorithmsConfig => L<Paws::SageMaker::LabelingJobAlgorithmsConfig> | ||
| 298 | |||
| 299 | Configures the information required to perform automated data labeling. | ||
| 300 | |||
| 301 | |||
| 302 | |||
| 303 | =head2 B<REQUIRED> LabelingJobName => Str | ||
| 304 | |||
| 305 | The name of the labeling job. This name is used to identify the job in | ||
| 306 | a list of labeling jobs. Labeling job names must be unique within an | ||
| 307 | Amazon Web Services account and region. C<LabelingJobName> is not case | ||
| 308 | sensitive. For example, Example-job and example-job are considered the | ||
| 309 | same labeling job name by Ground Truth. | ||
| 310 | |||
| 311 | |||
| 312 | |||
| 313 | =head2 B<REQUIRED> OutputConfig => L<Paws::SageMaker::LabelingJobOutputConfig> | ||
| 314 | |||
| 315 | The location of the output data and the Amazon Web Services Key | ||
| 316 | Management Service key ID for the key used to encrypt the output data, | ||
| 317 | if any. | ||
| 318 | |||
| 319 | |||
| 320 | |||
| 321 | =head2 B<REQUIRED> RoleArn => Str | ||
| 322 | |||
| 323 | The Amazon Resource Number (ARN) that Amazon SageMaker assumes to | ||
| 324 | perform tasks on your behalf during data labeling. You must grant this | ||
| 325 | role the necessary permissions so that Amazon SageMaker can | ||
| 326 | successfully complete data labeling. | ||
| 327 | |||
| 328 | |||
| 329 | |||
| 330 | =head2 StoppingConditions => L<Paws::SageMaker::LabelingJobStoppingConditions> | ||
| 331 | |||
| 332 | A set of conditions for stopping the labeling job. If any of the | ||
| 333 | conditions are met, the job is automatically stopped. You can use these | ||
| 334 | conditions to control the cost of data labeling. | ||
| 335 | |||
| 336 | |||
| 337 | |||
| 338 | =head2 Tags => ArrayRef[L<Paws::SageMaker::Tag>] | ||
| 339 | |||
| 340 | An array of key/value pairs. For more information, see Using Cost | ||
| 341 | Allocation Tags | ||
| 342 | (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-what) | ||
| 343 | in the I<Amazon Web Services Billing and Cost Management User Guide>. | ||
| 344 | |||
| 345 | |||
| 346 | |||
| 347 | |||
| 348 | =head1 SEE ALSO | ||
| 349 | |||
| 350 | This class forms part of L<Paws>, documenting arguments for method CreateLabelingJob in L<Paws::SageMaker> | ||
| 351 | |||
| 352 | =head1 BUGS and CONTRIBUTIONS | ||
| 353 | |||
| 354 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 355 | |||
| 356 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 357 | |||
| 358 | =cut | ||
| 359 |