NumPy 1.20.0 incompatibilities
See original GitHub issueMotivation
NumPy released v1.20.0 in 21-01-31 with several updates including deprecations and type hint annotations. Currently, Optuna is not compatible with this version. Type hint errors are the known issues. The NumPy version in setup.py is therefore constrained to avoid this latest release with <1.20.0 (https://github.com/optuna/optuna/pull/2292). These incompatibilities should be addressed and the version constraints should be removed. The drop of Python 3.6 should also be noted since Optuna supports it for the time being.
Description
Fix incompatibilities with NumPy v.1.20.0.
Alternatives (optional)
Type hint errors could be ignoring with # type: ignore to allow first relaxing the version constraint and introduce incremental fixes.
Status
mypy errors/notes
-
optuna/importance/_fanova/_fanova.py -
optuna/importance/_fanova/_tree.py -
optuna/integration/botorch.py -
optuna/integration/cma.py -
optuna/integration/sklearn.py -
optuna/multi_objective/_hypervolume/wfg.py -
optuna/multi_objective/samplers/_motpe.py -
optuna/pruners/_percentile.py -
optuna/samplers/_tpe/multi_objective_sampler.py -
optuna/samplers/_tpe/multivariate_parzen_estimator.py -
optuna/samplers/_tpe/parzen_estimator.py -
optuna/samplers/_tpe/sampler.py -
tests/importance_tests/fanova_tests/test_tree.py -
tests/integration_tests/test_chainer.py -
tests/integration_tests/test_sklearn.py -
tests/multi_objective_tests/hypervolume_tests/test_wfg.py -
tests/multi_objective_tests/samplers_tests/test_motpe.py -
tests/samplers_tests/test_grid.py -
tests/samplers_tests/tpe_tests/test_multi_objective_sampler.py -
tests/samplers_tests/tpe_tests/test_parzen_estimator.py -
tests/storages_tests/rdb_tests/test_with_server.py
_Parsed from https://github.com/optuna/optuna/issues/2293#issuecomment-770624780_
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (8 by maintainers)

Top Related StackOverflow Question
Thanks for the heads up. Let me close the issue, and thanks for the effort on the long running PR.
Issue resolved with PR #2300. Can be closed.