Skip to content

Commit 6c5873b

Browse files
Correct way to fetch a SageMaker bucket
1 parent 956b743 commit 6c5873b

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

sagemaker_ssh_helper/sm-local-start-ssh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,11 @@ EXTRA_SSH_ARGS=$*
1818

1919
read -r -d '' program << EOF
2020
import logging
21-
import sagemaker
2221
logging.getLogger('sagemaker.config').setLevel(logging.WARNING)
22+
import sagemaker
2323
print(sagemaker.Session().default_bucket())
2424
EOF
2525

26-
# TODO: write message about exporting a var to override
2726
if [ -z "${SSH_AUTHORIZED_KEYS_PATH}" ]; then
2827
bucket=$(python -c "$program")
2928
SSH_AUTHORIZED_KEYS_PATH="s3://$bucket/ssh-authorized-keys/"

tests/get_sagemaker_bucket.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
read -r -d '' program << EOF
44
import logging
5-
import sagemaker
65
logging.getLogger('sagemaker.config').setLevel(logging.WARNING)
6+
import sagemaker
77
print(sagemaker.Session().default_bucket())
88
EOF
99

0 commit comments

Comments
 (0)