I have been trying to run create_labeling_api for the last two days, but I could not able to do it. I tried with different options, but no success. Can I get any help with this problem?
Here is the code:
## Set up Create Labeling Request
labelAttributeName = job_name + "-ref"
if task_type == "3DPointCloudObjectDetection":
labelAttributeName = job_name
print(job_name)
ground_truth_request = {
"InputConfig" : {
"DataSource": {
"S3DataSource": {
"ManifestS3Uri": '{}'.format(manifest_s3_uri_map[task_type]),
}
},
},
"OutputConfig" : {
"S3OutputPath": f's3://{BUCKET}/{EXP_NAME}/output/',
},
"HumanTaskConfig" : human_task_config,
"LabelingJobName": job_name,
"RoleArn": role,
"LabelAttributeName": labelAttributeName,
"LabelCategoryConfigS3Uri": label_category_file_s3_uri_map[task_type]
}
print(json.dumps(ground_truth_request, indent=4, sort_keys=True))
Point-Cloud-OD
{
"HumanTaskConfig": {
"AnnotationConsolidationConfig": {
"AnnotationConsolidationLambdaArn": "arn:aws:lambda:eu-central-1:326177286064:function:ACS-3DPointCloudObjectDetection"
},
"MaxConcurrentTaskCount": 200,
"NumberOfHumanWorkersPerDataObject": 1,
"PreHumanTaskLambdaArn": "arn:aws:lambda:eu-central-1:326177286064:function:PRE-3DPointCloudObjectDetection",
"TaskAvailabilityLifetimeInSeconds": 18000,
"TaskDescription": "point-cloud-labelling",
"TaskKeywords": [
"lidar",
"pointcloud"
],
"TaskTimeLimitInSeconds": 360,
"TaskTitle": "Detection-labelling-for-point-cloud",
"UiConfig": {
"HumanTaskUiArn": "arn:aws:sagemaker:eu-central-1:394669845002:human-task-ui/3DPointCloudObjectDetection"
},
"WorkteamArn": "arn:aws:sagemaker:eu-central-1:326177286064:workteam/private-crowd/suri"
},
"InputConfig": {
"DataSource": {
"S3DataSource": {
"ManifestS3Uri": "s3://sample-point-cloud/artifacts/gt-point-cloud-demos/manifests/SingleFrame-manifest.json"
}
}
},
"LabelAttributeName": "Point-Cloud-OD",
"LabelCategoryConfigS3Uri": "s3://sample-point-cloud/artifacts/gt-point-cloud-demos/label-category-config/label-category.json",
"LabelingJobName": "Point-Cloud-OD",
"OutputConfig": {
"S3OutputPath": "s3://sample-point-cloud/validation/output/"
},
"RoleArn": "arn:aws:iam::326177286064:role/service-role/AmazonSageMaker-ExecutionRole-20210115T142880"
}
Error:
ClientError Traceback (most recent call last)
<ipython-input-220-84378bff2ae5> in <module>
----> 1 sagemaker_client.create_labeling_job(**ground_truth_request)
2 print(f'Labeling Job Name: {job_name}')
~/anaconda3/envs/python3/lib/python3.6/site-packages/botocore/client.py in _api_call(self, *args, **kwargs)
355 "%s() only accepts keyword arguments." % py_operation_name)
356 # The "self" in this scope is referring to the BaseClient.
--> 357 return self._make_api_call(operation_name, kwargs)
358
359 _api_call.__name__ = str(py_operation_name)
~/anaconda3/envs/python3/lib/python3.6/site-packages/botocore/client.py in _make_api_call(self, operation_name, api_params)
674 error_code = parsed_response.get("Error", {}).get("Code")
675 error_class = self.exceptions.from_code(error_code)
--> 676 raise error_class(parsed_response, operation_name)
677 else:
678 return parsed_response
ClientError: An error occurred (ValidationException) when calling the CreateLabelingJob operation: HumanTaskUiArn is not supported for the Custom task type. You must provide an S3 URI identifying the location of a worker task template (UiTemplateS3Uri) for this task type. Remove the HumanTaskUiArn from your request, provide an UiTemplateS3Uri, and try your request again.