Skip to content

MNIST with Petastorm on Sagemaker using Tensorflow Estimators

Notifications You must be signed in to change notification settings

TheClimateCorporation/peta-sage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

peta-sage

MNIST with Petastorm on Sagemaker using Tensorflow Estimators

  • input_pipeline.ipynb contains logic to download MNIST data locally and build a petastorm-compatible parquet file. Some code to verify the input & play around with batches and shards is included as well.
  • train.ipynb sets up sagemaker session and invokes training, once on a single instances and once on a cluster of 5 instances
  • model.py has all the Tensorflow Estimator boilerplate, include the actual DNN model

Code is based on

Sagemaker Docker Container with Sagemaker

In order to run this code in sagemaker, you need a docker container that has the appropriate petastorm libraries installed. This container can be built by following the instructions here to build and deploy your modified version of the containers. The only change necessary is to add the following into docker/{version}/Dockerfile.cpu|gpu right before the final statement.

RUN pip install petastorm
RUN pip install s3fs

About

MNIST with Petastorm on Sagemaker using Tensorflow Estimators

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published