1개 답변
- 최신
- 최다 투표
- 가장 많은 댓글
0
Install and configure boto3 if you haven't done so already. Use the create_labeling_job function from the SageMaker client in boto3. Pass necessary parameters like HumanTaskConfig, InputConfig, and OutputConfig containing information about the labeling workforce, input data location, and output data location.
import boto3
sagemaker_client = boto3.client('sagemaker')
response = sagemaker_client.create_labeling_job(
LabelingJobName='your-labeling-job-name',
LabelAttributeName='your-label-attribute-name',
InputConfig={
'DataSource': {
'S3DataSource': {
'ManifestS3Uri': 's3://your-input-data-bucket/your-manifest-file.manifest'
}
},
'DataAttributes': {
'ContentClassifiers': [
'FreeOfPersonallyIdentifiableInformation',
'FreeOfAdultContent',
]
}
},
OutputConfig={
'S3OutputPath': 's3://your-output-data-bucket/'
},
RoleArn='your-sagemaker-execution-role-arn',
HumanTaskConfig={
'WorkteamArn': 'your-workteam-arn',
'UiConfig': {
'UiTemplateS3Uri': 's3://your-ui-template-bucket/your-ui-template.zip'
},
'PreHumanTaskLambdaArn': 'your-pre-human-task-lambda-arn',
'TaskKeywords': ['your-task-keyword'],
'TaskTitle': 'Your Task Title',
'TaskDescription': 'Your Task Description',
'NumberOfHumanWorkersPerDataObject': 1,
'TaskTimeLimitInSeconds': 600,
'TaskAvailabilityLifetimeInSeconds': 86400,
'MaxConcurrentTaskCount': 10,
'AnnotationConsolidationConfig': {
'AnnotationConsolidationLambdaArn': 'your-annotation-consolidation-lambda-arn'
}
}
)
관련 콘텐츠
- AWS 공식업데이트됨 2년 전
To create a labelling job,
WorkteamArn
is required. To create a Work Team,CognitoMemberDefinition
(withUserPool
,UserGroup
, andClientId
) is required. To create a user pool with client App, callback URLs (i.e.,https://XXX.labeling.REGION.sagemaker.aws
and possiblyhttps://YYY.cloudfront.net
) are required. My question is, how to spin offhttps://XXX.labeling.REGION.sagemaker.aws
? What doeshttps://YYY.cloudfront.net
do?