Skip to content

Commit 7423775

Browse files
committed
Correct docs to reflect that upload_data would create only default bucket. (aws#373)
1 parent a460a96 commit 7423775

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/sagemaker/session.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ def upload_data(self, path, bucket=None, key_prefix='data'):
119119
Args:
120120
path (str): Path (absolute or relative) of local file or directory to upload.
121121
bucket (str): Name of the S3 Bucket to upload to (default: None). If not specified, the
122-
default bucket of the ``Session`` is used. If the bucket does not exist, the ``Session``
123-
creates the bucket.
122+
default bucket of the ``Session`` is used (if default bucket does not exist, the ``Session``
123+
creates it).
124124
key_prefix (str): Optional S3 object key name prefix (default: 'data'). S3 uses the prefix to
125125
create a directory structure for the bucket content that it display in the S3 console.
126126

tests/unit/test_pytorch.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,15 @@
2424
from sagemaker.pytorch import PyTorch
2525
from sagemaker.pytorch import PyTorchPredictor, PyTorchModel
2626

27-
from tests.integ import DATA_DIR, PYTHON_VERSION
2827

28+
DATA_DIR = os.path.join(os.path.dirname(__file__), '..', 'data')
2929
SCRIPT_PATH = os.path.join(DATA_DIR, 'dummy_script.py')
3030
TIMESTAMP = '2017-11-06-14:14:15.672'
3131
TIME = 1507167947
3232
BUCKET_NAME = 'mybucket'
3333
INSTANCE_COUNT = 1
3434
INSTANCE_TYPE = 'ml.c4.4xlarge'
35+
PYTHON_VERSION = 'py' + str(sys.version_info.major)
3536
IMAGE_NAME = 'sagemaker-pytorch'
3637
JOB_NAME = '{}-{}'.format(IMAGE_NAME, TIMESTAMP)
3738
IMAGE_URI_FORMAT_STRING = "520713654638.dkr.ecr.{}.amazonaws.com/{}:{}-{}-{}"

0 commit comments

Comments
 (0)