Skip to content

Commit d1b389c

Browse files
author
Qingwei Li
committed
revised doc
1 parent 61852dd commit d1b389c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

doc/using_pytorch.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,11 @@ 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. 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. When serving a PyTorch model, you must have PyTorch 1.3.1 or newer to install packages using``requirements.txt`` file. 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.
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.
129+
130+
The function of installing packages using ``requirements.txt`` is supported for all PyTorch versions during training. When serving a PyTorch model, this function is supported but how to use it varies with PyTorch Versions. For PyTorch 1.3.1 or newer, ``requirements.txt`` must be in ``source_dir``. For PyTorch 1.2.0, ``requirements.txt`` must be under directory ``code``. For PyTorch 0.4.0 to 1.1.0, ``requirements.txt`` must be in ``source_dir`` and also in model tarball.
131+
132+
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.
129133

130134

131135
Create an Estimator

0 commit comments

Comments
 (0)