Pau Labarta Bajo Profile picture
Jul 7, 2023 โ€ข 10 tweets โ€ข 4 min read โ€ข Read on X
Wanna learn MLOps?

Stop reading blog posts.
Build a prediction service instead ๐Ÿš€

Here is a project you can build (for free) ๐Ÿ‘ฉ๐Ÿฝโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ปโ†“โ†“โ†“
Let's build a Machine Learning service to predict the Air Quality Index (AQI) in your city in the next 3 days, using a 100% serverless stack.

You will learn a lot, AND you will build something useful for society.

Win-win ๐Ÿ†๐Ÿ†

These are steps to build this โ†“
Step 1: Feature generation script ๐Ÿ

1 โ†’ fetches raw weather and pollutant data from an external API like

2 โ†’ computes features from this raw data (aka model inputs), and targets (aka model outputs)

3 โ†’ stores these features in the *Feature Store* https://t.co/72uTTBYnqFaqicn.org/city/barcelona
Step 2: Backfill historical (features, targets) โฎ๏ธ

To train a Machine Learning model later, you need enough historical data (features, targets) in your Feature Store.

Run the feature script for a range of past dates, to get enough training data.
Step 4: Model training script ๐Ÿ‹๏ธ

1 โ†’ fetches historical (features, targets) from the Feature Store.

2 โ†’ trains and evaluate the best ML model possible for this data, e.g. XGBoostRegressor.

3 โ†’ stores the trained model in the Model Registry.
Step 5: Automate execution of the feature script ๐Ÿ•ฐ๏ธ

Create a GitHub action to automatically run the feature script (from step 1) every hour.

GitHub actions are serverless computing power to run your code on a schedule. For free.

Beautiful.
Step 6: Create a web app to show model predictions ๐Ÿ‘จ๐Ÿฝโ€๐Ÿ’ป

Streamlit is a powerful Python library to develop and deploy web data apps.

Your app

1 โ†’ loads the model and features from the *Feature Store*,

2 โ†’ computes model predictions and shows them on a beautiful UI.

BOOM!
Bonus ๐ŸŽ

You can create another GitHub action to automate the model training script.

Why re-train the model? ๐Ÿค”

Because ML model performance decreases over time.
The best way to mitigate this is to regularly re-train the model, like once a week.
Wanna level up in ML/MLOps?

Join my e-mail list and get one article ๐—˜๐˜ƒ๐—ฒ๐—ฟ๐˜† ๐—ฆ๐—ฎ๐˜๐˜‚๐—ฟ๐—ฑ๐—ฎ๐˜† ๐—บ๐—ผ๐—ฟ๐—ป๐—ถ๐—ป๐—ด โ†“
datamachines.xyz/subscribe/
Every week I share real-world Data Science/Machine Learning content.

Follow me @paulabartabajo_ so you do not miss what's coming next.

Wanna help?
Like/Retweet the first tweet below to spread the wisdom โ†“โ†“โ†“

โ€ข โ€ข โ€ข

Missing some Tweet in this thread? You can try to force a refresh
ใ€€

Keep Current with Pau Labarta Bajo

Pau Labarta Bajo Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @paulabartabajo_

May 6
Crash course on Kubernetes for ML Engineers
Hands-on in 9 steps โ†“
Kubernetes is one of the hard skills you nonstop find in job descriptions for ML engineers.

Yet, it is one of the tools most ML engineers are scared of.

Let me help you be less scared of Kubernetes, by deploying your first Python app.
๐—ฆ๐˜๐—ฒ๐—ฝ ๐Ÿญ > Install the tools
> uv to create the project and manage Python dependencies.
โ†ณ github.com/astral-sh/uv
Read 19 tweets
Feb 22
Crash course on ๐—ž๐˜‚๐—ฏ๐—ฒ๐—ฟ๐—ป๐—ฒ๐˜๐—ฒ๐˜€ for ML Engineers
Hands-on in 9 steps โ†“
Kubernetes is one of the hard skills you nonstop find in job descriptions for ML engineers.

Yet, it is one of the tools most ML engineers are scared of.

Let me help you be less scared of Kubernetes, by deploying your first Python app.
๐—ฆ๐˜๐—ฒ๐—ฝ ๐Ÿญ > Install the tools
> uv to create the project and manage Python dependencies.
โ†ณ github.com/astral-sh/uv
Read 20 tweets
Jan 15
Wanna learn to ๐—ฏ๐˜‚๐—ถ๐—น๐—ฑ ๐— ๐—Ÿ ๐˜€๐˜†๐˜€๐˜๐—ฒ๐—บ๐˜€?

Here are ๐Ÿฏ ๐—ฟ๐—ฒ๐—ฎ๐—น-๐˜„๐—ผ๐—ฟ๐—น๐—ฑ ๐—ฒ๐˜…๐—ฎ๐—บ๐—ฝ๐—น๐—ฒ๐˜€ you can build TODAY ๐Ÿ‘ฉ๐Ÿฝโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ปโ†“
๐—ช๐—ต๐˜† ๐— ๐—Ÿ ๐˜€๐˜†๐˜€๐˜๐—ฒ๐—บ๐˜€ ๐—ฎ๐—ป๐—ฑ ๐—ป๐—ผ๐˜ ๐—ท๐˜‚๐˜€๐˜ ๐— ๐—Ÿ ๐—บ๐—ผ๐—ฑ๐—ฒ๐—น๐˜€?
Because ML models are not enough in real-world ML projects.
Until you don't put them to work, by building a

-> Feature pipeline
-> Training pipeline
-> Inference pipeline

they produce 0 business value.
๐——๐—ผ ๐˜†๐—ผ๐˜‚ ๐—ป๐—ฒ๐—ฒ๐—ฑ ๐—ฎ๐—ป ๐—ฒ๐˜…๐—ฎ๐—บ๐—ฝ๐—น๐—ฒ?

In this video I present 3 ML systems built by @KTHuniversity Master Students under the supervision of the great @jim_dowling
Read 5 tweets
Jan 5
ML Project Idea ๐Ÿ’ก

Let's predict air quality in Poland ๐Ÿ’จ๐Ÿ‡ต๐Ÿ‡ฑโ†“ Image
In this repository, you can find the complete source code of an ML app that

โ†’ predicts air quality (as measured by the PM10 metric) ๐Ÿ’จ
โ†’ in Poland ๐Ÿ‡ต๐Ÿ‡ฑ
โ†’ for the next 7๏ธโƒฃ days

Click on this link to see the code โ†“
github.com/erno98/ID2223/โ€ฆ
The project includes a hosted version of the final app in Streamlit Cloud.

Click on this link to see it in action โ†“
โ€ฆitystreamlit-app-p8sjf5.streamlit.app
Read 5 tweets
Jan 5
ML Project Idea ๐Ÿ’ก

Let's predict taxi demand in NYC in the next 60 minutes ๐Ÿš•โ†“ Image
Business problem ๐Ÿ’ผ

Let's create a predictive model to forecast the number of taxi rides that will happen in Manhattan (New York City)

- in the next hour
- for each taxi zone (e.g. Zone 113 "Lower Manhattan)

Let's do it in 6 steps โ†“ Image
Step 1. Fetch raw data

You can grab historical taxi rides from this public website โ†“
nyc.gov/site/tlc/aboutโ€ฆ
Read 10 tweets
Dec 16, 2024
ML Project Idea ๐Ÿ’ก

Let's predict air quality โ†“ Image
Here is a full example, with source code, to learn how to build a complete ML app that predicts air quality in different European cities.

Clone the code, modify it, and deploy it!
github.com/logicalclocks/โ€ฆ
โ†’ ๐—™๐—ผ๐—น๐—น๐—ผ๐˜„ ๐—บ๐—ฒ @paulabartabajo_ for more ML project ideas
โ†’ Image credits go to ๐Ÿ™instagram.com/photo.natadmay/
Read 4 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(