PipelineAi Workshop — Sagemaker

abehsu
ㄚ北的所見所聞
3 min readFeb 22, 2020

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 dataset
export 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

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

--

--

abehsu
ㄚ北的所見所聞

喜歡探索不同領域的人事物,喜歡將自己學習到的也分享給大家,並產生共同的討論,從中得到回饋。 Linkedln(https://www.linkedin.com/in/hsuyuming/)