Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Bug]: - deel.influenciae.plots not functioning due to incompatibility with numpy 1.24 onwards (none of the google collabs are functioning) #34

Open
CA-Fernandes opened this issue Feb 13, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@CA-Fernandes
Copy link

Module

None

Contact Details

f.clyde21@gmail.com

Current Behavior

Tried different google collabs to test influencia. Cannot import deel.influencia.plots due to issues with numpy compatibility. Seems to be an issue with the use of np.float in the library which has been depricated since numpy 1.24

Expected Behavior

the function would be imported with no error

Version

v0.1.0

Environment

- OS:Google Collab
- Python version:3.11
- Tensorflow version: 2.18
- Packages used version:
 - numpy: 1.26.4

Relevant log output

from deel.influenciae.utils import ORDER
from deel.influenciae.plots import plot_datacentric_explanations, plot_most_influential_images

---------------------------------------------------------------------------

AttributeError                            Traceback (most recent call last)

<ipython-input-19-7e886f2fedc4> in <cell line: 0>()
      1 from deel.influenciae.utils import ORDER
----> 2 from deel.influenciae.plots import plot_datacentric_explanations, plot_most_influential_images

4 frames

/usr/local/lib/python3.11/dist-packages/numpy/__init__.py in __getattr__(attr)
    322 
    323         if attr in __former_attrs__:
--> 324             raise AttributeError(__former_attrs__[attr])
    325 
    326         if attr == 'testing':

AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

To Reproduce

In Tracin.ipynb run the cells
from deel.influenciae.utils import ORDER
from deel.influenciae.plots import plot_datacentric_explanations, plot_most_influential_images

From heading "Now we can use it to compute influence values!"

@CA-Fernandes CA-Fernandes added the bug Something isn't working label Feb 13, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant