-
-
Notifications
You must be signed in to change notification settings - Fork 780
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scipy 1.12.0 #4499
Scipy 1.12.0 #4499
Conversation
0d739f3
to
57c5753
Compare
57c5753
to
34d00ce
Compare
Seems like there are genuine CI issues with Ping me when CI is green and I can give it a go in https://github.com/lesteve/scipy-tests-pyodide. In an ideal world by the way, https://github.com/lesteve/scipy-tests-pyodide would be inside Pyodide org or repo so scipy tests can be run more easily without me having to intervene. Let me know if you have suggestions on how to do this! |
Yeah we've had ongoing trouble with this one since it ends in |
I wonder whether we can set it up as an action to run only when scipy, numpy, openblas, or boost-cpp is touched. |
FYI I had a quick look running the scipy tests it seems like most of the new issues are due to
Seems reasonable, do you think that would fit more naturally in CircleCI or github actions (not super familiar with your CI setup)? FYI this is the way I have it set-up for now:
Maybe you already have 1. set-up and I can only think how to integrate 2. in Pyodide CI? Full disclosure I also test scikit-learn dev with Pyodide dev: |
Thanks for the ping @hoodmane. Let me know if there's anything we can do on the SciPy side to help make things easier for you. |
@steppi The main thing we're waiting on is for LFortran to compile all of scipy: |
@lesteve We don't currently build any packages in debug mode. I think it might be fine to just add your gha workflow as-is to a separate on:
push:
branches: [main]
paths:
- 'packages/libf2c/**'
- 'packages/numpy/**'
- 'packages/openblas/**'
- 'packages/boost-cpp/**'
- 'packages/scipy/**'
- 'packages/scikit-learn/**'
pull_request:
branches: [main]
paths:
- 'packages/libf2c/**'
- 'packages/numpy/**'
- 'packages/openblas/**'
- 'packages/boost-cpp/**'
- 'packages/scipy/**'
- 'packages/scikit-learn/**' |
@steppi I think one simple thing that would help is if you open issues on Pyodide or otherwise ping us on github when scipy makes a release. |
Cool. From the other side, we're also working on reducing SciPy's dependency on Fortran. There's a tracking issue of the progress so far, scipy/scipy#18566.
Sure thing, will do. As a heads up, the plan is for 1.13 to come out later this month, scipy/scipy#19880. It's an out-of-band release to support NumPy 2.0. |
By the way @steppi another problem for us is that scipy is pretty big and has many dynamic libs and we have to preload |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I have some minor comments, otherwise LGTM.
I recently read a blog post about Scipy using llvm-flang (https://labs.quansight.org/blog/building-scipy-with-flang) that tells the result was successful. So it would be an interesting experiment to try llvm-flang. |
There seems to be a new error in this PR, somehow the C++ exception is not raised as a Python exeption but creates a Pyodide fatal error. The same scipy test is passing in Pyodide latest console. import micropip
await micropip.install('scipy-tests')
import pytest
pytest.main(['--pyargs', 'scipy.stats.tests.test_distributions', '-k', 'issue_14606', '-v']) Stack-trace:
|
I read that blog too, but when I tried it out I found out that |
The last time that this was briefly discussed is maybe 4 years ago. There would be significant overhead in dealing with separate packages, and there are risks with new failure modes when only one scipy-xxx component gets updated inside an env ( The |
Thanks @rgommers. Also the benefits of splitting up scipy would be pretty low for anyone but us even if the different parts were pretty orthogonal, and Pyodide by itself probably doesn't justify such a large amount of work.
We also do this. Downloading + preloading the test suite would be pretty painful and unnecessary.
It's already helpful that you know which modules are rarely used, since we sure don't. I think we should likely do this when someone finds the energy since it will help everyone else using scipy to have a less heavy application.
The other comment is that the holy grail for us is wasm stack switching which would allow us to not do this really painful preloading. Though it would require the user to either:
so I think we'll still need some way to opt into the old auto preloading setup. And of course for browsers we have to wait until they stop requiring an experimental setting to enable it. In node it's pretty easy for people to pass the flag, so we might start considering stuff like this for node. Combined with the ability to mount site-packages from disk, it would enable using scipy without the enormous startup time. |
Oh, I didn't know that thanks. Looking at this discussion, it seems that the wasm backend is currently blocked due to lack of manpower, but regarding the design of LLVM, it shouldn't be too difficult to add a backend. I found that someone made a patched version of llvm that supports wasm backend that is used to build WASM R: https://github.com/r-wasm/flang-wasm. Maybe it is worth investigating. |
Sounds good. I'll try to find some time to figure out what a sensible split would be. Need to find my script to figure out what depends on what exactly - we don't keep track of that very well, and sometimes someone adds a new dependency between submodules by accident. |
Any news on when this might be merged? |
I think I should just go ahead with it. My concern is @lesteve keeps finding more regressions, but we don't really have the energy to deal with them... |
Thanks everyone! |
Should have added a changelog... |
cc @lesteve, @steppi