Skip to content

Instantly share code, notes, and snippets.

@coreyjs
Created April 2, 2021 01:11
Show Gist options
  • Save coreyjs/32b042a784bdf7dc7c2a36c5bcc26235 to your computer and use it in GitHub Desktop.
Save coreyjs/32b042a784bdf7dc7c2a36c5bcc26235 to your computer and use it in GitHub Desktop.
Sagemaker Helpers
# Now the transform job has executed and the result, the estimated sentiment of each review, has been saved on S3.
# Since we would rather work on this file locally we can perform a bit of notebook magic to copy the file to the data_dir.
!aws s3 cp --recursive $xgb_transformer.output_path $data_dir
# First we will remove all of the files contained in the data_dir directory
!rm $data_dir/*
# And then we delete the directory itself
!rmdir $data_dir
# Similarly we will remove the files in the cache_dir directory and the directory itself
!rm $cache_dir/*
!rmdir $cache_dir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment