ENH: Pixi package definitions for downstream development#30381
ENH: Pixi package definitions for downstream development#30381seberg merged 7 commits intonumpy:mainfrom
Conversation
lucascolley
left a comment
There was a problem hiding this comment.
Currently separate manifests in different directories are required. This might change in the future pending prefix-dev/pixi#2813.
|
@ngoldbaum perhaps you would be interested in making a TSan version based on what I have here? I suppose to test that this is understandable and maintainable. |
|
@lucascolley, could we extend this to |
|
yes, go for it! I only have an osx-arm64 machine right now (although not really an excuse for linux with docker...) but will have access to a linux and a windows box next week. Feel free to beat me to it |
Sure, is there a CPython recipe I should be using? How do I use this recipe with the CPython recipe? Maybe it'd help to have a README in the new pixi_packages folder that explains to luddites like me how to use the recipes to do useful development tasks. |
|
I'm figuring out the details for CPython now, will let you know when ready. |
2d36b2b to
9f05918
Compare
|
This will need a release note. |
I pushed osx-arm64 recipes for default and ASan CPython at lucascolley/cpython@375594b. I have updated this PR so that the NumPy ASan package builds against the CPython ASan package. Hopefully it is clear how one would go about adding another build type like TSan:
Development tasks on which repo? For NumPy, we should probably wait until something like https://github.com/scipy/scipy/blob/main/pixi.toml exists, but they could also be added to an out-of-tree workspace like https://github.com/rgommers/pixi-dev-scipystack/blob/main/numpy/pixi.toml. For SciPy, we should add some docs, yes, and it would probably be sufficient for a README here to link to those docs? |
Sounds reasonable to me. Thanks so much for working on this. I was hoping you would when you shared all this stuff earlier this year when it was beta. |
|
my pleasure — it has been super cool to work across both the development and user side of this! |
|
@FFY00 what information would be good to include on the CPython issue? |
|
|
@FFY00 I went ahead and added linux-64 support at lucascolley/cpython@54274f2, lucascolley@aa50cf4, and scipy/scipy@1d87a86. Tests now running at https://github.com/scipy/scipy/actions/runs/20012600510/job/57384436353. |
|
Sorry for the delay getting back to you. Thank you so much for all this work, it is extremely helpful!
I opened an issue at python/cpython#142466. Feel free to send a PR whenever you are ready! |
🎉🎉 Would you have time to address Hugo's comment at python/cpython#142469 (comment) @FFY00 ? I am running out of the ability to justify procrastinating my spare time away on this to myself 😅 . |
|
Done. Could you just confirm the |
|
replied at python/cpython#142469 (comment) |
|
All good in CPython, I'll probably merge it on the weekend, or start of next week. Congrats @lucascolley! |
Yeah that's fine I've never tried to do this exercise with sanitizers on Windows and am not aware of anyone else doing that |
f9f7b0a to
c029904
Compare
|
I added a README and a simple CI job which invokes I also added a release note. |
| - name: Build | ||
| run: pixi build --path="pixi-packages/${{ matrix.package_variant }}" |
There was a problem hiding this comment.
do we want to add anything further to the CI job? Perhaps a sanity check that Python and NumPy at least import?
Not sure how much work that would be, maybe pixi install can help avoid too much extra boilerplate?
There was a problem hiding this comment.
See my comment - 'python -c 'import numpy'` produces hundreds of pages of output worth of memory leaks, and exits with code 1.
|
CI failures look unrelated |
|
I'm testing asan on my Linux box: [workspace]
channels = ["conda-forge"]
name = "cpython-pixi-test"
platforms = ["linux-64"]
preview = ["pixi-build"]
[dependencies]
python = { git = "https://github.com/python/cpython", subdirectory = "Tools/pixi-packages/asan" }
numpy = { git = "https://github.com/lucascolley/numpy", rev = "pixi-build", subdirectory = "pixi-packages/asan" }It works, but it's extremely verbose, producing several hundreds of pages of output. Unsure if they are legit issues with numpy or just noise? Or am I using it incorrectly? $ pixi s
$ python -c 'import numpy'
[... too many lines of output to copy-paste. here is just one ...]
Indirect leak of 14 byte(s) in 1 object(s) allocated from:
#0 0x782aed6fd9c7 in malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69
#1 0x782ae833e896 in PyArrayMethod_FromSpec_int ../numpy/_core/src/multiarray/array_method.c:481
#2 0x782ae8594f9b in PyUFunc_AddLoopFromSpec_int ../numpy/_core/src/umath/dispatching.cpp:177
#3 0x782ae86592e8 in init_ufunc(_object*, char const*, PyArray_DTypeMeta**, NPY_CASTING (*)(PyArrayMethodObject_tag*, PyArray_DTypeMeta* const*, _PyArray_Descr* const*, _PyArray_Descr**, long*), int (*)(PyArrayMethod_Context_tag*, char* const*, long const*, long const*, NpyAuxData_tag*), int, int, NPY_CASTING, NPY_ARRAYMETHOD_FLAGS, void*) ../numpy/_core/src/umath/stringdtype_ufuncs.cpp:2492
SUMMARY: AddressSanitizer: 35505 byte(s) leaked in 410 allocation(s). |
|
do you have something like https://github.com/lucascolley/scipy/blob/78445c90e2dc2560d8f6ae044fab0d6d0eaa08ea/pixi.toml#L598 |
Ah yes, that quiets it down. |
seberg
left a comment
There was a problem hiding this comment.
FWIW, looks good to me (I have not tried it out, but there are no users, so if there are problems follow-ups are easy enough anyway).
I think I'll just put it in, if e.g. Nathan has another comment it is after all easy to follow-up.
Thanks a lot for all this pixi work Lucas!
|
Hmmm, fun CI failures. The MacOS ones are spurious matmul runtime warnings, the windows ones looked like new warnings generated by cython code. Retriggered, but just out of curiosity... |
|
Sorry, nvm. would need a re-base for the new allowed warnings. And that is just not worth it. |
For scipy/scipy#24066. cc @ngoldbaum @FFY00 @rgommers
Depends on python/cpython#142469.