Repository: facebookresearch/hydra

Issue:
[Bug] hydra-optuna-sweeper 1.1.0 requires numpy<1.20.0
# 🐛 Bug
## Description
<!-- A clear and concise description of what the bug is. -->

I used the guide from
https://hydra.cc/docs/plugins/optuna_sweeper/

And install hydra-optuna-sweeper:

```bash 
pip install hydra-optuna-sweeper --upgrade
```

But it seems this plugin requires numpy<1.20.0:

![image](https://user-images.githubusercontent.com/17675462/130957784-7f3502c0-7002-41fa-9c71-f54bc5604044.png)

**Edit:**

I searched for optuna's requirements, found this:

https://github.com/optuna/optuna/blob/cbae80476c15b6d39e1d8851dc6a501c63c3ca92/setup.py#L35

Why hydra-optuna-sweeper need to use  numpy<1.20.0?






Discussion:
I can reproduce this issue:
```text
$ pip install numpy==1.21 hydra-core hydra-optuna-sweeper
...
ERROR: Cannot install hydra-optuna-sweeper==1.1.0 and numpy==1.21 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested numpy==1.21
    hydra-optuna-sweeper 1.1.0 depends on numpy<1.20.0
...
```

I do not think this is an optuna problem:
```
$ pip install optuna numpy
...
$ python -c "import optuna, numpy; print(optuna.__version__); print(numpy.__version__)"
2.9.1
1.21.0
```


@Jasha10 Thank you for reproducing the error.

I couldn't found the requirement for `numpy<1.20.0` in hydra-optuna-sweeper. What you think? 


It looks like the [hydra-optuna-sweeper on pypi](https://pypi.org/project/hydra-optuna-sweeper) is a bit behind the version that we have in this github repository. If you download the [files](https://pypi.org/project/hydra-optuna-sweeper/#files) directly from pypi, you'll see the requirement `numpy<1.20.0` in the `setup.py` file.

For now, a workaround would be to install the plugin from source instead of from pypi:
```text
$ pip install numpy==1.21
...
$ git clone https://github.com/facebookresearch/hydra
...
$ cd hydra/
$ git checkout tags/v1.1.1  # the latest stable release of Hydra
...
$ cd plugins/hydra_optuna_sweeper/
$ pip install .
...
Successfully installed Mako-1.1.5 MarkupSafe-2.0.1 PrettyTable-2.1.0 PyYAML-5.4.1 alembic-1.6.5 antlr4-python3-runtime-4.8 attrs-21.2.0 autopage-0.4.0 cliff-3.9.0 cmaes-0.8.2 cmd2-2.1.2 colorama-0.4.4 colorlog-6.4.1 greenlet-1.1.1 hydra-core-1.1.1 hydra-optuna-sweeper-1.1.0 omegaconf-2.1.1 optuna-2.9.1 packaging-21.0 pbr-5.6.0 pyparsing-2.4.7 pyperclip-1.8.2 python-dateutil-2.8.2 python-editor-1.0.4 scipy-1.7.1 six-1.16.0 sqlalchemy-1.4.23 stevedore-3.4.0 tqdm-4.62.2 wcwidth-0.2.5
...
$ python -c "import numpy; print(numpy.__version__)"
1.21.0
```

This is a legacy fix. at some point Optuna was not fully compatible with numpy 1.2.
I think we should be able to remove it.
Thank you @omry and @Jasha10. Leaving this issue open in the meantime. 

Resolving patch:
diff --git a/plugins/hydra_optuna_sweeper/hydra_plugins/hydra_optuna_sweeper/__init__.py b/plugins/hydra_optuna_sweeper/hydra_plugins/hydra_optuna_sweeper/__init__.py
--- a/plugins/hydra_optuna_sweeper/hydra_plugins/hydra_optuna_sweeper/__init__.py
+++ b/plugins/hydra_optuna_sweeper/hydra_plugins/hydra_optuna_sweeper/__init__.py
@@ -1,3 +1,3 @@
 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
 
-__version__ = "1.1.0"
+__version__ = "1.1.1"


Test patch: