The GopherCon 2021 "Production AI with Go" workshop materials.

GopherCon 2021 "Production AI with Go" Workshop

Machine learning and artificial intelligence (ML/AI) applications are increasingly colliding with the systems that we maintain. These applications have a bunch of quirks that make them rather hard to scale, debug, and integrate. ML/AI applications are often written in Python, rely on a variety of large serialized assets (like model binaries), use specialized hardware (like GPUs), and exhibit behavior that is hard to predict. In this workshop, you will learn how to successfully integrate Go applications with common ML/AI components like TensorFlow and PyTorch to create an AI-enabled API for automated question answering. Along the way, you will learn how to appropriately test ML/AI components, collaborate with data science teams, and navigate the weird toolkit used by AI practitioners.

In addition to a general understanding of common ML/AI components and their integration with Go applications, you will learn about testing and monitoring methodologies for AI models, common AI inference server infrastructure, and best practices for running AI in production. You will leave the workshop having built a Go API that calls into a state-of-the-art AI model to enable automated question answering.

Note: This material has been designed to be taught in a classroom environment. The code is well commented but missing some of the contextual concepts and ideas that will be covered in class via slides, discussion, etc.

Agenda

  1. What is AI?
  2. What does it mean to run AI in production?
    1. Example 1 - Python notebook
  3. How can AI models be integrated into Go applications?
  4. Introduction to our example for the workshop
  5. Hands-on examples/ coding:
    1. Example 2 - Python model server (Flask)
    2. Example 3 - Python + Go, Testing
    3. Example 4 - Hosted Inference Service (Hugging Face Infernce API) + Go
    4. Example 5 - Importing Hugging Face models into Go
    5. Example 6 - AI in Go with spaGO
  6. Conclusions/ Q&A

Prerequisites

You do not need to be a Go or AI expert for this training and beginners are highly encouraged to attend. You do need some exposure to Go and must have at least gone through the Go Tour.

Recommended Preparation:

  • Install and configure an editor for Go.
  • Have a functioning Go environment installed with Go 1.16 or later.
  • Sign up for a GitHub account, if you do not already have one.
  • Computers should be capable of modern software development, such as access to install and run binaries, install a code editor, etc.
  • Though not completely necessary, having Docker installed, will also be useful.
Owner
Daniel Whitenack
Data scientist creating AI for good at SIL International. Co-host of the practical AI podcast.
Daniel Whitenack
Similar Resources

💯 Materials to help you rock your next coding interview

Tech Interview Handbook Credits: Illustration by @leftaligned Read on the website Black Lives Matter. Support the Equal Justice Initiative What is thi

Jan 4, 2023

This is the course materials for the Go Data Structures Crash Course!

Go Data Structures Course 👋 Welcome Gophers! This is the official repository that contains all of the data structures we cover in the Go Data Structu

May 10, 2022

A utility to generate SPDX-compliant Bill of Materials manifests

Kubernetes Template Project The Kubernetes Template Project is a template for starting new projects in the GitHub organizations owned by Kubernetes. A

Jan 1, 2023

CLI tool and library for generating a Software Bill of Materials from container images and filesystems

CLI tool and library for generating a Software Bill of Materials from container images and filesystems

A CLI tool and Go library for generating a Software Bill of Materials (SBOM) from container images and filesystems. Exceptional for vulnerability dete

Jan 6, 2023

Labs, solutions and related materials from the MIT 6.824 Distributed Systems course.

Labs, solutions and related materials from the MIT 6.824 Distributed Systems course.

MIT 6.824 Distributed Systems Labs, solutions and related materials from the MIT 6.824 Distributed Systems course. Overview From the official website:

Nov 5, 2022

vRealize RCE + Privesc (CVE-2021-21975, CVE-2021-21983, CVE-0DAY-?????)

vRealize RCE + Privesc (CVE-2021-21975, CVE-2021-21983, CVE-0DAY-?????)

REALITY_SMASHER vRealize RCE + Privesc (CVE-2021-21975, CVE-2021-21983, CVE-0DAY-?????) "As easy to stop as it is to comprehend." What is it? "Reality

Nov 9, 2022

Advent of Code 2021 https://adventofcode.com/2021

AOC 2021 How to use Not sure yet. Maybe cd into your day folder and go run, or maybe better to try go test Dev environment Open in VSCode, enable (Rem

Apr 22, 2022

A FreeSWITCH specific scanning and exploitation toolkit for CVE-2021-37624 and CVE-2021-41157.

PewSWITCH A FreeSWITCH specific scanning and exploitation toolkit for CVE-2021-37624 and CVE-2021-41157. Related blog: https://0xinfection.github.io/p

Nov 2, 2022

Poc-cve-2021-4034 - PoC for CVE-2021-4034 dubbed pwnkit

poc-cve-2021-4034 PoC for CVE-2021-4034 dubbed pwnkit Compile exploit.go go buil

Nov 9, 2022

CVE-2021-4034 - A Golang implementation of clubby789's implementation of CVE-2021-4034

CVE-2021-4034 January 25, 2022 | An00bRektn This is a golang implementation of C

Feb 3, 2022

This is a shopping basket workshop that shows how to use KrakenD API Gateway.

This is a shopping basket workshop that shows how to use KrakenD API Gateway.

Go Restful Microservices and KrakenD API Gateway Workshop This is a shopping basket workshop that shows how to use KrakenD API Gateway. Consist of 5 m

Jan 3, 2023

The Ultimate Workshop Track for #golang Developer

The Ultimate Workshop Track  for #golang Developer

layout title nav_order description permalink default An Ultimate GopherLabs Hands-on Labs 1 An Ultimate GopherLabs Hands-on Labs / Join GopherLabs Com

Dec 7, 2022

Workshop: Building data-intensive apps with SingleStore, Redpanda, and Golang

 Workshop: Building data-intensive apps with SingleStore, Redpanda, and Golang

This repo provides a starting point for building applications using SingleStore, Redpanda (by Vectorized), and the Go language. SingleStore is a scale-out relational database built for data-intensive workloads. Redpanda is a Kafka API compatible streaming platform for mission-critical workloads created by the team at Vectorized.

Nov 4, 2022

Example code for my Cadence Intro Workshop

Temporal Intro Workshop This repository contains example code for my Temporal Intro Workshop. Prerequisites Git, Make, etc. Make sure you have the lat

Dec 18, 2022

The source code for workshop Scalable architecture using Redis as backend database using Golang + Redis

The source code for workshop Scalable architecture using Redis as backend database using Golang + Redis

Sep 23, 2022

Infrastructure as Code Workshop

infrastructure-as-code-workshop Infrastructure as Code Workshop Run Pulumi projects Just cd into the pulumi-* folder and type pulumi up Run Terraform

Oct 21, 2022

A workshop run at the Australian National University

(Unofficial) ANU Golang Workshop A workshop run at the Australian National University, designed for second-year computer science students. This covers

Jan 4, 2022

Download items from the Steam Workshop into the desired folder. (w/GUI)

Download items from the Steam Workshop into the desired folder. (w/GUI)

WorkshopDownloader Download How does it work? When you input a URL

Nov 22, 2022

A fast tool to mass scan for a vulnerability on Microsoft Exchange Server that allows an attacker bypassing the authentication and impersonating as the admin (CVE-2021-26855).

A fast tool to mass scan for a vulnerability on Microsoft Exchange Server that allows an attacker bypassing the authentication and impersonating as the admin (CVE-2021-26855).

proxylogscan This tool to mass scan for a vulnerability on Microsoft Exchange Server that allows an attacker bypassing the authentication and imperson

Dec 26, 2022
The Ultimate Workshop Track for #golang Developer
The Ultimate Workshop Track  for #golang Developer

layout title nav_order description permalink default An Ultimate GopherLabs Hands-on Labs 1 An Ultimate GopherLabs Hands-on Labs / Join GopherLabs Com

Dec 7, 2022
Example code for my Cadence Intro Workshop

Temporal Intro Workshop This repository contains example code for my Temporal Intro Workshop. Prerequisites Git, Make, etc. Make sure you have the lat

Dec 18, 2022
A workshop run at the Australian National University

(Unofficial) ANU Golang Workshop A workshop run at the Australian National University, designed for second-year computer science students. This covers

Jan 4, 2022
Golang Clean Architecture based on Uncle Bob's Clean Architecture and Summer internship in 2021

clean-architecture-api Description This is an example of implemention of Clean Architecture in Golang projects. This project has 4 layer : Infrastruct

Feb 20, 2022
Explores GitHub Actions in Go Lab from GopherCon 2021

Gopher A Tweet An action that tweets. Gopher A Tweet was created based on GopherCon 2021s Gophers of Microsoft: GitHub Action in Go Lab to explore bui

Dec 10, 2021
"From Zero to Hero with Go and Dapr" presented at GopherCon 2021

From Zero to Hero with Go and Dapr Slides This is a Go application demonstrating the key features of Dapr with a few different approaches. My goal is

Dec 30, 2022
Bot para o discord escrito em Golang durante o workshop ministrado na Codecon 2021

Codecon Bot Bot para o discord escrito em Golang durante o workshop ministrado na Codecon 2021 Primeiramente no arquivo main.go coloque o TOKEN do bot

Oct 4, 2021
Govircon 2021 beginner's workshop: Pac Man from Scratch

Pac Man from Scratch Welcome to the Govircon 2021 beginner's workshop! In this course you will learn the basics of the Go programming language while b

Dec 7, 2021
Gophercon lab "Get Go-ing with GitHub Actions"

GitHub Action Using Go This is a starting point for a GitHub Action based in Go. This repo provides all the structure needed to build a robust GitHub

Dec 8, 2021
Training materials and labs for a "Getting Started" level course on COBOL

COBOL Programming Course This project is a set of training materials and labs for COBOL on z/OS. The following books are available within this reposit

Dec 30, 2022