Skip to content

Instantly share code, notes, and snippets.

@ctodd
Created July 9, 2020 04:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ctodd/6ef6a6ec5a2b0113b795dc4b4d74651b to your computer and use it in GitHub Desktop.
Save ctodd/6ef6a6ec5a2b0113b795dc4b4d74651b to your computer and use it in GitHub Desktop.
import boto3
client = boto3.client('sagemaker')
s3_output = client.describe_labeling_job(LabelingJobName=labeling_job_name)['OutputConfig']['S3OutputPath'] + labeling_job_name
augmented_manifest_url = f'{s3_output}/manifests/output/output.manifest'
import os
import shutil
try:
os.makedirs(local_manifest_dir, exist_ok=False)
except FileExistsError:
shutil.rmtree(local_manifest_dir)
augmented_manifest_file = local_manifest_dir + '/output.manifest'
!aws s3 cp $augmented_manifest_url $augmented_manifest_file
!head -3 $augmented_manifest_file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment