Thanks to visit codestin.com
Credit goes to github.com

Skip to content

making numba optional #423

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

Merged
merged 49 commits into from
Apr 16, 2023
Merged

making numba optional #423

merged 49 commits into from
Apr 16, 2023

Conversation

eriknw
Copy link
Member

@eriknw eriknw commented Apr 3, 2023

I started poking around to see what it would take to allow numba to be optional. Closes #415. May also address #324.

This is a work in progress and can probably be cleaned up. This also tests against Python 3.11 and PyPy.

Let's see what happens in CI!

@coveralls
Copy link

coveralls commented Apr 3, 2023

Coverage Status

Changes unknown
when pulling 3db0f4e on eriknw:no_numba
into ** on python-graphblas:main**.

@eriknw eriknw marked this pull request as draft April 4, 2023 14:40
@eriknw
Copy link
Member Author

eriknw commented Apr 4, 2023

PyPy 3.8.16 0_73_pypy had a segfault here when using psg wheel, so I'm skipping PyPy on CI for now (not worth the effort). Most of the PyPy jobs were passing though!

I'm not sure when I'll be able to push this PR over the finish line, but it's reviewable in its current state. Most of the changes are pretty minor, and it was mostly just grunt-work to get tests to pass w/o numba installed.

This PR does not yet introduce "udf" backends or a means to make numba optional when installing.

@eriknw
Copy link
Member Author

eriknw commented Apr 7, 2023

Using numba==0.57.0rc1 appears to work! 🎉 (also NumPy 1.24 and Python 3.11)

@eriknw eriknw marked this pull request as ready for review April 9, 2023 19:20
@eriknw
Copy link
Member Author

eriknw commented Apr 9, 2023

I think this is ready for review/closer scrutiny.

This sets us on the path of having numba and even suitesparse-graphblas as optional dependencies. Documentation has been updated to show pip install python-graphblas[default].

We may want to wait until numba 0.57 is released to merge this.

@eriknw
Copy link
Member Author

eriknw commented Apr 16, 2023

I futz around with coverage a little bit, and in the process fixed a few bugs. I also commented code e.g. # NOT COVERED, # BRANCH NOT COVERED, and # FLAKY COVERAGE to call attention.

Anyway, this is going in! I skip numba 0.57.0rc1 on Windows in CI. We can update CI when there is a new RC, and/or when 0.57.0 is released.

One final reminder: I am curious whether it's better to use isclose as a UDF or a recipe. We have both. We should experiment.

@eriknw eriknw merged commit 0eb490f into python-graphblas:main Apr 16, 2023
@eriknw eriknw mentioned this pull request Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make numba able to be optional
3 participants