Skip to content

Fix formatting in PyTorch README and remove SDK version in general README #363

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ You can install from source by cloning this repository and running a pip install
::

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

Supported Operating Systems
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -521,4 +521,4 @@ After that, invoke the ``deploy()`` method on the ``Model``:

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.

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>`__.
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>`__.
20 changes: 8 additions & 12 deletions src/sagemaker/pytorch/README.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

=======================================
SageMaker PyTorch Estimators and Models
=======================================
Expand Down Expand Up @@ -39,24 +38,21 @@ using to submit the script to SageMaker via a ``PyTorch`` Estimator. This will b
Suppose that you already have a PyTorch training script called `pytorch-train.py`.
You can then setup a ``PyTorch`` Estimator with keyword arguments to point to this script and define how SageMaker runs it:

```python
.. code:: python

from sagemaker.pytorch import PyTorch

pytorch_estimator = PyTorch(entry_point="pytorch-train.py",
role="SageMakerRole",
train_instance_type="ml.p3.2xlarge",
pytorch_estimator = PyTorch(entry_point='pytorch-train.py',
role='SageMakerRole',
train_instance_type='ml.p3.2xlarge',
train_instance_count=1)
```

After that, you simply tell the estimator to start a training job and provide an S3 URL
that is the path to your training data within Amazon S3:

```python

pytorch_estimator.fit("s3://bucket/path/to/training/data")
.. code:: python

```
pytorch_estimator.fit('s3://bucket/path/to/training/data')

In the following sections, we'll discuss how to prepare a training script for execution on SageMaker,
then how to run that script on SageMaker using a ``PyTorch`` Estimator.
Expand Down Expand Up @@ -443,7 +439,7 @@ the model server receives two pieces of information:
- The request data body, a byte array which is at most 5 MB (5 \* 1024
\* 1024 bytes) in size.

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

Expand Down Expand Up @@ -647,7 +643,7 @@ Please refer to:

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

These are also available in SageMaker Notebook Instance hosted Jupyter notebooks under the "sample notebooks" folder.
These are also available in SageMaker Notebook Instance hosted Jupyter notebooks under the sample notebooks folder.


SageMaker PyTorch Docker Containers
Expand Down