Skip to content

Commit

Permalink
fix: Use sagemaker session's s3 resource for downloading folders
Browse files Browse the repository at this point in the history
  • Loading branch information
Darren Stack committed May 9, 2024
1 parent 533f30a commit 248e695
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/sagemaker/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,7 @@ def download_folder(bucket_name, prefix, target, sagemaker_session):
sagemaker_session (sagemaker.session.Session): a sagemaker session to
interact with S3.
"""
boto_session = sagemaker_session.boto_session
s3 = boto_session.resource("s3", region_name=boto_session.region_name)
s3 = sagemaker_session.s3_resource

prefix = prefix.lstrip("/")

Expand Down

0 comments on commit 248e695

Please sign in to comment.