alibi-detect icon indicating copy to clipboard operation
alibi-detect copied to clipboard

Update numba requirement from !=0.54.0,<0.56.0,>=0.50.0 to >=0.50.0,!=0.54.0,<0.57.0

Open dependabot[bot] opened this issue 2 years ago • 4 comments

Updates the requirements on numba to permit the latest version.

Release notes

Sourced from numba's releases.

Version 0.56.0

This release continues to add new features, bug fixes and stability improvements to Numba. Please note that this will be the last release that has support for Python 3.7 as the next release series (Numba 0.57) will support Python 3.11! Also note that, this will be the last release to support linux-32 packages produced by the Numba team.

Commits
  • f75c45a Merge pull request #8279 from sklam/misc/rel0.56cherry
  • 90671af Fix incorrect merge
  • 2717e7a Merge pull request #8275 from stuartarchibald/wip/change_log_056_final
  • d617754 Merge pull request #8274 from stuartarchibald/doc/056_version_support_update
  • d42d598 Merge pull request #8269 from sklam/misc/cherry8255
  • a375ad7 Merge pull request #8255 from gmarkall/issue-8252
  • ea84072 Merge pull request #8205 from esc/pin_llvmlite_numpy
  • 99a231e adding 8205 to CHANGE_LOG
  • bfd8290 clamp NumPy version at 1.22
  • f789aab pin llvmlite to 0.39.*
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

dependabot[bot] avatar Jul 27 '22 07:07 dependabot[bot]

numba is seg faulting on macOS. Requires further investigation.

ascillitoe avatar Jul 27 '22 14:07 ascillitoe

Notes:

I haven't been able to find the cause of the MacOS segfault yet. It is probably occurring in _ids_to_stats, but I haven't identified the exact cause. Turning on boundscheck=True did not reveal anything, which makes me think it is not an indexing error. My remaining guesses are that it is one of the following:

  • A bug caused by parallel=True (and/or cache=True), perhaps related to this recent fix in 0.56.0: https://github.com/numba/numba/issues/5890.
  • A numpy<->numba related issue. It seems like using numpy functions with axis=-1 has caused issues in the past.

I need to run more tests on a MacOS system and put together a MWE.

ascillitoe avatar Aug 01 '22 12:08 ascillitoe

A newer version of numba exists, but since this PR has been edited by someone other than Dependabot I haven't updated it. You'll get a PR for the updated version as normal once this PR is merged.

dependabot[bot] avatar Sep 05 '22 14:09 dependabot[bot]

@dependabot recreate

ascillitoe avatar Sep 06 '22 15:09 ascillitoe

@dependabot rebase

ascillitoe avatar Oct 10 '22 08:10 ascillitoe

Looks like this PR has been edited by someone other than Dependabot. That means Dependabot can't rebase it - sorry!

If you're happy for Dependabot to recreate it from scratch, overwriting any edits, you can request @dependabot recreate.

dependabot[bot] avatar Oct 10 '22 08:10 dependabot[bot]

@dependabot recreate

ascillitoe avatar Oct 10 '22 08:10 ascillitoe

@dependabot recreate doesn't seem to be working. Force pushed to recreate manually.

ascillitoe avatar Oct 10 '22 09:10 ascillitoe

@jklaise @mauicv I spent quite a while trying to debug the segfault that was occurring in CVMDriftOnline on MacOS (with the latest numba version). I have narrowed it down to an issue with the OpenMP threading in the _ids_to_stats function (changing to parallel=False or changing the numba threading layer to workqueue (or even tbb) appears to fix the issue.

I have tried quite a few things to check for possible out-of-bounds issues, OOM issues, and weird numpy dtype's, but no luck. Given this, I've added a temporary(ish?) fix to simply change to the less performant workqueue threading on MacOS. Given that the parallelism only gives limited speedups anyway in this case (and we have few MacOS users), this seems like a reasonable comprimise? We could open an issue to revist when a future numba version is released...

ascillitoe avatar Oct 10 '22 15:10 ascillitoe

@ascillitoe sounds reasonable to me. One thing though that generally as a library we should avoid setting global configs for 3rd party dependencies as it impacts the user's environment immediately as our module is loaded. I don't immediately see how we could do it in a better way (normally these changes to global variables might be ok if set temporarily, e.g. within a context manager).

jklaise avatar Oct 10 '22 15:10 jklaise

One thing though that generally as a library we should avoid setting global configs for 3rd party dependencies as it impacts the user's environment immediately as our module is loaded. I don't immediately see how we could do it in a better way (normally these changes to global variables might be ok if set temporarily, e.g. within a context manager).

Good point... just retested and this does indeed override any previously set config which isn't ideal...

ascillitoe avatar Oct 10 '22 16:10 ascillitoe

@jklaise a simple alternative would just be to set NUMBA_THREADING_LAYER='workqueue' in our MacOS CI for now, and add a note to the CVMDriftOnline docs advising users to do the same if they have any issues on MacOS? We don't actually know that this error even occurs "in the wild"...

ascillitoe avatar Oct 10 '22 16:10 ascillitoe

@ascillitoe that sounds sensible to me.

jklaise avatar Oct 10 '22 16:10 jklaise

Codecov Report

Merging #573 (03e7ec2) into master (8f42ee2) will not change coverage. The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #573   +/-   ##
=======================================
  Coverage   78.83%   78.83%           
=======================================
  Files         123      123           
  Lines        8747     8747           
=======================================
  Hits         6896     6896           
  Misses       1851     1851           
Flag Coverage Δ
macos-latest-3.10 75.92% <ø> (ø)
ubuntu-latest-3.10 78.72% <ø> (ø)
ubuntu-latest-3.7 78.63% <ø> (ø)
ubuntu-latest-3.8 78.67% <ø> (ø)
ubuntu-latest-3.9 78.67% <ø> (ø)
windows-latest-3.9 75.86% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

codecov-commenter avatar Oct 11 '22 10:10 codecov-commenter

@jklaise @mauicv: This is now passing. I've added the env variable setting to the main "Test with pytest" step so that it is scoped to remain in this step.

ascillitoe avatar Oct 11 '22 10:10 ascillitoe