question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NumPy 1.20.0 incompatibilities

See original GitHub issue

Motivation

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:closed
  • Created 3 years ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
hvycommented, Mar 9, 2021

Thanks for the heads up. Let me close the issue, and thanks for the effort on the long running PR.

1reaction
0x41headcommented, Mar 9, 2021

Issue resolved with PR #2300. Can be closed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NumPy 1.20.0 Release Notes
Annotations for NumPy functions. · Wider use of SIMD to increase execution speed of ufuncs. · Preliminary work in changing the dtype and...
Read more >
ValueError: numpy.ndarray size changed, may indicate binary ...
I'm in Python 3.8.5. It sounds too simple to be real, but I had this same issue and all I did was reinstall...
Read more >
[Python] pyarrow<3 incompatible with numpy>=1.20.0 - Apache
Description. pyarrow 1.0 and 2.0 is not compatible with numpy 1.20. 0 Running the following command would fail: pa. array(np.
Read more >
Fixing numpy incompatibility when using tensorflow and scikit ...
This post is about fixing numpy incompatibility when using tensorflow and ... Due to tensorflow dependency, I could not upgrade to numpy 1.20.0...
Read more >
NumPy 1.20 has been released - LWN.net
NumPy 1.20.0 was announced on January 30, in what its developers describe as the largest release in the history of the project.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found