Describe the bug
Instead of a / after the bucket name S3Downloader.list() adds \\ when constructing the URI under Windows resulting in an address that looks as follows:
s3://bucket_name\\models/output/model.tar.gz
To reproduce
I assume that you have set up your credentials underneath ~/.aws on your Windows machine.
conda create --name sagemaker-test
conda activate sagemaker-test
conda install pip
pip install sagemaker
- Save the following Python script underneath
C:\examples\s3downlader.py and modify the S3 URI to test it against your S3 bucket:
import sagemaker
s3_downloader = sagemaker.s3.S3Downloader()
output_path = "s3://[YOUR BUCKET NAME]/models/"
print(s3_downloader.list(output_path))
- Back in Anaconda Prompt, execute the following command:
python c:\examples\s3downloader.py
- In my case the result looks as follows:
['s3://[REMOVED_MY_BUCKET_NAME]\\models/sagemaker-train-xgboost-15-May-2020-10-41-44/output/model.tar.gz',
's3://[REMOVED_MY_BUCKET_NAME]\\models/sagemaker-train-xgboost-15-May-2020-10-41-44/predictions/taxi_test.csv.out']
Expected behavior
In contrast, when I execute the Python script above in a SageMaker notebook, everything works as expected and the response looks as follows:
['s3://[REMOVED_MY_BUCKET_NAME]/models/sagemaker-train-xgboost-15-May-2020-10-41-44/output/model.tar.gz',
's3://[REMOVED_MY_BUCKET_NAME]/models/sagemaker-train-xgboost-15-May-2020-10-41-44/predictions/taxi_test.csv.out']
System information
A description of your system. Please provide:
- SageMaker Python SDK version: 1.58.2
- Python version: 3.7
- OS: Windows 10
Describe the bug
Instead of a
/after the bucket nameS3Downloader.list()adds\\when constructing the URI under Windows resulting in an address that looks as follows:s3://bucket_name\\models/output/model.tar.gzTo reproduce
I assume that you have set up your credentials underneath
~/.awson your Windows machine.C:\examples\s3downlader.pyand modify the S3 URI to test it against your S3 bucket:Expected behavior
In contrast, when I execute the Python script above in a SageMaker notebook, everything works as expected and the response looks as follows:
System information
A description of your system. Please provide: