EuroSciPy 2024

Free-threaded (aka nogil) CPython in the Scientific Python ecosystem : status and road ahead
2024-08-29 , Room 7

CPython 3.13 will be released in October 2024 and has been in beta since May 2024. One of its most awaited features is the possibility to remove the GIL (Global Interpreter Lock) through a compile-time flag.

In this talk we will explain the relevance of free-threaded CPython for the Scientific Python ecosystem, what already works, some of the caveats, and how to try it out on your favourite use case.

In particular we will discuss:
- the historic effort in the scikit-learn project to add Continuous Integration for the nogil fork of CPython 3.9, and the kind of issues that were surfaced
- the ongoing effort in the Scientific Python ecosystem (Numpy, Scipy, scikit-learn, etc ...) to test free-threaded CPython 3.13 and fix issues along the way
- how a typical scikit-learn grid-search use case can benefit from free-threaded CPython
- how to try out free-threaded CPython on your favourite use case
- possible future developments


CPython 3.13 will be released in October 2024 and has been in beta since May 2024. One of its most awaited features is the possibility to remove the GIL (Global Interpreter Lock) through a compile-time flag.

In this talk we will explain the relevance of free-threaded CPython for the Scientific Python ecosystem, what already works, some of the caveats, and how to try it out on your favourite use case.

In particular we will discuss:
- the historic effort in the scikit-learn project to add Continuous Integration for the nogil fork of CPython 3.9, and the kind of issues that were surfaced
- the ongoing effort in the Scientific Python ecosystem (Numpy, Scipy, scikit-learn, etc ...) to test free-threaded CPython 3.13 and fix issues along the way
- how a typical scikit-learn grid-search use case can benefit from free-threaded CPython
- how to try out free-threaded CPython on your favourite use case
- possible future developments


Abstract as a tweet

Free-threaded (aka nogil) CPython in the Scientific Python ecosystem : status and road ahead

Category [Machine and Deep Learning]

Other

Expected audience expertise: Domain

some

Expected audience expertise: Python

some

Public link to supporting material

https://lesteve.github.io/talks/2024-free-threaded-cpython-euroscipy/

Loïc has a Particle Physics background, which is how he discovered Python towards the end of his PhD.

He is a scikit-learn and joblib core contributor and has been involved in a number of Python open-source projects in the past 10 years, amongst which Pyodide, dask-jobqueue, sphinx-gallery and nilearn.