Skip to content
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

fix: find_label_errors raising AttributeError with numpy>=1.24.0 #3214

Merged
merged 4 commits into from
Jun 16, 2023

Conversation

gabrielmbmb
Copy link
Member

Description

The _construct_s_and_psx function was still using np.float alias to Python builtin float which was removed in numpy==1.24.0 causing an AttributeError to be raised.

This PR has replaced np.float by float.

Closes #3213

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested

The unit tests in tests/labeling/text_classification/test_label_errors.py don't fail anymore when numpy>=1.24.0.

Checklist

  • I have merged the original branch into my forked branch
  • I added relevant documentation
  • follows the style guidelines of this project
  • I did a self-review of my code
  • I made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have added relevant notes to the CHANGELOG.md file (See https://keepachangelog.com/)

@gabrielmbmb gabrielmbmb added type: bug Indicates an unexpected problem or unintended behavior client labels Jun 16, 2023
@gabrielmbmb gabrielmbmb added this to the v1.11.0 milestone Jun 16, 2023
@gabrielmbmb gabrielmbmb requested a review from alvarobartt June 16, 2023 13:57
@codecov
Copy link

codecov bot commented Jun 16, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.26 🎉

Comparison is base (3672971) 90.70% compared to head (b07b1ad) 90.96%.

❗ Current head b07b1ad differs from pull request most recent head 918950f. Consider uploading reports for the commit 918950f to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3214      +/-   ##
===========================================
+ Coverage    90.70%   90.96%   +0.26%     
===========================================
  Files          215      216       +1     
  Lines        11323    11386      +63     
===========================================
+ Hits         10270    10357      +87     
+ Misses        1053     1029      -24     
Flag Coverage Δ
pytest 90.96% <100.00%> (+0.26%) ⬆️

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

Impacted Files Coverage Δ
...gilla/labeling/text_classification/label_errors.py 90.24% <100.00%> (ø)

... and 21 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@alvarobartt alvarobartt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@alvarobartt alvarobartt merged commit d703e00 into develop Jun 16, 2023
@alvarobartt alvarobartt deleted the fix/numpy-errors branch June 16, 2023 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] numpy has no attribute float
2 participants