GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — making numba optional by eriknw · Pull Request #423 · python-graphblas/python-graphblas

Conversation

@eriknw

@eriknw eriknw commented Apr 3, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@eriknw
WIP: making numba optional
8243013
eriknw
eriknw commented Apr 3, 2023
View reviewed changes
Comment thread graphblas/io.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@coveralls

coveralls commented Apr 3, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Coverage Status

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

eriknw added 4 commits April 3, 2023 19:57
@eriknw
No numba on Python 3.11; use conda
a987553
@eriknw
skip notebooks and try mamba
d31b3de
@eriknw
Only test pypy
9c6bb51
@eriknw
bump pandas 2.0.0
02d261c
@eriknw
eriknw marked this pull request as draft April 4, 2023 14:40
@eriknw
Don't test against pypy in CI
61f5660
@eriknw

eriknw commented Apr 4, 2023

Copy link
Copy Markdown
Member Author

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

eriknw added 11 commits April 4, 2023 11:14
@eriknw
Update classifiers (we don't officially support PyPy)
71af5e7
@eriknw
expand optional dependencies
6200a9f
@eriknw
networkx 3.1
d4ae208
@eriknw
simplify/combine deps
21ddb7f
@eriknw
Make suitesparse_graphblas optional (in the future); don't install nu…
3af869c
…mba on 3.11 yet
@eriknw
Test numba 0.57.0rc1
5cdaa31
@eriknw
oops
78c2666
@eriknw
Ignore deprecation warning raised by awkward in Python 3.11
ce0a667
@eriknw
try to ignore warning from sparse
0b6dcaf
@eriknw
drop sparse 0.12 (which is really old and annoying to support)
67a5b71
@eriknw
sre_constants also deprecated
0f66e65
@eriknw

eriknw commented Apr 7, 2023

Copy link
Copy Markdown
Member Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@eriknw eriknw mentioned this pull request Apr 7, 2023
Test numba 0.57dev and numpy 1.24 #414
Closed
@eriknw
clean up
fd82c12
eriknw
eriknw commented Apr 7, 2023
View reviewed changes
Comment thread graphblas/core/operator/binary.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

eriknw added 3 commits April 8, 2023 20:15
@eriknw
shouldhave make tests a little more clear (I think)
ccb1b30
Also, bump version of `fast_matrix_market`, and randomly generate OS for import test.
@eriknw
Recipes for L1norm and Linfnorm aggregators
e1ed1f0
@eriknw
Better error message for default operators that are UDFs
a074aa0
@eriknw
eriknw marked this pull request as ready for review April 9, 2023 19:20
@eriknw

eriknw commented Apr 9, 2023

Copy link
Copy Markdown
Member Author

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@eriknw
Try this
de2c81f
jim22k
jim22k approved these changes Apr 12, 2023
View reviewed changes
eriknw added 25 commits April 12, 2023 17:45
@eriknw
Stress test numba 0.57.0rc1 on Windows
837796c
@eriknw
But which unaryop is causing this?!
571b27a
@eriknw
more debug print
30f5532
@eriknw
Always test with numpy 1.24
3f4a3ee
@eriknw
Don't map numpy
050d709
@eriknw
more brutal testing
73205e8
@eriknw
forgot a -s
cc08a34
@eriknw
shuffle attrs
4c7441b
@eriknw
where exactly does it happen? also, only wheels for psg
4b0c3cb
@eriknw
relax numpy version
bb35f98
@eriknw
exp2 reliably fails; what else?
f4645ce
@eriknw
test
e7422a5
@eriknw
Try other sources of psg
92c8df5
@eriknw
undo testing numba on windows
757ea24
@eriknw
numba version depends on python and numpy versions
3db0f4e
@eriknw
coverage
2e9d8cd
@eriknw
lazy indexunary handling and a bit more coverage
e6f94ec
@eriknw
skip numba 0.57.0rc1 on Windows for now
eb1560e
@eriknw
quick experiment with coverage
f6f35d2
@eriknw
try "no branch" here
49e29f8
@eriknw
coverage cleanup
759405f
@eriknw
Merge branch 'main' into no_numba
945bdf9
@eriknw
Make PNGs smaller via https://tinypng.com
f6c6d27
@eriknw
mark a couple more lines as flaky coverage
10706aa
@eriknw
Two more flaky coverage
789a37e
@eriknw

eriknw commented Apr 16, 2023

Copy link
Copy Markdown
Member Author

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@eriknw
eriknw merged commit 0eb490f into python-graphblas:main Apr 16, 2023
@eriknw eriknw mentioned this pull request Apr 18, 2023
Support Python 3.11 #324
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jim22k jim22k jim22k approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Make numba able to be optional

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@eriknw @coveralls @jim22k
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.