Note: You can view this tutorial as a video on youtube.
How does a machine learning engineer make their model results accessible to end-users via the web? This once-daunting task is now pretty straightforward using a combination of AWS services, especially SageMaker and Lambda.
Amazon SageMaker is a powerful tool for machine learning: it provides an impressive stable of built-in algorithms, a user interface powered by jupyter notebooks, and the flexibility of rapidly training and deploying ML models on a massive range of AWS EC2 compute instances. But even the most accurate model provides no benefit if it’s inaccessible to other people! Our end-users can’t log into our SageMaker instance and run our notebooks, so it’s important to connect our finished model to a web-facing application. In this way, potential clients can benefit from the accuracy of our model’s predictions. …
This walk-through is designed to help newcomers become familiar with using an AWS Lambda function in combination with an S3 bucket and IAM roles. The walk-through assumes you already have an AWS account and some familiarity with AWS services and the console. All of the information in this post was recycled from the work of previous authors, and full credit goes to them.
I’m particularly indebted to the blog post by Nidhin kumar, and I reuse all of his work in this post. …
In a previous blog post I talked about how you can use AWS S3 to host a static website. While that approach is efficient and cost-effective, it doesn’t allow you to protect your website with a username and password. In the post, we’ll talk about how to add CloudFront and a Lambda function to your S3 website in order to provide greater security.
Fire up the AWS Console. Make sure that you’re in the Northern Virginia region, as that’s the only region that currently supports Lambda@Edge. …
Amazon S3 is an inexpensive and powerful way to host a static website — no web server required! S3 provides high availability so you don’t have to worry about automatic scaling or unexpected spikes in user demand. It also provides virtually unlimited storage.
Start off by cloning this github repository to a folder on your laptop. It’s a bare-bones webpage example. Then update
index.html and other files as you like. https://github.com/austinlasseter/simple-website
Once you’re happy with the way your simple website looks, upload all the contents of your folder to an S3 bucket. …
This is a step-by-step guide to deploying your first Python app. It’s intended for a complete beginner.
Start out on github — a development platform for sharing and developing code. After signing up for a free github account, fork my repo — it will have all the files you need to get started. It’s easy: at the top right, click on the
fork button (note that in the screenshot it’s greyed out for me because I can’t fork my own repo):
After a brief wait, you should now see the same repo but under your own name, not mine. While github makes sure to provide a reference to the source author of forked code, this is now yours to play with and develop as you please! …
In a new folder on your laptop, create a virtual environment:
Activate the virtual environment (on a Mac):
Activate the virtual environment (this is for Windows):
Install plotly dash in your virtual environment:
pip install dash
Create a text file called
requirements.txt with a list of programs required by your virtual environment, as follows:
pip freeze > requirements.txt
Create a python program called
application.py with the following Dash code. Note that two items in here —
application = app.server and
application.run(port=8080) are specific to AWS Elastic Beanstalk. …
I recently started building dashboard for my python programs using the Dash framework by Plotly. Here are the steps I took to deploy a simple dashboard on AWS Elastic Beanstalk. Full credit to previous authors whose excellent work led me to this point:
What’s even more fun than riding a BikeShare bike down the Mall on a sunny afternoon? Analyzing the data about BikeShare bikes! It’s available to the public and easy to get, and BikeShare actively encourages the curious to look kick the tires and under the hood (er, basket) of their data: ergo, the existence of Bikeshare Hack Night, which combines the panache of data science with the dernier cri of The Black Cat.
We looked at data from the 4th quarter of 2017. Here’s what we found:
How long were most bike trips?
The challenges of using primary data collection for evaluation purposes
Grant-making foundations in the educational sector require timely, high-quality evaluation of the academic programs they invest in (Morariu et al. 2016). Foundations cannot expect real improvement without data about the success or failure of their funded programs (Gamoran 2016). Furthermore, without real-time evaluation results, foundations cannot make the necessary course corrections within required timeframes. Evaluation results must be actionable, reliably identifying significant and meaningful differences between program participants and non-participants such that funders and program staff can adjust accordingly. For all these reasons, decision-making staff from major foundations require meaningful and useful information from evaluations of funded programs, according to a recent survey (The Center for Effective Philanthropy & the Center for Evaluation Innovation 2016). Yet almost two-thirds of the same survey respondents said their foundations fund evaluations for less than 10 percent of individual grantees. Clearly, then, there is a disconnect between foundations’ need for timely, high-quality evaluations and their ability to obtain them. …
Ever wanted to display just a simple map of your Pandas data, but weren’t sure how? Me too. I quickly found that there are lots of instructions about how to generate complex, sophisticated maps — but I just needed a quick step-by-step, for a complete beginner with a simple Pandas dataframe. I’ll walk you through how I did it.
My dataset was a simple list of the 50 States with SAT participation rates from 2017. I wanted to create a map of the USA, with colored shading to distinguish high-participation states from low-participation states. I read the dataset into Pandas using
pd.read_csv. Like any good data science student, I did a google search and found that there are lots of options for creating maps from a Pandas dataframe. …