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

Pin numpy version to 1.23.x for mxnet examples #154

Merged
merged 1 commit into from
Dec 21, 2022

Conversation

toshihikoyanase
Copy link
Member

Motivation

The CI job of the mxnet example failed when import mxnet.
https://github.com/optuna/optuna-examples/actions/runs/3732572214

This is due to deprecation of numpy.bool from numpy==1.24.0.
https://github.com/numpy/numpy/releases/tag/v1.24.0

The deprecation for the aliases np.object, np.bool, np.float, np.complex, np.str, and np.int is expired (introduces NumPy 1.20). Some of these will now give a FutureWarning in addition to raising an error since they will be mapped to the NumPy scalars in the future.
(gh-22607)

It raises the AttributeError in addition to FutureWarning.

I guess we need to wait for the update of mxnet to resolve this issue.
c.f., https://github.com/apache/mxnet/blob/7d602e3b2382eb501fdeb94c4d97e652a723af11/python/mxnet/numpy/utils.py#L41

Description of the changes

  • Pin numpy version to 1.23.x.

@contramundum53 contramundum53 self-assigned this Dec 21, 2022
Copy link
Member

@contramundum53 contramundum53 left a comment

Choose a reason for hiding this comment

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

LGTM.

@contramundum53 contramundum53 merged commit ab2be28 into optuna:main Dec 21, 2022
@contramundum53 contramundum53 added this to the v3.1.0 milestone Dec 21, 2022
@toshihikoyanase toshihikoyanase deleted the pin-numpy-for-mxnet branch December 21, 2022 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants