lesteve / scikit-learn-tests-pyodide

Run scikit-learn test suite inside Pyodide
3 stars 1 forks source link

Building from source for development #1

Closed thomasjpfan closed 1 year ago

thomasjpfan commented 2 years ago

Have you found good instructions to build scikit-learn from source? This way we can develop and fix some of the issues with WASM.

The closest I've seen to build instructions are the GitHub Actions in https://github.com/emscripten-forge/recipes, which includes a recipe for scikit-learn

lesteve commented 2 years ago

I am just seeing this now, not very good at following my github notifications ...

This repo is definitely a proof of concept for now, I have a synchronous session planned with @rth next Monday to ask him some of my newbie questions, and this is definitely something I can ask.

It seems like you can use pyodide build as mentioned in https://pyodide.org/en/stable/development/new-packages.html#building-python-wheels-out-of-tree but I have not tried it. This is what is currently done in https://github.com/numpy/numpy/pull/21895/files#diff-78a7bc1bdd4aae56dc69fba13e39ebb7e6e794ba5e7398020c0696f69f6758f8R48-R49

rth commented 2 years ago

@lesteve Can you add some default Github Actions setup on the main branch (doesn't matter what or if it's valid) just so it's enabled in the repo and would run on PRs here?

rth commented 2 years ago

Normally yes, pyodide build is the way to go to build a standalone wheel. I'll try once you have CI enabled.

lesteve commented 2 years ago

I pushed a commit with a skeleton workflow strongly inspired from the numpy PR. The CI is red but you said you did not care :wink: (amongst other things this should try to clone the scikit-learn/scikit-learn repo before building it)

rth commented 2 years ago

Thanks. Opened #2 with some updates to the CI and instructions for building the Emscripten/WASM wheel via pyodide which should also work locally on Linux.