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

Add upper bound for numpy version in dllib dependency #7548

Open
hkvision opened this issue Feb 14, 2023 · 9 comments
Open

Add upper bound for numpy version in dllib dependency #7548

hkvision opened this issue Feb 14, 2023 · 9 comments
Assignees

Comments

@hkvision
Copy link
Contributor

According to @hamham223 python 3.8 will default to install numpy 1.24, which will cause issues.
@hamham223 Paste the issues here and check what's the upper bound of the numpy we support.

@hamham223
Copy link
Contributor

Previous Failed Job: [Orca-Python-Ray-Py38-Spark3]

Typical Error Message: test/bigdl/orca/learn/ray/mxnet/test_mxnet_gluon.py - AttributeError: module 'numpy' has no attribute 'bool'

This is due to mxnet does not support numpy 1.24, although the installation requirement for mxnet 1.9.1 is numpy<2.0.0,>1.16.0. Hopefully they could fix this issue soon.

@hamham223
Copy link
Contributor

Reference:

@hkvision
Copy link
Contributor Author

https://github.com/intel-analytics/BigDL/blob/main/python/dllib/src/bigdl/dllib/models/rnn/rnnexample.py#L104

can change to np.int32

https://github.com/intel-analytics/BigDL/blob/main/python/dllib/src/bigdl/dllib/utils/utils.py#L227

can change to str

>>> np.array(["x"])
array(['x'], dtype='<U1')
>>> np.array(["x"]).astype(str)
array(['x'], dtype='<U1')

@hkvision
Copy link
Contributor Author

By default for Python 3.8, pip install numpy>=3.19.5 will install numpy 1.24.2.

@hkvision hkvision added WIP and removed TODO labels Feb 16, 2023
@hkvision hkvision self-assigned this Feb 16, 2023
@hamham223
Copy link
Contributor

Seems numpy 1.24 requires np.array must have homogeneous shape. e.g. [[1,2], [3,4,5]] is not acceptable. Previously numpy 1.21 does not have this problem.

https://stackoverflow.com/questions/67183501/setting-an-array-element-with-a-sequence-requested-array-has-an-inhomogeneous-sh

Failed job: https://github.com/intel-analytics/BigDL/actions/runs/4192715495/jobs/7268720402

@hkvision
Copy link
Contributor Author

hkvision commented Feb 22, 2023

Fixed. Orca code/unit tests have now supported numpy 1.24

@sharan21
Copy link

sharan21 commented Jul 6, 2023

I think this issue still persists. Are there any updates on this?

@hkvision
Copy link
Contributor Author

hkvision commented Jul 6, 2023

Oh really? I think we have supported at least for numpy 1.24.

Can you provide us with more information? Including your numpy version, and what piece of code you get the issue. We will then look into this.

@hkvision hkvision reopened this Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants