Skip to content

Commit b73822c

Browse files
authored
Fix formatting in PyTorch README and remove explicit version reference in general README (#363)
1 parent 7634265 commit b73822c

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
lines changed

README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ You can install from source by cloning this repository and running a pip install
5353
::
5454

5555
git clone https://github.com/aws/sagemaker-python-sdk.git
56-
python setup.py sdist
57-
pip install dist/sagemaker-1.9.1.tar.gz
56+
cd sagemaker-python-sdk
57+
pip install .
5858

5959
Supported Operating Systems
6060
~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -521,4 +521,4 @@ After that, invoke the ``deploy()`` method on the ``Model``:
521521
522522
This returns a predictor the same way an ``Estimator`` does when ``deploy()`` is called. You can now get inferences just like with any other model deployed on Amazon SageMaker.
523523

524-
A full example is available in the `Amazon SageMaker examples repository <https://github.com/awslabs/amazon-sagemaker-examples/tree/master/advanced_functionality/mxnet_mnist_byom>`__.
524+
A full example is available in the `Amazon SageMaker examples repository <https://github.com/awslabs/amazon-sagemaker-examples/tree/master/advanced_functionality/mxnet_mnist_byom>`__.

src/sagemaker/pytorch/README.rst

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
=======================================
32
SageMaker PyTorch Estimators and Models
43
=======================================
@@ -39,24 +38,21 @@ using to submit the script to SageMaker via a ``PyTorch`` Estimator. This will b
3938
Suppose that you already have a PyTorch training script called `pytorch-train.py`.
4039
You can then setup a ``PyTorch`` Estimator with keyword arguments to point to this script and define how SageMaker runs it:
4140

42-
```python
41+
.. code:: python
4342
4443
from sagemaker.pytorch import PyTorch
4544
46-
pytorch_estimator = PyTorch(entry_point="pytorch-train.py",
47-
role="SageMakerRole",
48-
train_instance_type="ml.p3.2xlarge",
45+
pytorch_estimator = PyTorch(entry_point='pytorch-train.py',
46+
role='SageMakerRole',
47+
train_instance_type='ml.p3.2xlarge',
4948
train_instance_count=1)
50-
```
5149
5250
After that, you simply tell the estimator to start a training job and provide an S3 URL
5351
that is the path to your training data within Amazon S3:
5452

55-
```python
56-
57-
pytorch_estimator.fit("s3://bucket/path/to/training/data")
53+
.. code:: python
5854
59-
```
55+
pytorch_estimator.fit('s3://bucket/path/to/training/data')
6056
6157
In the following sections, we'll discuss how to prepare a training script for execution on SageMaker,
6258
then how to run that script on SageMaker using a ``PyTorch`` Estimator.
@@ -443,7 +439,7 @@ the model server receives two pieces of information:
443439
- The request data body, a byte array which is at most 5 MB (5 \* 1024
444440
\* 1024 bytes) in size.
445441

446-
The SageMaker PyTorch model server will invoke an "input_fn" function in your hosting script,
442+
The SageMaker PyTorch model server will invoke an ``input_fn`` function in your hosting script,
447443
passing in this information. If you define an ``input_fn`` function definition,
448444
it should return an object that can be passed to ``predict_fn`` and have the following signature:
449445

@@ -647,7 +643,7 @@ Please refer to:
647643

648644
https://github.com/awslabs/amazon-sagemaker-examples/tree/master/sagemaker-python-sdk
649645

650-
These are also available in SageMaker Notebook Instance hosted Jupyter notebooks under the "sample notebooks" folder.
646+
These are also available in SageMaker Notebook Instance hosted Jupyter notebooks under the sample notebooks folder.
651647

652648

653649
SageMaker PyTorch Docker Containers

0 commit comments

Comments
 (0)