Skip to content

Commit 382d86f

Browse files
authored
doc: add instructions for how to enable 'local code' for Local Mode (#1517)
1 parent c007f72 commit 382d86f

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

doc/overview.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,26 @@ You can install all necessary for this feature dependencies using pip:
732732

733733
pip install 'sagemaker[local]' --upgrade
734734

735+
If you want to keep everything local, and not use Amazon S3 either, you can enable "local code" in one of two ways:
736+
737+
- Create a file at ``~/.sagemaker/config.yaml`` that contains:
738+
739+
.. code:: yaml
740+
741+
local:
742+
local_code: true
743+
744+
- Create a ``LocalSession`` and configure it directly:
745+
746+
.. code:: python
747+
748+
from sagemaker.local import LocalSession
749+
750+
sagemaker_session = LocalSession()
751+
sagemaker_session.config = {'local': {'local_code': True}}
752+
753+
# pass sagemaker_session to your estimator or model
754+
735755
We can take the example in `Using Estimators <#using-estimators>`__ , and use either ``local`` or ``local_gpu`` as the instance type.
736756

737757
.. code:: python

0 commit comments

Comments
 (0)