Pau Labarta Bajo Profile picture
Jul 31 โ€ข 7 tweets โ€ข 2 min read Twitter logo Read on Twitter
I used to waste hours trying to package my Python code...

... until I discovered this tool
Say hello to your new friend, ๐—ฃ๐—ผ๐—ฒ๐˜๐—ฟ๐˜† ๐Ÿ‘‹

Packaging your Python code for easy distribution and reproducibility has never been easier.

Here is how to do it in 4 steps
1๏ธโƒฃ ๐——๐—ผ๐˜„๐—ป๐—น๐—ผ๐—ฎ๐—ฑ ๐—ฎ๐—ป๐—ฑ ๐—ถ๐—ป๐˜€๐˜๐—ฎ๐—น๐—น ๐—ฃ๐—ผ๐—ฒ๐˜๐—ฟ๐˜†

$ curl -sSL | python3 -install.python-poetry.org
2๏ธโƒฃ ๐—–๐—ฟ๐—ฒ๐—ฎ๐˜๐—ฒ ๐˜†๐—ผ๐˜‚๐—ฟ ๐—ฝ๐—ฟ๐—ผ๐—ท๐—ฒ๐—ฐ๐˜ ๐˜€๐˜๐—ฟ๐˜‚๐—ฐ๐˜๐˜‚๐—ฟ๐—ฒ

$ poetry new hands-on-train-and-deploy-ml --name src
3๏ธโƒฃ ๐—œ๐—ป๐˜€๐˜๐—ฎ๐—น๐—น ๐˜†๐—ผ๐˜‚๐—ฟ ๐—น๐—ผ๐—ฐ๐—ฎ๐—น ๐—ฝ๐—ฎ๐—ฐ๐—ธ๐—ฎ๐—ด๐—ฒ ๐—ถ๐—ป ๐—ฒ๐—ฑ๐—ถ๐˜๐—ฎ๐—ฏ๐—น๐—ฒ ๐—บ๐—ผ๐—ฑ

$ poetry install
4๏ธโƒฃ ๐—ฆ๐˜๐—ฎ๐—ฟ๐˜ ๐—ฎ๐—ฑ๐—ฑ๐—ถ๐—ป๐—ด ๐—ฑ๐—ฒ๐—ฝ๐—ฒ๐—ป๐—ฑ๐—ฒ๐—ป๐—ฐ๐—ถ๐—ฒ๐˜€

$ poetry add pandas
Wanna get more real-world ML tips and tricks?
โ†’ 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_

Jul 31
How to solve Machine Learning problems in the real world

3 practical tips to make your ML life easier ๐Ÿงตโ†“
๐—–๐—ผ๐—ป๐˜๐—ฒ๐˜…๐˜

Online courses and Kaggle-style competitions are great resources to learn the fundamentals of ML.

However, the daily job of a machine learning engineer requires an ๐—ฎ๐—ฑ๐—ฑ๐—ถ๐˜๐—ถ๐—ผ๐—ป๐—ฎ๐—น ๐—น๐—ฎ๐˜†๐—ฒ๐—ฟ ๐—ผ๐—ณ ๐˜€๐—ธ๐—ถ๐—น๐—น๐˜€ that you wonโ€™t master there.
Here are the ๐˜๐—ผ๐—ฝ ๐Ÿฏ most recurring hidden problems I have faced in my ML life, and my tips for you to deal with them.
Read 18 tweets
Jul 27
What is ๐—บ๐—ผ๐—ฑ๐—ฒ๐—น ๐—ฟ๐—ฒ-๐˜๐—ฟ๐—ฎ๐—ถ๐—ป๐—ถ๐—ป๐—ด and how to implement it?

Hands-on, in 3 steps๐Ÿงตโ†“ Image
๐—ง๐—ต๐—ฒ ๐—ฝ๐—ฟ๐—ผ๐—ฏ๐—น๐—ฒ๐—บ

No matter how good your predictive Machine Learning model is today, it will eventually expire.

Why?

Because a predictive ML model is essentially a mapping between

โ†’ a set of features (aka inputs)
โ†’ a target (aka output) โ†’ what you want to predict
And the thing is, the relationship (aka correlation) between the features and the target can change a lot over time.

This is especially true in problems like recommender systems, or fraud detection.
Read 11 tweets
Jul 26
XGBoost is one of the most effective algorithms for time-series prediction.

But, you need to prepare your data carefully.

Here is a Python library to help you prepare your data โ†“
@joaopcnogueira, one of my students from the Real World ML Tutorial, has built ๐˜๐˜€๐Ÿฎ๐—บ๐—น a Python library that lets you transform

- a time series dataset, into
- a training dataset, with features and targets

Enjoy it

And give it. a star โญ on GitHub โ†“
github.com/joaopcnogueiraโ€ฆ
Wanna build your first real-world ML system?

Join the Real-World ML Tutorial + Community and get LIFETIME ACCESS to

โ†’ 3 hours of video lectures ๐ŸŽฌ
โ†’ Full source code ๐Ÿ‘จโ€๐Ÿ’ป
โ†’ Discord private community ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ฆ

Use code "NINJA" at checkout for a 20% discount

realworldmachinelearning.carrd.co
Read 4 tweets
Jul 26
3 reasons why your XGBoost model does not work

And 3 ways to solve them
โ†“โ†“โ†“ Image
1๏ธโƒฃ You are overfitting the training data

This is common in highly non-stationary problems, like cryptocurrency price prediction.

Solution. Use cross-validation and hyper-parameter tuning, to adjust the model's bias-variance and get good out-of-sample metrics.
2๏ธโƒฃ You miss an essential feature in your dataset

You need more/better features to increase the signal-to-noise ratio in your data.

Solution. Pull more raw features and generate better ones through feature engineering.
Read 5 tweets
Jul 25
Advice for ML beginners๐Ÿ’ก

GitHub actions are *free* computing that makes your life easier.

Here are 3 use cases for ML projects โ†“
โžก๏ธ Continuous Integration and Deployment (CI/CD)

Machine Learning is software engineering. As such, it is crucial you automate:

โ†’ code updates (aka integration), and
โ†’ code releases to your production environment (aka deployment)
โžก๏ธ Batch feature pipelines

This is a program that runs on a chron-like schedule, that fetches raw data from a data source (e.g. a data warehouse), computes ML features, and saves them to a storage service (e.g. a feature store).

Feature pipelines are present in every ML system.
Read 6 tweets
Jul 19
Wanna train more ML models for less money? ๐Ÿ’ธ

3 tips to optimize your ML budget ๐Ÿง โ†“
To build a Machine Learning product you need to spend money on 3 types of services:

โ†’ Computing, like CPUs and GPUs so you can train and deploy your models.
โ†’ Orchestration, to kick off the 3 pipelines of your system
โ†’ Storage, to save features, models, and experiment runs
And the thing is, not all these services cost you the same.

โ†’ Orchestration and storage are not expensive ๐Ÿ’ธ
โ†’ Computing, on the other hand, can get very expensive ๐Ÿ’ธ๐Ÿ’ธ๐Ÿ’ธ๐Ÿ’ธ๐Ÿ’ธ
Read 11 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 on Twitter!

:(