Skip to content

Commit 5a719a3

Browse files
authored
doc: add version requirement for using "requirements.txt" when serving an MXNet model (#1232)
1 parent 82849f1 commit 5a719a3

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

doc/using_mxnet.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,15 @@ For more information on the runtime environment, including specific package vers
312312
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.
313313
Both ``requirements.txt`` and your training script should be put in the same folder.
314314
You must specify this folder in ``source_dir`` argument when creating an MXNet estimator.
315+
316+
The function of installing packages using ``requirements.txt`` is supported for all MXNet versions during training.
317+
When serving an MXNet model, support for this function varies with MXNet versions.
318+
For MXNet 1.6.0 or newer, ``requirements.txt`` must be under folder ``code``.
319+
The SageMaker MXNet Estimator will automatically save ``code`` in ``model.tar.gz`` after training (assuming you set up your script and ``requirements.txt`` correctly as stipulated in the previous paragraph).
320+
In the case of bringing your own trained model for deployment, you must save ``requirements.txt`` under folder ``code`` in ``model.tar.gz`` yourself or specify it through ``dependencies``.
321+
For MXNet 1.4.1, ``requirements.txt`` is not supported for inference.
322+
For MXNet 0.12.1-1.3.0, ``requirements.txt`` must be in ``source_dir``.
323+
315324
A ``requirements.txt`` file is a text file that contains a list of items that are installed by using ``pip install``.
316325
You can also specify the version of an item to install.
317326
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.

doc/using_pytorch.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ For more information on the runtime environment, including specific package vers
127127

128128
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.
129129

130-
The function of installing packages using ``requirements.txt`` is supported for all PyTorch versions during training. When serving a PyTorch model, support for this function varies with PyTorch Versions. For PyTorch 1.3.1 or newer, ``requirements.txt`` must be under folder ``code``. SageMaker PyTorch Estimator will automatically save ``code`` in ``model.tar.gz`` after training (assuming you set up your script and ``requirements.txt`` correctly as stipulated in the previous paragraph). In the case of bringing your own trained model for deployment, you must save ``requirements.txt`` under folder ``code`` in ``model.tar.gz`` yourself. For PyTorch 1.2.0, ``requirements.txt`` is not supported for inference. For PyTorch 0.4.0 to 1.1.0, ``requirements.txt`` must be in ``source_dir``.
130+
The function of installing packages using ``requirements.txt`` is supported for all PyTorch versions during training. When serving a PyTorch model, support for this function varies with PyTorch versions. For PyTorch 1.3.1 or newer, ``requirements.txt`` must be under folder ``code``. The SageMaker PyTorch Estimator will automatically save ``code`` in ``model.tar.gz`` after training (assuming you set up your script and ``requirements.txt`` correctly as stipulated in the previous paragraph). In the case of bringing your own trained model for deployment, you must save ``requirements.txt`` under folder ``code`` in ``model.tar.gz`` yourself or specify it through ``dependencies``. For PyTorch 1.2.0, ``requirements.txt`` is not supported for inference. For PyTorch 0.4.0 to 1.1.0, ``requirements.txt`` must be in ``source_dir``.
131131

132132
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. 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.
133133

0 commit comments

Comments
 (0)