From 9dc95e97d6c9c79aafa968745de223f9f72f68b0 Mon Sep 17 00:00:00 2001 From: linbin <756691769@qq.com> Date: Mon, 10 Aug 2020 09:14:59 +0800 Subject: [PATCH 1/5] add supporting sklearn=0.23.2 --- deployment/pypi/setup.py | 2 +- setup.py | 2 +- .../feature_engineering/gradient_selector/gradient_selector.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/deployment/pypi/setup.py b/deployment/pypi/setup.py index 61f7ff0178..287166611a 100644 --- a/deployment/pypi/setup.py +++ b/deployment/pypi/setup.py @@ -63,7 +63,7 @@ 'scipy', 'coverage', 'colorama', - 'scikit-learn>=0.20,<0.22', + 'scikit-learn>=0.20,<=0.24', 'pkginfo', 'websockets' ], diff --git a/setup.py b/setup.py index 30d4f448c6..2b247b0707 100644 --- a/setup.py +++ b/setup.py @@ -41,7 +41,7 @@ def read(fname): 'schema', 'PythonWebHDFS', 'colorama', - 'scikit-learn>=0.20,<0.22', + 'scikit-learn>=0.20,<=0.24', 'pkginfo', 'websockets' ], diff --git a/src/sdk/pynni/nni/feature_engineering/gradient_selector/gradient_selector.py b/src/sdk/pynni/nni/feature_engineering/gradient_selector/gradient_selector.py index 9dea3e8a0e..f7cb69f627 100644 --- a/src/sdk/pynni/nni/feature_engineering/gradient_selector/gradient_selector.py +++ b/src/sdk/pynni/nni/feature_engineering/gradient_selector/gradient_selector.py @@ -24,7 +24,7 @@ import pandas as pd from sklearn.base import BaseEstimator -from sklearn.feature_selection.base import SelectorMixin +from sklearn.feature_selection import SelectorMixin from sklearn.utils.validation import check_is_fitted import torch From 7832df2f3f08d45f07a696c89e758ecd888e13e8 Mon Sep 17 00:00:00 2001 From: linbin <756691769@qq.com> Date: Mon, 10 Aug 2020 11:44:06 +0800 Subject: [PATCH 2/5] change the version of scikit-learn --- azure-pipelines.yml | 6 +++--- deployment/docker/Dockerfile | 4 ++-- deployment/docker/README.md | 2 +- deployment/docker/README_zh_CN.md | 4 ++-- deployment/pypi/setup.py | 2 +- docs/requirements.txt | 2 +- setup.py | 2 +- .../feature_engineering/gradient_selector/requirements.txt | 2 +- src/sdk/pynni/nni/metis_tuner/requirments.txt | 2 +- src/sdk/pynni/requirements.txt | 2 +- test/pipelines/pipelines-it-local-tf2.yml | 2 +- test/pipelines/pipelines-it-local-windows.yml | 2 +- test/pipelines/pipelines-it-local.yml | 2 +- test/pipelines/pipelines-it-pai-windows.yml | 4 ++-- test/pipelines/pipelines-it-remote-windows-to-linux.yml | 2 +- 15 files changed, 20 insertions(+), 20 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 839aa2c4d6..78917d879f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -49,9 +49,9 @@ jobs: sphinx-build -M html . _build -W displayName: 'Sphinx Documentation Build check' -- job: 'ubuntu_1604_python35_legacy_torch_tf' +- job: 'ubuntu_1804_python36_legacy_torch_tf' pool: - vmImage: 'Ubuntu 16.04' + vmImage: 'Ubuntu 18.04' steps: - script: | @@ -141,7 +141,7 @@ jobs: powershell.exe -file install.ps1 displayName: 'Install nni toolkit via source code' - script: | - python -m pip install scikit-learn==0.20.0 --user + python -m pip install scikit-learn==0.23.2 --user python -m pip install keras==2.1.6 --user python -m pip install torch==1.5.0+cpu torchvision==0.6.0+cpu -f https://download.pytorch.org/whl/torch_stable.html --user python -m pip install tensorflow==1.15.2 --user diff --git a/deployment/docker/Dockerfile b/deployment/docker/Dockerfile index 5e33cc6047..493cdba17b 100644 --- a/deployment/docker/Dockerfile +++ b/deployment/docker/Dockerfile @@ -60,9 +60,9 @@ RUN python3 -m pip --no-cache-dir install torch==1.4.0 RUN python3 -m pip install torchvision==0.5.0 # -# sklearn 0.20.0 +# sklearn 0.23.2 # -RUN python3 -m pip --no-cache-dir install scikit-learn==0.20.0 +RUN python3 -m pip --no-cache-dir install scikit-learn==0.23.2 # # pandas==0.23.4 lightgbm==2.2.2 diff --git a/deployment/docker/README.md b/deployment/docker/README.md index aa8dae38a4..1ee8d0b3bd 100644 --- a/deployment/docker/README.md +++ b/deployment/docker/README.md @@ -11,7 +11,7 @@ scipy 1.1.0 tensorflow-gpu 1.15.0 keras 2.1.6 torch 1.4.0 -scikit-learn 0.20.0 +scikit-learn 0.23.2 pandas 0.23.4 lightgbm 2.2.2 nni diff --git a/deployment/docker/README_zh_CN.md b/deployment/docker/README_zh_CN.md index a2b243e472..1a000ad02c 100644 --- a/deployment/docker/README_zh_CN.md +++ b/deployment/docker/README_zh_CN.md @@ -9,7 +9,7 @@ TensorFlow-gpu 1.10.0 Keras 2.1.6 PyTorch 0.4.1 - scikit-learn 0.20.0 + scikit-learn 0.23.2 pandas 0.23.4 lightgbm 2.2.2 NNI v0.7 @@ -47,4 +47,4 @@ 使用下列命令从 docker Hub 中拉取 NNI docker 映像。 - docker pull msranni/nni:latest \ No newline at end of file + docker pull msranni/nni:latest diff --git a/deployment/pypi/setup.py b/deployment/pypi/setup.py index 287166611a..ed54edf161 100644 --- a/deployment/pypi/setup.py +++ b/deployment/pypi/setup.py @@ -63,7 +63,7 @@ 'scipy', 'coverage', 'colorama', - 'scikit-learn>=0.20,<=0.24', + 'scikit-learn>=0.23,<=0.24', 'pkginfo', 'websockets' ], diff --git a/docs/requirements.txt b/docs/requirements.txt index 721a587a20..cf66d115ff 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -13,6 +13,6 @@ peewee nbsphinx schema tensorboard -scikit-learn==0.20 +scikit-learn==0.23.2 thop https://download.pytorch.org/whl/cpu/torch-1.3.1%2Bcpu-cp37-cp37m-linux_x86_64.whl diff --git a/setup.py b/setup.py index 2b247b0707..0610142ee3 100644 --- a/setup.py +++ b/setup.py @@ -41,7 +41,7 @@ def read(fname): 'schema', 'PythonWebHDFS', 'colorama', - 'scikit-learn>=0.20,<=0.24', + 'scikit-learn>=0.23,<=0.24', 'pkginfo', 'websockets' ], diff --git a/src/sdk/pynni/nni/feature_engineering/gradient_selector/requirements.txt b/src/sdk/pynni/nni/feature_engineering/gradient_selector/requirements.txt index 06d2241d5f..e8c426c5da 100644 --- a/src/sdk/pynni/nni/feature_engineering/gradient_selector/requirements.txt +++ b/src/sdk/pynni/nni/feature_engineering/gradient_selector/requirements.txt @@ -1,4 +1,4 @@ numpy==1.14.3 -scikit-learn==0.20.0 +scikit-learn==0.23.2 scipy==1.1.0 torch==1.1.0 diff --git a/src/sdk/pynni/nni/metis_tuner/requirments.txt b/src/sdk/pynni/nni/metis_tuner/requirments.txt index 05c74c49ca..899ac3c78c 100644 --- a/src/sdk/pynni/nni/metis_tuner/requirments.txt +++ b/src/sdk/pynni/nni/metis_tuner/requirments.txt @@ -1 +1 @@ -scikit-learn==0.20 \ No newline at end of file +scikit-learn==0.23.2 diff --git a/src/sdk/pynni/requirements.txt b/src/sdk/pynni/requirements.txt index 282f572631..bf5ddf736d 100644 --- a/src/sdk/pynni/requirements.txt +++ b/src/sdk/pynni/requirements.txt @@ -8,4 +8,4 @@ scipy hyperopt==0.1.2 # metis tuner -scikit-learn==0.20 +scikit-learn==0.23.2 diff --git a/test/pipelines/pipelines-it-local-tf2.yml b/test/pipelines/pipelines-it-local-tf2.yml index 26f3d4c87d..2b9526c142 100644 --- a/test/pipelines/pipelines-it-local-tf2.yml +++ b/test/pipelines/pipelines-it-local-tf2.yml @@ -10,7 +10,7 @@ jobs: displayName: 'Install nni toolkit via source code' - script: | set -e - python3 -m pip install scikit-learn==0.20.0 --user + python3 -m pip install scikit-learn==0.23.2 --user python3 -m pip install torch==1.3.1 torchvision==0.4.2 -f https://download.pytorch.org/whl/torch_stable.html --user python3 -m pip install tensorflow-gpu==2.2.0 tensorflow-estimator==2.2.0 --force --user python3 -m pip install keras==2.4.2 --user diff --git a/test/pipelines/pipelines-it-local-windows.yml b/test/pipelines/pipelines-it-local-windows.yml index bfdf4eed21..4b791c762c 100644 --- a/test/pipelines/pipelines-it-local-windows.yml +++ b/test/pipelines/pipelines-it-local-windows.yml @@ -7,7 +7,7 @@ jobs: powershell.exe -file install.ps1 displayName: 'Install nni toolkit via source code' - script: | - python -m pip install scikit-learn==0.20.0 --user + python -m pip install scikit-learn==0.23.2 --user python -m pip install keras==2.1.6 --user python -m pip install torchvision===0.4.1 torch===1.3.1 -f https://download.pytorch.org/whl/torch_stable.html --user python -m pip install tensorflow-gpu==1.15.2 tensorflow-estimator==1.15.1 --force --user diff --git a/test/pipelines/pipelines-it-local.yml b/test/pipelines/pipelines-it-local.yml index ec6735a473..eb72e4099d 100644 --- a/test/pipelines/pipelines-it-local.yml +++ b/test/pipelines/pipelines-it-local.yml @@ -10,7 +10,7 @@ jobs: displayName: 'Install nni toolkit via source code' - script: | set -e - python3 -m pip install scikit-learn==0.20.0 --user + python3 -m pip install scikit-learn==0.23.2 --user python3 -m pip install torchvision==0.4.2 --user python3 -m pip install torch==1.3.1 --user python3 -m pip install keras==2.1.6 --user diff --git a/test/pipelines/pipelines-it-pai-windows.yml b/test/pipelines/pipelines-it-pai-windows.yml index 3bdb4ee69b..1765868827 100644 --- a/test/pipelines/pipelines-it-pai-windows.yml +++ b/test/pipelines/pipelines-it-pai-windows.yml @@ -62,7 +62,7 @@ jobs: displayName: 'Install nni toolkit via source code' - script: | set PATH=$(ENV_PATH) - python -m pip install scikit-learn==0.21.0 --user + python -m pip install scikit-learn==0.23.2 --user displayName: 'Install dependencies for integration tests' - script: | cd test @@ -71,4 +71,4 @@ jobs: mount -o anon $(pai_nfs_uri) $(local_nfs_uri) python nni_test/nnitest/generate_ts_config.py --ts pai --pai_token $(pai_token) --pai_host $(pai_host) --pai_user $(pai_user) --nni_docker_image $(docker_image) --pai_storage_config_name $(pai_storage_config_name) --nni_manager_nfs_mount_path $(nni_manager_nfs_mount_path) --container_nfs_mount_path $(container_nfs_mount_path) --nni_manager_ip $(nni_manager_ip) --vc $(virtual_cluster) python nni_test/nnitest/run_tests.py --config config/integration_tests.yml --ts pai - displayName: 'Examples and advanced features tests on pai' \ No newline at end of file + displayName: 'Examples and advanced features tests on pai' diff --git a/test/pipelines/pipelines-it-remote-windows-to-linux.yml b/test/pipelines/pipelines-it-remote-windows-to-linux.yml index 36a98a9819..d87230201a 100644 --- a/test/pipelines/pipelines-it-remote-windows-to-linux.yml +++ b/test/pipelines/pipelines-it-remote-windows-to-linux.yml @@ -16,7 +16,7 @@ jobs: powershell.exe -file install.ps1 displayName: 'Install nni toolkit via source code' - script: | - python -m pip install scikit-learn==0.20.1 --user + python -m pip install scikit-learn==0.23.2 --user displayName: 'Install dependencies for integration tests' - task: SSH@0 inputs: From 9edf810027450d03f4750926a231fa9a34ea6de2 Mon Sep 17 00:00:00 2001 From: linbin <756691769@qq.com> Date: Mon, 10 Aug 2020 13:01:41 +0800 Subject: [PATCH 3/5] modify the '==' to '>=' --- deployment/pypi/setup.py | 2 +- docs/requirements.txt | 2 +- setup.py | 2 +- .../nni/feature_engineering/gradient_selector/requirements.txt | 2 +- src/sdk/pynni/nni/metis_tuner/requirments.txt | 2 +- src/sdk/pynni/requirements.txt | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/deployment/pypi/setup.py b/deployment/pypi/setup.py index ed54edf161..8d7ef288af 100644 --- a/deployment/pypi/setup.py +++ b/deployment/pypi/setup.py @@ -63,7 +63,7 @@ 'scipy', 'coverage', 'colorama', - 'scikit-learn>=0.23,<=0.24', + 'scikit-learn>=0.23', 'pkginfo', 'websockets' ], diff --git a/docs/requirements.txt b/docs/requirements.txt index cf66d115ff..59706a60ea 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -13,6 +13,6 @@ peewee nbsphinx schema tensorboard -scikit-learn==0.23.2 +scikit-learn>=0.23.2 thop https://download.pytorch.org/whl/cpu/torch-1.3.1%2Bcpu-cp37-cp37m-linux_x86_64.whl diff --git a/setup.py b/setup.py index 0610142ee3..52d536ced9 100644 --- a/setup.py +++ b/setup.py @@ -41,7 +41,7 @@ def read(fname): 'schema', 'PythonWebHDFS', 'colorama', - 'scikit-learn>=0.23,<=0.24', + 'scikit-learn>=0.23', 'pkginfo', 'websockets' ], diff --git a/src/sdk/pynni/nni/feature_engineering/gradient_selector/requirements.txt b/src/sdk/pynni/nni/feature_engineering/gradient_selector/requirements.txt index e8c426c5da..2aafc0c86f 100644 --- a/src/sdk/pynni/nni/feature_engineering/gradient_selector/requirements.txt +++ b/src/sdk/pynni/nni/feature_engineering/gradient_selector/requirements.txt @@ -1,4 +1,4 @@ numpy==1.14.3 -scikit-learn==0.23.2 +scikit-learn>=0.23.2 scipy==1.1.0 torch==1.1.0 diff --git a/src/sdk/pynni/nni/metis_tuner/requirments.txt b/src/sdk/pynni/nni/metis_tuner/requirments.txt index 899ac3c78c..3dfc2232a1 100644 --- a/src/sdk/pynni/nni/metis_tuner/requirments.txt +++ b/src/sdk/pynni/nni/metis_tuner/requirments.txt @@ -1 +1 @@ -scikit-learn==0.23.2 +scikit-learn>=0.23.2 diff --git a/src/sdk/pynni/requirements.txt b/src/sdk/pynni/requirements.txt index bf5ddf736d..ec1b8705fb 100644 --- a/src/sdk/pynni/requirements.txt +++ b/src/sdk/pynni/requirements.txt @@ -8,4 +8,4 @@ scipy hyperopt==0.1.2 # metis tuner -scikit-learn==0.23.2 +scikit-learn>=0.23.2 From 434e75f1e570e904cbb29b0133f9a3d025b08778 Mon Sep 17 00:00:00 2001 From: linbin <756691769@qq.com> Date: Mon, 10 Aug 2020 20:58:42 +0800 Subject: [PATCH 4/5] reset chinese doc --- deployment/docker/README_zh_CN.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment/docker/README_zh_CN.md b/deployment/docker/README_zh_CN.md index 1a000ad02c..9766f92138 100644 --- a/deployment/docker/README_zh_CN.md +++ b/deployment/docker/README_zh_CN.md @@ -9,7 +9,7 @@ TensorFlow-gpu 1.10.0 Keras 2.1.6 PyTorch 0.4.1 - scikit-learn 0.23.2 + scikit-learn 0.20.0 pandas 0.23.4 lightgbm 2.2.2 NNI v0.7 From c653f3d92db7dadd4c503240a37b6ba20d803178 Mon Sep 17 00:00:00 2001 From: linbin <756691769@qq.com> Date: Tue, 11 Aug 2020 10:57:29 +0800 Subject: [PATCH 5/5] modify setup.py --- deployment/pypi/setup.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deployment/pypi/setup.py b/deployment/pypi/setup.py index 8d7ef288af..8968686cd4 100644 --- a/deployment/pypi/setup.py +++ b/deployment/pypi/setup.py @@ -63,7 +63,7 @@ 'scipy', 'coverage', 'colorama', - 'scikit-learn>=0.23', + 'scikit-learn>=0.23.2', 'pkginfo', 'websockets' ], diff --git a/setup.py b/setup.py index 52d536ced9..fc86bbc954 100644 --- a/setup.py +++ b/setup.py @@ -41,7 +41,7 @@ def read(fname): 'schema', 'PythonWebHDFS', 'colorama', - 'scikit-learn>=0.23', + 'scikit-learn>=0.23.2', 'pkginfo', 'websockets' ],