Understanding RAG III: Fusion Retrieval and Reranking

Understanding RAG III: Fusion Retrieval and RerankingImage by Editor | Midjourney & Canva Check out the previous articles in this series: Having previously introduced what is RAG, why it matters in the context of Large Language Models (LLMs), and what does a classic retriever-generator system for RAG look like, the third post in the “Understanding RAG” series examines an upgraded approach to building RAG systems: fusion retrieval. Before deep diving, it is worth briefly revisiting the basic RAG scheme we […]

Read more

Python Thread Safety: Using a Lock and Other Techniques

Python threading allows you to run parts of your code concurrently, making the code more efficient. However, when you introduce threading to your code without knowing about thread safety, you may run into issues such as race conditions. You solve these with tools like locks, semaphores, events, conditions, and barriers. By the end of this tutorial, you’ll be able to identify safety issues and prevent them by using the synchronization primitives in Python’s threading module to make your code thread-safe. […]

Read more

Quiz: Pydantic: Simplifying Data Validation in Python

Interactive Quiz ⋅ 9 QuestionsBy Martin Breuss Share In this quiz, you’ll test your understanding of Pydantic. Pydantic is a powerful data validation library for Python. You can also use a related library, pydantic-settings, for settings management. By working through this quiz, you’ll revisit how to work with data schemas with Pydantic’s BaseModel, write custom validators for complex use cases, validate function arguments with Pydantic’s @validate_call, and manage settings and configure applications with pydantic-settings. The quiz contains 9 questions and […]

Read more

Understanding Python’s Global Interpreter Lock (GIL)

The Python Global Interpreter Lock or GIL, in simple words, is a mutex (or a lock) that allows only one thread to hold the control of the Python interpreter. This means that only one thread can be in a state of execution at any point in time. The impact of the GIL isn’t visible to developers who execute single-threaded programs, but it can be a performance bottleneck in CPU-bound and multi-threaded code. Since the GIL allows only one thread to […]

Read more

A Practical Guide to Deploying Machine Learning Models

Image by AuthorA Practical Guide to Deploying Machine Learning Models As a data scientist, you probably know how to build machine learning models. But it’s only when you deploy the model that you get a useful machine learning solution. And if you’re looking to learn more about deploying machine learning models, this guide is for you. The steps involved in building and deploying ML models can typically be summed up like so: building the model, creating an API to serve […]

Read more

Quiz: Single and Double Underscores in Python Names

Interactive Quiz ⋅ 9 QuestionsBy Leodanis Pozo Ramos Share In this quiz, you’ll test your understanding of Single and Double Underscores in Python Names. By working through this quiz, you’ll revisit Python naming conventions that rely on using underscores (_), how to differentiate public and non-public names by using a single leading underscore, how to use double leading underscores to leverage name mangling in Python classes, and other common uses of underscores in Python names. The quiz contains 9 questions […]

Read more

Should you use uv’s managed Python in production?

The uv Python packaging tool provides fast replacements for tools like pip, and a variety of developer experience improvements. Unlike most Python packaging tools, uv doesn’t require Python to be installed to use it. Building on that ease of installation, one of its interesting and useful features is the ability to install Python for you. As a developer, this is great: if you need a version of Python you don’t have installed, uv can install it for you (transparently, by […]

Read more

Interpreting and Communicating Data Science Results

As data scientists, we often invest significant time and effort in data preparation, model development, and optimization. However, the true value of our work emerges when we can effectively interpret our findings and convey them to stakeholders. This process involves not only understanding the technical aspects of our models but also translating complex analyses into clear, impactful narratives. This guide explores the following three key areas of the data science workflow: Understanding Model Output Conducting Hypothesis Tests Crafting Data Narratives […]

Read more

7 Scikit-Learn Secrets You Probably Didn’t Know About

Image by Author | Ideogram7 Scikit-Learn Secrets You Probably Didn’t Know About As data scientists with Python programming skills, we use Scikit-Learn a lot. It’s a machine learning package usually taught to new users initially and can be used right through to production. However, much of what is being taught is basic implementation, and Scikit-Learn contains many secrets to improve our data workflow. This article will discuss seven secrets from Scikit-Learn you probably didn’t know. Without further ado, let’s get […]

Read more

Quiz: Getting Started With Async Features in Python

Interactive Quiz ⋅ 7 QuestionsBy Martin Breuss Share In this quiz, you’ll test your understanding of Asynchronous Programming in Python. By working through this quiz, you’ll revisit the concepts of synchronous and asynchronous programs, why you might want to write an asynchronous program, and how to use Python async features. The quiz contains 7 questions and there is no time limit. You’ll get 1 point for each correct answer. At the end of the quiz, you’ll receive a total score. […]

Read more
1 11 12 13 14 15 914