If I am not using the notebook on AWS but instead just the Sagemaker CLI and want to train a model, can I specify a local path to read from and write to?
1
votes
2 Answers
4
votes
If you use local mode with the SageMaker Python SDK, you can train using local data:
from sagemaker.mxnet import MXNet
mxnet_estimator = MXNet('train.py',
train_instance_type='local',
train_instance_count=1)
mxnet_estimator.fit('file:///tmp/my_training_data')
However, this only works if you are training a model locally, not on SageMaker. If you want to train on SageMaker, then yes, you do need to use S3.
For more about local mode: https://github.com/aws/sagemaker-python-sdk#local-mode