Skip to content

Commit bff9e4b

Browse files
authored
doc: clarify channel environment variables in PyTorch documentation (#1294)
1 parent 8dae626 commit bff9e4b

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

doc/using_pytorch.rst

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,18 @@ The training script is very similar to a training script you might run outside o
4040
can access useful properties about the training environment through various environment variables.
4141
For example:
4242

43+
* ``SM_NUM_GPUS``: An integer representing the number of GPUs available to the host.
4344
* ``SM_MODEL_DIR``: A string representing the path to the directory to write model artifacts to.
4445
These artifacts are uploaded to S3 for model hosting.
45-
* ``SM_NUM_GPUS``: An integer representing the number of GPUs available to the host.
4646
* ``SM_OUTPUT_DATA_DIR``: A string representing the filesystem path to write output artifacts to. Output artifacts may
4747
include checkpoints, graphs, and other files to save, not including model artifacts. These artifacts are compressed
4848
and uploaded to S3 to the same S3 prefix as the model artifacts.
49-
50-
Suppose that two input channels, 'train' and 'test', were used in the call to the PyTorch estimator's ``fit`` method,
51-
the following will be set, following the format "SM_CHANNEL_[channel_name]":
52-
53-
* ``SM_CHANNEL_TRAIN``: A string representing the path to the directory containing data in the 'train' channel
54-
* ``SM_CHANNEL_TEST``: Same as above, but for the 'test' channel.
49+
* ``SM_CHANNEL_XXXX``: A string that represents the path to the directory that contains the input data for the specified channel.
50+
For example, if you specify two input channels in the PyTorch estimator's ``fit`` call, named 'train' and 'test',
51+
the environment variables ``SM_CHANNEL_TRAIN`` and ``SM_CHANNEL_TEST`` are set.
5552

5653
A typical training script loads data from the input channels, configures training with hyperparameters, trains a model,
57-
and saves a model to `model_dir` so that it can be hosted later. Hyperparameters are passed to your script as arguments
54+
and saves a model to ``model_dir`` so that it can be hosted later. Hyperparameters are passed to your script as arguments
5855
and can be retrieved with an argparse.ArgumentParser instance. For example, a training script might start
5956
with the following:
6057

0 commit comments

Comments
 (0)