Separate tests into their own package#184
Conversation
|
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( |
|
@xhochy, is there a way to avoid the full rebuild for the tests? Could we not make a top-level script that runs only once and copies then copy the right files from build folder as needed? With the current approach, we're doubling CI time, which is a no-go on drone, and potentially critical on stuff like cross-compiling PPC. |
f8fcd26 to
b89991e
Compare
|
@xhochy For the scipy output, everything that's happening boils down to |
|
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( |
3a0e39e to
95def9c
Compare
|
@xhochy @rgommers Windows is harder to do with the distutils build (no good separation into build & installation steps, so have to do a full recompilation twice; this then fails for reasons that elude me currently, perhaps due to not cleaning up some build artefacts from the previous run correctly; any insights there would be appreciated). In any case, it should drastically reduce the default download size, so should be a nice win and is probably worth doing even if it's unix-only for now. |
| {% set tests_to_skip = tests_to_skip + " or test_minimize_callback_copies_array[fmin]" %} # [pypy_emu] | ||
| {% set tests_to_skip = tests_to_skip + " or test_mip1 or test_mixed_threads_processes" %} # [pypy_emu] | ||
| {% set tests_to_skip = tests_to_skip + " or test_modules_importable or test_neldermead_limit" %} # [pypy_emu] | ||
| {% set tests_to_skip = tests_to_skip + " or test_random_exact or test_random_complex_exact" %} # [pypy_emu] |
There was a problem hiding this comment.
Some of these shouldn't be running I think because of the set label = "'fast'" logic a few lines below. For the ones that are actually needed, how about we upstream the skips?
There was a problem hiding this comment.
All these are current (as in: running even with label='fast'). I updated them recently in #227
rgommers
left a comment
There was a problem hiding this comment.
These test files aren't being deleted yet with the pattern being */tests/*, that'd be another 800 kb or so.
_lib/_test_ccallback.cpython-39-darwin.so
_lib/_test_deprecation_call.cpython-39-darwin.so
_lib/_test_deprecation_def.cpython-39-darwin.so
integrate/_test_multivariate.cpython-39-darwin.so
integrate/_test_odeint_banded.cpython-39-darwin.so
io/_test_fortran.cpython-39-darwin.so
ndimage/_ctest.cpython-39-darwin.so
ndimage/_cytest.cpython-39-darwin.so
special/_test_internal.cpython-39-darwin.so
It'd be great to summarize the final gain here (total size with/without); it'll justify doing this and maybe in the future doing this for SciPy itself or rearranging the folder layout so it's much easier to do.
+1 for not doing this on Windows right now, doubling the build time isn't worth it and once we get rid of distutils it'll be easy to do.
This does still require a patch to ensure that scipy.test() or pytest --pyargs scipy clearly tells the user to install scipy-tests.
I don't see the current footprint but it'd show up once it's on https://anaconda.org/conda-forge/scipy/files. I'll update with a summary afterwards.
For now, I think I'll take the win of removing the test folders with a simple procedure. We can fine-tune afterwards IMO.
On windows I actually don't mind the doubled built time. We have long-running jobs for the emulated test suites on aarch/ppc anyway that run way longer than a twice compiled build on windows. But I don't know why it's failing to compile the second time (with identical build script & host deps), and if it becomes too vexing I might give up. 🤷
Fair enough. |
While I have an idea of how to patch Pytest has quite an array of hooks, but I'm not even sure if any of scipy's code will run if invoked with |
How about simply writing a file |
I didn't think of that because I was aiming to not get to the test collection stage, but I doubt that's possible. So I think that's a pretty good idea because, not least because it solves both cases at once, and because we don't even have to patch it in, we can just copy it from |
a7a8a67 to
b5bb2ce
Compare
122c4b7 to
4f82945
Compare
|
So this comes with a few extra bells & whistles now 🙃
Both of these are done and tested now. Also I've figured out windows (recompilation is not elegant, but better than not having the separation; I'll switch away from that as soon as we have meson builds on windows). We can still upstream part of the pypy-in-emulation skips, but it's quite specific to that combination. For example, the slowest pypy tests on native hardware take ~120sec, the slowest cpython test in emulation take ~360sec, but for pypy-in-emulation, many tests will blow through our 1200sec timeout. Accurately representing that sounds like a hassle, but if we don't mind marking a couple tests as non- In any case, this PR should be on home stretch now. |
|
Great! Happy to take a final look when it's ready.
Any of those timings are super slow; marking things as |
It is, that's what I meant by home stretch. :)
I'll have a look at adding some markers. For context, I gave the numbers for the very longest running tests (according to the logs), not all of them take ~120sec without emulation, just 1-2. |
ce45bc7 to
7d33ccf
Compare
…nda-forge-pinning 2023.05.06.13.08.41
5c8937b to
882b474
Compare
yes, we're talking about windows
674f47e to
37ba522
Compare
OK, I rebased this after #234 and managed to (hopefully finally) beat those intermittent errors on windows. |
rgommers
left a comment
There was a problem hiding this comment.
Two timeouts for PyPy on aarch64 it looks like.
This LGTM in principle. It'd be great if someone else could review too though, I can't really judge the .bat file changes or whether this is all according to conda-forge best practices. From the "how the scipy package behaves" point of view it seems good to go.
Not even a normal 6h timeout, but two workers that stopped responding. Haven't had that one in a long time, just my luck that they appear when I declare things ready. 😅 In any case, I restarted and it shouldn't be an issue |
xhochy
left a comment
There was a problem hiding this comment.
Looking good! Thanks @h-vetinari for bringing this here.
|
Seems we managed to drop about 6MB out of 19-20MB previously. Slightly less than hoped for, but better than nothing I'd say! |
|
Great, thanks. I sent an FYI to the scipy-dev mailing list |
Continuing @xhochy's work from #175,
lightly edited.Fixes #160
Closes #175