My foray from Scientific Python into the Pyodide / WebAssembly universe
2023-08-17 , HS 120

Pyodide is a Python distribution for the browser and Node.js based on WebAssembly / Emscripten.
Pyodide supports most commonly used scientific Python packages, like numpy, scipy, scikit-learn, matplotlib and there is growing interest to use it for improving package documentation through interactivity.

In this talk we will describe the work we have done in the past nine months to improve the state of Pyodide in a scientific Python context, namely:
- running the scikit-learn and scipy test suites with Node.js to get a view of what currently works, what does not, and what can be hopefully be fixed one day
- packaging OpenBLAS in Pyodide and use it for Pyodide scipy package to improve its stability, maintainability and performance
- adding JupyterLite functionality to sphinx-gallery, which is used for example galleries of popular scientific Python package like scikit-learn, matplotlib, scikit-image, etc ...
- adding the sphinx-gallery Jupyterlite functionality for scikit-learn example gallery

We will also mention some of the Pyodide sharp bits and conclude with some of the ideas we have to use it even more widely.


Pyodide is a Python distribution for the browser and Node.js based on WebAssembly. Pyodide supports most commonly used scientific Python packages, like numpy, scipy, scikit-learn, matplotlib and there is growing interest to use it for improving documentation through interactivity.

In this talk we will describe the work we have done in the past six months, including:
- regularly running the scikit-learn and scipy test suites with Node.js to get a view of what currently works, what does not, and what can be hopefully be fixed one day
- packaging OpenBLAS in Pyodide and use it for Pyodide scipy package to improve its stability and maintainability
- adding JupyterLite functionality to sphinx-gallery, which is used for example galleries of popular scientific Python package like scikit-learn, matplotlib, scikit-image, etc ...
- adding the sphinx-gallery Jupyterlite functionality for scikit-learn example gallery

We will also mention some of the Pyodide sharp bits and conclude with some of the ideas we have to use it even more widely.

Here are the references for the work mentioned above:
- running scipy and scikit-learn test suite inside Pyodide: https://github.com/lesteve/scipy-tests-pyodide and https://github.com/lesteve/scikit-learn-tests-pyodide
- OpenBLAS Pyodide PR: https://github.com/pyodide/pyodide/pull/3331
- sphinx-gallery JupyterLite-related PRs: https://github.com/pyodide/pyodide/pulls?q=is%3Apr+sort%3Aupdated-desc+author%3Alesteve
- scikit-learn JupyterLite examples PR: https://github.com/scikit-learn/scikit-learn/pull/25887


Expected audience expertise: Domain

none

Expected audience expertise: Python

some

Abstract as a tweet

My foray from Scientific Python into the Pyodide / WebAssembly universe

Category [Data Science and Visualization]

Other

Public link to supporting material

https://lesteve.github.io/talks/2023-foray-into-pyodide-euroscipy/

Loïc has a background in Particle Physics, which is how he discovered Python towards the end of his PhD. After a few year stint in an investment fund of writing mostly C++ and as much Python as possible,
he was lured back to an academic environment at Inria.

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.