AWS re:Invent 2021 — A first look at SageMaker Canvas
Tags: datavisualization, aws, machinelearning, enterprisetechnology
Published: 2021-12-03 08:10:43

---
title: AWS re:Invent 2021 — A first look at SageMaker Canvas
published: true
date: 2021-12-01 11:02:24 UTC
tags: datavisualization,aws,machinelearning,enterprisetechnology
canonical_url: https://julsimon.medium.com/aws-re-invent-2021-a-first-look-at-sagemaker-canvas-13de63aa82e5
---

### AWS re:Invent 2021 — A first look at SageMaker Canvas

Last night, AWS launched [SageMaker Canvas](https://docs.aws.amazon.com/sagemaker/latest/dg/canvas.html), “_a visual, no-code interface to build accurate machine learning models_”. Let’s have at it, then.

### Once upon a time…

Some of you may remember [Amazon Machine Learning](https://aws.amazon.com/blogs/aws/amazon-machine-learning-make-data-driven-decisions-at-scale/), AWS’ first attempt at no-code machine learning. Launched in April 2015, the service let users pull tabular data from S3 or Redshift, in order to train and deploy models on managed infrastructure. Supported task types included binary classification, multi-class classification and linear regression models.

I reviewed it in depth at the time ([part 1](http://blog.julien.org/2015/04/test-drive-aws-machine-learning-redshift.html), [part 2](http://blog.julien.org/2015/04/test-drive-real-time-prediction-with.html), [part 3](http://blog.julien.org/2015/04/test-drive-real-time-prediction-in-java.html)), and actually liked it. Unfortunately, almost everyone else disagreed. Adoption was awful, and the service was quietly [deprecated](https://forums.aws.amazon.com/thread.jspa?threadID=301990) in early 2019, a very rare event in AWS land. Why it failed is up for debate. Too simplistic for ML-savvy users, too fancy for business users, wrong timing, too expensive, etc. Oh well.

Licking their wounds, AWS went back to the drawing board, and launched [SageMaker](http://aws.amazon.com/sagemaker) in late 2017. Targeted at data scientists and ML engineers, this new service did arguably much better, thanks to a handy SDK that leverages managed infrastructure and powerful ML capabilities.

Of course, it was only a matter of time until the “ML for business users” discussion would pop up again. SageMaker Canvas, then.

### Unboxing SageMaker Canvas

You can access Canvas from the SageMaker Studio console, and launch it just like you would launch SageMaker Studio. After a few minutes of initial setup, the Canvas UI pops up.

We’re greeted by a short intro that introduces the Canvas workflow. +1 for usability.

![](https://cdn-images-1.medium.com/max/703/1*YPY05yDnmaIKEIRWivlbaA.png)

#### Selecting data

Basic users can upload files from:

- Their local machine, although this option was greyed out for me (“_Contact your administrator_”: huh?).
- An S3 bucket.

The documentation fails to list supported file types. Apparently, CSV is the only option for now. On the positive side, joins are supported using a drag and drop interface, without the need for any SQL code.

Alternatively, more advanced users are able to connect to a [Redshift](http://aws.amazon.com/redshift) or a [Snowflake](https://www.snowflake.com) database. They can then run their own SQL code to pull and join data.

Here, I’ll simply import the [Titanic survivor](https://www.kaggle.com/c/titanic) dataset from an S3 bucket. It only takes a couple of clicks.

![](https://cdn-images-1.medium.com/max/1024/1*g-3DEukZ_y0zA3R6AhmEbw.png)

#### Building a model

Creating a new model, I first select the dataset that I just imported.

![](https://cdn-images-1.medium.com/max/1024/1*nRzK7ZL5cZm_GgwcGiogDQ.png)

Next, I pick the column I’d like to predict (Survived).

![](https://cdn-images-1.medium.com/max/929/1*FHqXovUkfS2KIO_RNTezEw.png)

The model type is automatically inferred from the target column, which is fine. I could also set it myself if I wanted. Now, **why on earth would you say “2 category” instead of “binary classification”, “3+ category” instead of multi-class classification, or “number” instead of linear regression? This sounds weird (even a bit silly), and it will only confuse everyone**. Industry standard terms, please!

![](https://cdn-images-1.medium.com/max/632/1*CYYGLiPfL2p_ZHxSQhHOSw.png)
_No, no, no, hell no_

I also see basic statistics and visualizations on the dataset. Good stuff, although I’d have preferred to get them right after uploading the dataset, without having to create a model.

![](https://cdn-images-1.medium.com/max/1024/1*U_JWvXCXj3PS_OK36smFXQ.png)

Clicking on a column shows a summary.

![](https://cdn-images-1.medium.com/max/278/1*A0_jQOUoO3G53zHDpA-xFQ.png)

I could also untick columns that I don’t want to include for training. Keeping all columns, I click on “Quick Build” to… build a quick model, I guess. Training fails almost immediately, and I get the following error message:

![](https://cdn-images-1.medium.com/max/500/1*9pjxN-RgpMjuyK4hdoX4sg.png)
_Spoiler: the 'Cabin' column is responsible. It’s 77.1% empty_

This is likely to frustrate and confuse your average business user:

- SHAP values? Whatever they are, I wasn’t told about them earlier.
- If my dataset has too many missing values, why wasn’t I told earlier? The offending column(s) should have been highlighted at the basic stats stage.
- If SHAP values can’t be computed, why not proceed without them and add a mention in the model summary?

Deleting the failed model (why can’t I retry right away?), I create a new one, select the dataset, and unselect the offending column.

![](https://cdn-images-1.medium.com/max/1024/1*WTASHrMQ1V9z6Wnwdq9riQ.png)

Then, I run a quick build again.

![](https://cdn-images-1.medium.com/max/852/1*sMkPyQ6mDql3vXd5NeCcJQ.png)

#### Analyzing results

Results are available after a couple of minutes. This is way too fast for a regular SageMaker job. I’m guessing this ran in place, similar to the “[Quick Model](https://docs.aws.amazon.com/sagemaker/latest/dg/data-wrangler-analyses.html)” feature in SageMaker Data Wrangler.

Model accuracy is not great, but it’s high enough to justify launching a full training later on. Feature importance (aka “column impact”) is nicely graphed using box plots and scatter plots, although I’m missing zooming capabilities.

![](https://cdn-images-1.medium.com/max/1024/1*gR-HZdF3Bt4PCQSlXBb1zA.png)

I also get a fancy representation of the confusion matrix.

![](https://cdn-images-1.medium.com/max/1024/1*Nqz6xUD1_YJWhO1XbPwotA.png)

… as well proper ML metrics.

![](https://cdn-images-1.medium.com/max/1024/1*-Y2Z4Y2YuwK9Ohq891NX2w.png)

Creating another model (why can’t I reuse the quick build?), I launch a full training job which runs for a few hours ([SageMaker AutoPilot](https://docs.aws.amazon.com/sagemaker/latest/dg/autopilot-automate-model-development.html) \*\*cough cough\*\*).

Metrics are significantly better.

![](https://cdn-images-1.medium.com/max/1024/1*suPU7nwAS5x5FaZ0yl8Beg.png)

Apparently, I could [share](https://docs.aws.amazon.com/sagemaker/latest/dg/canvas-collaborate.html) the model in SageMaker Studio. The feature didn’t work for me.

![](https://cdn-images-1.medium.com/max/457/1*pPIPMfDZH7HyHpqc0zaoNQ.png)

#### Generating predictions

I can use my model to predict new data, either in batch mode or in single prediction mode. For simplicity, I’ll use the training set.

First, I launch batch prediction in a couple of clicks.

![](https://cdn-images-1.medium.com/max/688/1*XKHj90lQ2tGe-KxLwp5KTg.png)

After a few seconds, results are available, and I can download them to a CSV file.

![](https://cdn-images-1.medium.com/max/1006/1*6TT_pxJrhsMFZrpVkFb7mA.png)

Predictions are archived for future use. I was unable to delete them, as the button was greyed out.

![](https://cdn-images-1.medium.com/max/549/1*imaYf8iHhavHv4ev7zz7sw.png)

I also couldn’t test single predictions. Hmm.

![](https://cdn-images-1.medium.com/max/457/1*ezzfCmgSOY9jRF1bh4NM3Q.png)

### Summing things up

So what do I think of Canvas? Here goes nothing.

#### The good

- **SageMaker Canvas does what it says on the tin** : zero-code ML for the most popular ML problems in the enterprise (classification, regression and time-series).
- **The UI is reasonably clear and friendly** , although I’d like to be able to resize panels (a long lasting plague of many AWS consoles), and to zoom on visualizations.
- **I would expect Canvas jobs to be as accurate as code-based jobs**. Indeed, it’s safe to assume that model training is based on SageMaker AutoPilot and [Forecast](https://docs.aws.amazon.com/sagemaker/latest/dg/canvas-set-up-forecast.html), which support built-in feature engineering, model tuning, etc.
- **Batch predicting with Canvas models is simple enough** , without having to deal with any inference-time muck (the one thing I dislike the most about SageMaker in general).

#### The bad

- **Canvas only supports tabular data** (categorical, numeric, text, datetime), and input file formats seem to be limited to uncompressed CSV (we won’t know for sure until the [doc](https://docs.aws.amazon.com/sagemaker/latest/dg/canvas-importing-data.html) actually says something useful). Users with slightly more complex data will have to deal with data preparation, and…
- **Canvas is not integrated with data preparation tools**. If you have a pristine CSV file, lucky you. What if you need to transform it or clean it a bit? UI integration with [SageMaker Data Wrangler](https://docs.aws.amazon.com/sagemaker/latest/dg/data-wrangler.html) or [Glue Data Brew](https://docs.aws.amazon.com/databrew/latest/dg/what-is.html) would go a long way in building a seamless experience.
- **Prediction cannot be automated**. Imagine that I need to predict a new CSV file every day. Do I need to manually upload it to S3 and use the Canvas console to predict it? Is there a path to automation? Maybe that’s the model sharing capability in Studio, but I couldn’t test it.
- **Canvas looks** [**expensive**](https://aws.amazon.com/sagemaker/canvas/pricing/). $1.9 per hour for the console? $30 for a one-million cell training job? I could train the same dataset (50K rows with 20 features) on an ml.m5.large spot instance for a **fraction** of that, and write 50 lines of Python to automate it for my business users… Am I missing something here?

#### The ugly

I know all too well how the pressure of lauching services at re:Invent, but…

- **Documentation is as minimal as it could be**.
- **Too many features are broken at launch.**

Is Canvas an interesting step forward that will accelerate ML adoption for business users? Or is it too little too late, and the new Amazon Machine Learning?

I’m cautiously leaning towards the former, but it’s a bit early to tell.