Unverified Commit c56568c9 authored by liuzhe-lz's avatar liuzhe-lz Committed by GitHub
Browse files

Bump Python version to 3.7~3.9 (#4475)

parent 4862b6da
...@@ -224,7 +224,8 @@ Within the following table, we summarized the current NNI capabilities, we are g ...@@ -224,7 +224,8 @@ Within the following table, we summarized the current NNI capabilities, we are g
### **Install** ### **Install**
NNI supports and is tested on Ubuntu >= 16.04, macOS >= 10.14.1, and Windows 10 >= 1809. Simply run the following `pip install` in an environment that has `python 64-bit >= 3.6`. NNI supports and is tested on Ubuntu >= 18.04, Windows 10 >= 21H2, and macOS >= 11.
Simply run the following `pip install` in an environment that has `python 64-bit >= 3.7`.
Linux or macOS Linux or macOS
......
# Recommended because some non-commonly-used modules/examples depend on those packages. # Recommended because some non-commonly-used modules/examples depend on those packages.
-f https://download.pytorch.org/whl/torch_stable.html -f https://download.pytorch.org/whl/torch_stable.html
tensorflow == 2.7.0 tensorflow >= 2.7.0
tensorboard == 2.7.0 tensorboard >= 2.7.0
torch == 1.10.0+cpu ; sys_platform != "darwin" torch == 1.10.0+cpu ; sys_platform != "darwin"
torch == 1.10.0 ; sys_platform == "darwin" torch == 1.10.0 ; sys_platform == "darwin"
torchvision == 0.11.1+cpu ; sys_platform != "darwin" torchvision == 0.11.1+cpu ; sys_platform != "darwin"
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
-f https://download.pytorch.org/whl/torch_stable.html -f https://download.pytorch.org/whl/torch_stable.html
tensorflow tensorflow
keras == 2.4.3
torch == 1.10.0+cu111 torch == 1.10.0+cu111
torchvision == 0.11.1+cu111 torchvision == 0.11.1+cu111
pytorch-lightning >= 1.5.0 pytorch-lightning >= 1.5.0
......
-f https://download.pytorch.org/whl/torch_stable.html -f https://download.pytorch.org/whl/torch_stable.html
tensorflow == 1.15.4
torch == 1.7.1+cpu torch == 1.7.1+cpu
torchvision == 0.8.2+cpu torchvision == 0.8.2+cpu
# It will install pytorch-lightning 0.8.x and unit tests won't work. # It will install pytorch-lightning 0.8.x and unit tests won't work.
# Latest version has conflict with tensorboard and tensorflow 1.x. # Latest version has conflict with tensorboard and tensorflow 1.x.
pytorch-lightning #pytorch-lightning
torchmetrics torchmetrics
keras == 2.1.6
onnx onnx
peewee peewee
graphviz graphviz
gym gym
tianshou >= 0.4.1 tianshou >= 0.4.1
matplotlib < 3.4 matplotlib
# TODO: time to drop tensorflow 1.x
keras
tensorflow < 2.0
astor astor
cloudpickle
colorama
filelock
hyperopt == 0.1.2 hyperopt == 0.1.2
json_tricks >= 3.15.5 json_tricks >= 3.15.5
numpy < 1.22 ; python_version < "3.8"
numpy ; python_version >= "3.8"
pandas
prettytable
psutil psutil
PythonWebHDFS
pyyaml >= 5.4 pyyaml >= 5.4
requests requests
responses responses
schema schema
scikit-learn >= 0.24.1
scipy < 1.8 ; python_version < "3.8"
scipy ; python_version >= "3.8"
typeguard typeguard
PythonWebHDFS
colorama
scikit-learn >= 0.24.1 ; python_version >= "3.7"
scikit-learn < 1.0 ; python_version < "3.7"
websockets >= 10.1 ; python_version >= "3.7"
websockets <= 10.0 ; python_version < "3.7"
filelock ; python_version >= "3.7"
filelock < 3.4 ; python_version < "3.7"
prettytable
cloudpickle
dataclasses ; python_version < "3.7"
typing_extensions ; python_version < "3.8" typing_extensions ; python_version < "3.8"
numpy < 1.19.4 ; sys_platform == "win32" websockets >= 10.1
numpy < 1.20 ; sys_platform != "win32" and python_version < "3.7"
numpy ; sys.platform != "win32" and python_version >= "3.7"
scipy < 1.6 ; python_version < "3.7"
scipy ; python_version >= "3.7"
pandas < 1.2 ; python_version < "3.7"
pandas ; python_version >= "3.7"
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
# please follow the logic in setup.py. # please follow the logic in setup.py.
# SMAC # SMAC
ConfigSpaceNNI ConfigSpaceNNI>=0.4.7.3
smac4nni smac4nni
# BOHB # BOHB
ConfigSpace==0.4.11 ConfigSpace>=0.4.17
statsmodels==0.12.0 statsmodels==0.12.0
# PPOTuner # PPOTuner
......
pip pip < 21.4
wheel setuptools < 61
setuptools wheel < 0.38
...@@ -12,7 +12,7 @@ stages: ...@@ -12,7 +12,7 @@ stages:
steps: steps:
- task: UsePythonVersion@0 - task: UsePythonVersion@0
inputs: inputs:
versionSpec: 3.8 versionSpec: 3.9
displayName: Configure Python version displayName: Configure Python version
- script: | - script: |
sudo apt-get install -y pandoc sudo apt-get install -y pandoc
...@@ -56,7 +56,7 @@ stages: ...@@ -56,7 +56,7 @@ stages:
steps: steps:
- task: UsePythonVersion@0 - task: UsePythonVersion@0
inputs: inputs:
versionSpec: 3.8 versionSpec: 3.9
displayName: Configure Python version displayName: Configure Python version
- script: | - script: |
sudo apt-get remove swig -y sudo apt-get remove swig -y
...@@ -237,7 +237,7 @@ stages: ...@@ -237,7 +237,7 @@ stages:
steps: steps:
- task: UsePythonVersion@0 - task: UsePythonVersion@0
inputs: inputs:
versionSpec: 3.6 versionSpec: 3.7
displayName: Configure Python version displayName: Configure Python version
- task: NodeTool@0 - task: NodeTool@0
...@@ -271,21 +271,23 @@ stages: ...@@ -271,21 +271,23 @@ stages:
- script: | - script: |
set -e set -e
python -m pip install -U -r dependencies/setup.txt cd dependencies
python -m pip install -r dependencies/develop.txt python -m pip install -U -r setup.txt
# FIXME: Version resolving is a complete mess. Now it works magically.
python -m pip install numpy==1.21.5
python -m pip install -r develop.txt
python -m pip install -r required.txt
python -m pip install -r required_extra.txt
python -m pip install -r recommended_legacy.txt
python -m pip install numpy==1.21.5
python -m pip install pytorch-lightning==1.5.9
echo "##vso[task.setvariable variable=PATH]${HOME}/.local/bin:${PATH}" echo "##vso[task.setvariable variable=PATH]${HOME}/.local/bin:${PATH}"
displayName: Install Python tools displayName: Install Python dependencies
- script: | - script: |
python setup.py develop python setup.py develop
displayName: Install NNI displayName: Install NNI
- script: |
set -e
python -m pip install -r dependencies/recommended_legacy.txt
python -m pip install -e .[SMAC,BOHB,PPOTuner,DNGO]
displayName: Install extra dependencies
# Need del later # Need del later
- script: | - script: |
set -e set -e
...@@ -313,7 +315,7 @@ stages: ...@@ -313,7 +315,7 @@ stages:
- job: macos - job: macos
pool: pool:
vmImage: macOS-10.15 vmImage: macOS-latest
variables: variables:
PIP_CACHE_DIR: $(Pipeline.Workspace)/.pip PIP_CACHE_DIR: $(Pipeline.Workspace)/.pip
YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn
...@@ -322,7 +324,7 @@ stages: ...@@ -322,7 +324,7 @@ stages:
steps: steps:
- task: UsePythonVersion@0 - task: UsePythonVersion@0
inputs: inputs:
versionSpec: 3.8 versionSpec: 3.9
displayName: Configure Python version displayName: Configure Python version
- task: NodeTool@0 - task: NodeTool@0
...@@ -394,7 +396,7 @@ stages: ...@@ -394,7 +396,7 @@ stages:
- job: windows - job: windows
pool: pool:
vmImage: windows-2019 vmImage: windows-latest
variables: variables:
PIP_CACHE_DIR: $(Pipeline.Workspace)/.pip PIP_CACHE_DIR: $(Pipeline.Workspace)/.pip
YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn
...@@ -403,7 +405,7 @@ stages: ...@@ -403,7 +405,7 @@ stages:
steps: steps:
- task: UsePythonVersion@0 - task: UsePythonVersion@0
inputs: inputs:
versionSpec: 3.8 versionSpec: 3.9
displayName: Configure Python version displayName: Configure Python version
- task: NodeTool@0 - task: NodeTool@0
......
...@@ -117,7 +117,7 @@ def _setup(): ...@@ -117,7 +117,7 @@ def _setup():
data_files = _get_data_files(), data_files = _get_data_files(),
python_requires = '>=3.6', python_requires = '>=3.7',
install_requires = _read_requirements_txt('dependencies/required.txt'), install_requires = _read_requirements_txt('dependencies/required.txt'),
extras_require = { extras_require = {
'SMAC': _read_requirements_txt('dependencies/required_extra.txt', 'SMAC'), 'SMAC': _read_requirements_txt('dependencies/required_extra.txt', 'SMAC'),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment