Skip to content

aletheia/mnist_pl_sagemaker

Repository files navigation

Neural Networks on Amazon SageMaker with PyTorch Lightning

made-with-python Open Source Love svg2 GitHub license GitHub issues GitHub pull-requests saythanks

This is an example project showing how you could use Amazon SageMaker with Pytorch Lightning, from getting started to model training. A detailed discussion about SageMaker and PyTorch Lightning can be found in the article Neural Network on Amazon SageMaker with PyTorch Lightning.

PyTorch Lightning

The super cool Pytorch Lightning Framework to simplify machine learning model development.

Pytorch Lightning (PL) offers support to a wide number of advanced functions to ML researchers developing models. It is also useful when managing multiple projects because imposes a defined structure:

Image

Amazon SageMaker

Amazon SageMaker offers suport to model training and instance management through a number of features exposed to developers and researched. One of the most interesting feature is its capability of managing GPU instances on your behalf, through Python CLI:

Image

Running this code

The conde contained in this repo can be run either using SageMaker Notebook Instances and from a standard Python project. I personally prefer the latter approach because it does not require any Jupyter Notebook instance to be set up and configured and has the improved capability to create computation resources when they are needed and destroy them after usage, in a Serverless compliant way.

Run on SageMaker

To run this project on Amazon SageMaker, please spin up your Amazon SageMaker Notebook, attach a github repository, then run notebook/sagemaker_deploy.ipynb

Run using Python

To run the project using Python Sagemaker run

Credits

This project uses SageMaker Execution Role creation script by Márcio Dos Santos

License

This project is released under MIT license. Feel free to download, change and distribute the code published here.

About

MNIST classifier implementation with PyTorch Lightning on Amazon SageMaker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published