How to build a model annotation tool with FastAPI, Quarto & Shiny for Python
Gordon Shotwell, Senior Software Engineer at Posit walks through an end-to-end machine learning workflow with Posit Team. This demo will give you a robust pattern for hosting and sharing models on Connect before you deploy them to a customer-facing system.
This includes
* How and why to use an API layer to serve and authenticate internal models
* Why you should wrap your APIs in Python packages
* Using Shiny for Python to build a data annotation app
* Using Quarto to retrain models on a schedule
Agenda:
11am - Quick introduction
11:02am - Demo
11:40am Q&A Session (https://youtube.com/live/zhN8IZUBCAg?feature=share)
Timestamps:
1:27 - Quick overview of text classification model used in this example
2:15 - Overview of the people that will need to use the model (modellers, leadership, data team, annotators, other systems)
4:11 - Why APIs before UIs is a good rule
5:57 - What about Python packages?
8:23 - Advantages to using an API here
9:18 - Big picture overview of the workflow
11:17 - FastAPI on Posit Connect (Swagger interface)
15:55 - The way this model will be used (authorization by validating user)
19:00 - Building a delightful user experience by wrapping API in a package
25:07 - Quarto report for leadership team showing model statistics & deploying to Connect
26:34 - Retraining the model by scheduling Quarto doc on Connect
28:37 - Shiny for Python app for Annotators (people checking if model is producing correct results & helping improve the model)
35:28 - Overview / summary of this machine learning workflow
Helpful links:
Github: https://github.com/gshotwell/connect-e2e-model
Anonymous questions: pos.it/demo-questions
If you want to book a call with our team to chat more about Posit products: pos.it/chat-with-us
Don't want to meet yet, but curious who else on your team is using Posit? pos.it/connect-us
Machine learning workflow with R: https://solutions.posit.co/gallery/bike_predict/
In this month’s Workflows with Posit Team session (Wednesday, November 29th at 11am ET) you will learn how to use Posit Connect as an end-to-end Python platform for hosting internal machine learning models. This will give you a robust pattern for hosting and sharing models on Connect before you deploy them to a customer-facing system.
This will include:
1. How and why to use an API layer to serve and authenticate internal models
2. Why you should wrap your APIs in Python packages
3. Using Shiny for Python to build a data annotation app
4. Using Quarto to retrain models on a schedule
During the event, we’ll be joined by Gordon Shotwell, Senior Software Engineer at Posit who will walk us through this end-to-end machine learning workflow with Posit Team.
No registration is required to attend - simply add it to your calendar using this link: pos.it/team-demo
Ps. We host these end-to-end workflow demos on the last Wednesday of every month. If you ever have ideas for topics or questions about them, leave a comment below :)
ps
Quarto
Shiny for Python
Shiny