Fixing Mixed-Content and CORS issues at ML Model inference time with Azure Functions

This is a follow-up from the previous post on deploying an ONNX model using Azure Functions. Suppose you’ve got the API working great and youwant to include this amazing functionality on a brand new website. What follows is the harrowing path through failure we all must take to eventually reach the glorious end: an AI that understands tacos an burritos like I do. Mixed Content Issues As soon as you deploy your site and bask in its new found glory you might run into something like this when you make the API call from JavaScript:
Read more →

Troubleshooting an ONNX Model deployment to Azure Functions

Building awesome machine learning models can be an onerous task. Once all the blood, sweat and tears have been expended creating this magical (and ethical) model sometimes it feels like getting the thing deployed will require severing another limb in the name of releasing software. This post is designed to help you, dear reader, manage the land mines surrounding this complicated task and hopefully make this part of the development cycle painless.

Here’s the rundown:

  1. I made a machine learning model in PyTorch that classifies tacos vs burrito images
  2. I exported the model to ONNX
  3. I want to deploy inferencing code to Azure Functions using Python
  4. I’ve been able to get the function running locally (this can be its own post but I thought the docs were excellent).

What follows is my journey getting this to work (with screenshots to boot). Let’s dig in!

Read more →

Making Use of Unstructured Data with Form Recognizer

Every business has their “junk” drawer (or the “share” as Bill/Karen likes to call it). Often hidden in this data wasteland are nuggets of informational gold that could revolutionize the way you do business (we hope). Turns out that the most important information is usually hidden in paper forms (by paper I mean digital paper like an image or pdf file). Microsoft recently released a new service (just released - blog) called Form Recognizer designed to make short work of the structured data hidden in these gems. I shall endeavor to take you through the simple process here!
Read more →

3 Tips for Debugging Cloud Scale Machine Learning Workloads

Let’s say you built an amazingly wonderful hand-crafted artisanal convolutional neural network that works beautifully on your hard-drive based dataset. You are now ready to take this masterpiece to the cloud to work on a much larger dataset on beefier machines - you are not looking forward to it.

  • “How do I ship this patchwork conda (or venv) where I’ve installed everything the training/inference code needed AS WELL AS everything else I thought I needed along the way?”
  • “I don’t want to waste cloud compute money on things I’m not sure will work on the first try!!”
  • Basically, “I have already done the work and I’m not interested in the yak shaving portion of the job!”

No need to fear, dear reader, this article is designed to help you move your glorious work to the cloud (and beyond) by leveraging your local environment as if it were the cloud itself.

Read more →

Talking about Technology

.NET Foundation

Making software is hard. Every once in a while we find some code that really helps the process. It makes our own code intelligible: almost fun! Sometimes the magical code is of our own making but often we are using someone else’s code. In either case the next step should be to share the joy.

My preferred mechanism to share the joy is through videos. Videos are a powerful way of humanizing the types of problems software solves. With video, you can get in the thick of it code-wise while still adding a literal face. You can see the excitement, the technology, and most importantly: the code.

Read more →