https://github.com/data-science-on-aws/kubeflow
Go to AWS Console, select Sagemaker Serviceœ
Create notebook instance
Update notebook instance role
open Jupyter nootbook
open terminal and download tutorial dataset
cd ~/SageMaker
git clone https://github.com/data-science-on-aws/kubeflow.git
ls kubeflow/notebooks
Single node training with sagemaker
download dataset and upload it to S3
cd ~/SageMaker/kubeflow/notebooks/# Activate the TensorFlow conda environment
source activate tensorflow_p36# Download CIFAR10 dataset and convert it to TFRecords format
python generate_cifar10_tfrecords.py --data-dir datasetexport S3_BUCKET=sagemaker-$(aws configure get region)-$(aws sts get-caller-identity | jq -r '.Account')
echo "export S3_BUCKET=${S3_BUCKET}" | tee -a ~/.bash_profile# Create a new S3 bucket and upload the dataset to it.
aws s3 mb s3://${S3_BUCKET}aws s3 sync dataset/ s3://${S3_BUCKET}/cifar10-dataset/echo "Completed"
Go to S3 check dataset is on there
open single-instance.ipynb on sagemaker’s jupyter notebook
execute the notebook (training on notebook)
USING HOROVOD API FOR DISTRIBUTED TRAINING
update training script with Horovod API
Distributed Traininh With Amazon Sagemaker
execute the notebook (which will call sagemaker SDK to submit job)
Go to tensorBoard
S3_REGION=us-west-2 tensorboard --logdir s3://${S3_BUCKET}/tensorboard_logs/ # <== MAKE SURE YOU INCLUDE THE TRAILING `/`https://workshop.notebook.us-west-2.sagemaker.aws/proxy/6006/
take a look on S3 bucket