Marcello Politi

AI

Design Patterns with Python for Machine Learning Engineers: Template Method

Photo by Pawel Czerwinski on Unsplash Learn how to use the Template design pattern to enhance your code Marcello Politi · Follow Published in Towards Data Science · 4 min read · 12 hours ago — Introduction Recently I’ve been working on the domain-specific fine-tuning of several LLMs. The first and maybe the most important part of this task is to collect, scrape, and clean textual data to feed the LLM. I noticed that my

Read More »
AI

Level Up Your Coding Skills with Python Threading

Photo by Sonika Agarwal on Unsplash Learn how to use queues, daemon threads, and events in a Machine Learning project Marcello Politi · Follow Published in Towards Data Science · 7 min read · 10 hours ago — Introduction In most Machine Learning jobs, you won’t do research on improving some model architecture or designing a new loss function. Most of the time you must utilize what already exists and adapt it to your use

Read More »
AI

Leverage Python Inheritance in ML projects

Photo by Milad Fakurian on Unsplash Learn how to implement coding best practices to avoid tech debts Marcello Politi · Follow Published in Towards Data Science · 5 min read · 7 hours ago — Introduction Many people approaching machine learning don’t have a strong background in computer engineering, and when they need to work on a real product their code can be messy and difficult to manage. This is why I always strongly recommend

Read More »
AI

LLMOps — Serve a Llama-3 model with BentoML

Photo by Simon Wiedensohler on Unsplash Quickly set up LLM APIs with BentoML and Runpod Marcello Politi · Follow Published in Towards Data Science · 6 min read · 2 hours ago — Introduction I often see data scientists getting interested in the development of LLMs in terms of model architecture, training techniques or data collection. However, I have noticed that many times, outside the theoretical aspect, in many people have problems in serving these

Read More »
AI

MLOps — Data Validation with PyTest

Photo by Michael Dziedzic on Unsplash Run deterministic and non-deterministic tests to validate your dataset Marcello Politi · Follow Published in Towards Data Science · 9 min read · 7 hours ago — Introduction In an MLOps pipeline where we try to automate as many steps as possible, keeping in mind the goal of minimizing the number of errors that direct intervention by a programmer might cause, it is also important to take care of

Read More »
AI

Hyperparameters Tuning with MLflow and Hydra Sweeps

Photo by Leo_Visions on Unsplash Learn how to build an efficient pipeline with Hydra and MLflow Marcello Politi · Follow Published in Towards Data Science · 7 min read · 6 hours ago — Introduction When we develop Machine Learning models, we usually need to run lots of experiments to figure out which hyperparameter setting is best for a given algorithm. This can often lead to dirty code and losing track of which result…

Read More »