Skip to content

Commit 7dd5407

Browse files
committed
doc: document that Local Mode + local code doesn't support dependencies arg
1 parent eeb71ae commit 7dd5407

File tree

9 files changed

+28
-8
lines changed

9 files changed

+28
-8
lines changed

src/sagemaker/chainer/estimator.py

+1
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ def create_model(
200200
dependencies (list[str]): A list of paths to directories (absolute or relative) with
201201
any additional libraries that will be exported to the container.
202202
If not specified, the dependencies from training are used.
203+
This is not supported with "local code" in Local Mode.
203204
**kwargs: Additional kwargs passed to the ChainerModel constructor.
204205
205206
Returns:

src/sagemaker/estimator.py

+10-4
Original file line numberDiff line numberDiff line change
@@ -1528,11 +1528,16 @@ def __init__(
15281528
copied to SageMaker in the same folder where the entrypoint is
15291529
copied. If 'git_config' is provided, 'dependencies' should be a
15301530
list of relative locations to directories with any additional
1531-
libraries needed in the Git repo. .. admonition:: Example
1531+
libraries needed in the Git repo.
15321532
1533-
The following call >>> Estimator(entry_point='train.py',
1534-
dependencies=['my/libs/common', 'virtual-env']) results in
1535-
the following inside the container:
1533+
.. admonition:: Example
1534+
1535+
The following call
1536+
1537+
>>> Estimator(entry_point='train.py',
1538+
... dependencies=['my/libs/common', 'virtual-env'])
1539+
1540+
results in the following inside the container:
15361541
15371542
>>> $ ls
15381543
@@ -1541,6 +1546,7 @@ def __init__(
15411546
>>> |------ common
15421547
>>> |------ virtual-env
15431548
1549+
This is not supported with "local code" in Local Mode.
15441550
enable_network_isolation (bool): Specifies whether container will
15451551
run in network isolation mode. Network isolation mode restricts
15461552
the container access to outside networks (such as the internet).

src/sagemaker/model.py

+11-4
Original file line numberDiff line numberDiff line change
@@ -709,18 +709,25 @@ def __init__(
709709
list of relative locations to directories with any additional
710710
libraries needed in the Git repo. If the ```source_dir``` points
711711
to S3, code will be uploaded and the S3 location will be used
712-
instead. .. admonition:: Example
712+
instead.
713713
714-
The following call >>> Estimator(entry_point='inference.py',
715-
dependencies=['my/libs/common', 'virtual-env']) results in
716-
the following inside the container:
714+
.. admonition:: Example
715+
716+
The following call
717+
718+
>>> Model(entry_point='inference.py',
719+
... dependencies=['my/libs/common', 'virtual-env'])
720+
721+
results in the following inside the container:
717722
718723
>>> $ ls
719724
720725
>>> opt/ml/code
721726
>>> |------ inference.py
722727
>>> |------ common
723728
>>> |------ virtual-env
729+
730+
This is not supported with "local code" in Local Mode.
724731
git_config (dict[str, str]): Git configurations used for cloning
725732
files, including ``repo``, ``branch``, ``commit``,
726733
``2FA_enabled``, ``username``, ``password`` and ``token``. The

src/sagemaker/mxnet/estimator.py

+1
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ def create_model(
196196
dependencies (list[str]): A list of paths to directories (absolute or relative) with
197197
any additional libraries that will be exported to the container.
198198
If not specified, the dependencies from training are used.
199+
This is not supported with "local code" in Local Mode.
199200
image_name (str): If specified, the estimator will use this image for hosting, instead
200201
of selecting the appropriate SageMaker official image based on framework_version
201202
and py_version. It can be an ECR url or dockerhub image and tag.

src/sagemaker/pytorch/estimator.py

+1
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ def create_model(
159159
dependencies (list[str]): A list of paths to directories (absolute or relative) with
160160
any additional libraries that will be exported to the container.
161161
If not specified, the dependencies from training are used.
162+
This is not supported with "local code" in Local Mode.
162163
**kwargs: Additional kwargs passed to the :class:`~sagemaker.pytorch.model.PyTorchModel`
163164
constructor.
164165

src/sagemaker/rl/estimator.py

+1
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ def create_model(
199199
folders will be copied to SageMaker in the same folder where the
200200
entry_point is copied. If the ```source_dir``` points to S3,
201201
code will be uploaded and the S3 location will be used instead.
202+
This is not supported with "local code" in Local Mode.
202203
**kwargs: Additional kwargs passed to the :class:`~sagemaker.model.FrameworkModel`
203204
constructor.
204205

src/sagemaker/sklearn/estimator.py

+1
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ def create_model(
179179
dependencies (list[str]): A list of paths to directories (absolute or relative) with
180180
any additional libraries that will be exported to the container.
181181
If not specified, the dependencies from training are used.
182+
This is not supported with "local code" in Local Mode.
182183
**kwargs: Additional kwargs passed to the :class:`~sagemaker.sklearn.model.SKLearnModel`
183184
constructor.
184185

src/sagemaker/tensorflow/estimator.py

+1
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,7 @@ def create_model(
582582
If not specified and ``endpoint_type`` is 'tensorflow-serving', ``dependencies`` is
583583
set to ``None``.
584584
If ``endpoint_type`` is also ``None``, then the dependencies from training are used.
585+
This is not supported with "local code" in Local Mode.
585586
**kwargs: Additional kwargs passed to :class:`~sagemaker.tensorflow.serving.Model`
586587
and :class:`~sagemaker.tensorflow.model.TensorFlowModel` constructors.
587588

src/sagemaker/xgboost/estimator.py

+1
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ def create_model(
155155
dependencies (list[str]): A list of paths to directories (absolute or relative) with
156156
any additional libraries that will be exported to the container.
157157
If not specified, the dependencies from training are used.
158+
This is not supported with "local code" in Local Mode.
158159
**kwargs: Additional kwargs passed to the :class:`~sagemaker.xgboost.model.XGBoostModel`
159160
constructor.
160161

0 commit comments

Comments
 (0)