Skip to content

Commit c4ea1f6

Browse files
billdoorslaurenyu
authored andcommitted
doc: fix typo and improve clarity on installing packages via "requirements.txt" (#1215)
Without specifying "source_dir" and put ``requirements.txt`` in that folder, packages in "requirements.txt" will fail to install.
1 parent bf48fb1 commit c4ea1f6

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

doc/using_pytorch.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,7 @@ Using third-party libraries
125125
When running your training script on SageMaker, it will have access to some pre-installed third-party libraries including ``torch``, ``torchvisopm``, and ``numpy``.
126126
For more information on the runtime environment, including specific package versions, see `SageMaker PyTorch Docker containers <#id4>`__.
127127

128-
If there are other packages you want to use with your script, you can include a ``requirements.txt`` file in the same directory as your training script to install other dependencies at runtime.
129-
A ``requirements.txt`` file is a text file that contains a list of items that are installed by using ``pip install``. You can also specify the version of an item to install.
128+
If there are other packages you want to use with your script, you can include a ``requirements.txt`` file in the same directory as your training script to install other dependencies at runtime. Both ``requirements.txt`` and your training script should be put in the same folder. You must specify this folder in ``source_dir`` argument when creating PyTorch estimator. A ``requirements.txt`` file is a text file that contains a list of items that are installed by using ``pip install``. You can also specify the version of an item to install.
130129
For information about the format of a ``requirements.txt`` file, see `Requirements Files <https://pip.pypa.io/en/stable/user_guide/#requirements-files>`__ in the pip documentation.
131130

132131

@@ -524,7 +523,7 @@ The PyTorchModel constructor takes the following arguments:
524523
which should be executed as the entry point to model hosting.
525524
- ``source_dir:`` Optional. Path (absolute or relative) to a
526525
directory with any other training source code dependencies including
527-
tne entry point file. Structure within this directory will be
526+
the entry point file. Structure within this directory will be
528527
preserved when training on SageMaker.
529528
- ``enable_cloudwatch_metrics:`` Optional. If true, training
530529
and hosting containers will generate Cloudwatch metrics under the
@@ -655,9 +654,9 @@ The following are optional arguments. When you create a ``PyTorch`` object, you
655654
and where to find the source code to build your custom image.
656655

657656
***********************************
658-
SageMaker PyTorch Docker Containers
657+
SageMaker PyTorch Docker Containers
659658
***********************************
660659

661660
For information about SageMaker PyTorch containers, see `the SageMaker PyTorch containers repository <https://github.com/aws/sagemaker-pytorch-container>`_.
662661

663-
For information about SageMaker PyTorch container dependencies, see `SageMaker PyTorch Containers <https://github.com/aws/sagemaker-python-sdk/tree/master/src/sagemaker/pytorch#sagemaker-pytorch-docker-containers>`_.
662+
For information about SageMaker PyTorch container dependencies, see `SageMaker PyTorch Containers <https://github.com/aws/sagemaker-python-sdk/tree/master/src/sagemaker/pytorch#sagemaker-pytorch-docker-containers>`_.

0 commit comments

Comments
 (0)