Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update numpy to 1.18 #2758

Merged
merged 2 commits into from
Dec 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,19 +212,20 @@ def run(self):
'onnxruntime': data + examples + extra,
},
py_modules=python_modules_list,
extras_require={
'backend': ['onnx>=1.2.3'],
'numpy': ['numpy>=1.15.0']
},
install_requires=[
'onnx>=1.2.3',
'numpy>=1.18.0,<2'
],
entry_points= {
'console_scripts': [
'onnxruntime_test = onnxruntime.tools.onnxruntime_test:main',
]
},
classifiers=[
'Development Status :: 4 - Beta',
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python',
'Programming Language :: Python :: 3 :: Only',
Expand Down
2 changes: 1 addition & 1 deletion tools/ci_build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def install_ubuntu_deps(args):

def install_python_deps(numpy_version=""):
dep_packages = ['setuptools', 'wheel', 'pytest']
dep_packages.append('numpy=={}'.format(numpy_version) if numpy_version else 'numpy>=1.15.0')
dep_packages.append('numpy=={}'.format(numpy_version) if numpy_version else 'numpy>=1.18.0')
dep_packages.append('sympy>=1.1')
dep_packages.append('packaging')
run_subprocess([sys.executable, '-m', 'pip', 'install', '--trusted-host', 'files.pythonhosted.org'] + dep_packages)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ jobs:
workingFolder: '$(Build.BinariesDirectory)'

- script: |
python -m pip install -q pyopenssl setuptools wheel numpy
python -m pip install -q pyopenssl setuptools wheel numpy==1.18
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you also need to update C api packaging pipeline and other pipelines?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They don't matter. They can use any numpy version.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We all need to make sure the numpy version specified in "azure-pipelines-py-packaging.yml" matches with the number in "/setup.py"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In future It might still make sense to move every pipeline to the same numpy version to avoid any confusion. Current change looks good for now.


workingDirectory: '$(Build.BinariesDirectory)'
displayName: 'Install python modules'
Expand Down Expand Up @@ -227,7 +227,7 @@ jobs:


- script: |
python -m pip install -q pyopenssl setuptools wheel numpy
python -m pip install -q pyopenssl setuptools wheel numpy==1.18
workingDirectory: '$(Build.BinariesDirectory)'
displayName: 'Install python modules'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,35 +1,6 @@
variables:
DisableContribOps: ON
TestDataUrlNoContribOps : https://onnxruntimetestdata.blob.core.windows.net/models/20181210.zip

jobs:
- job: MacOS_CI_Dev
pool:
vmImage: 'macOS-10.13'
steps:
- template: templates/set-test-data-variables-step.yml
- task: CmdLine@2
displayName: 'Download azcopy'
inputs:
script: |
curl -so azcopy.tar.gz -L 'https://aka.ms/downloadazcopy-v10-mac'
tar -zxvf azcopy.tar.gz --strip 1
workingDirectory: $(Build.BinariesDirectory)
- task: PythonScript@0
displayName: 'Download test data'
inputs:
scriptPath: '$(Build.SourcesDirectory)/tools/ci_build/github/download_test_data.py'
arguments: --test_data_url $(TestDataUrlNoContribOps) --azure_region centralus --build_dir $(Build.BinariesDirectory)
pythonInterpreter: '/usr/local/bin/python3'
workingDirectory: $(Build.BinariesDirectory)
- script: |
sudo python3 -m pip install numpy==1.15.0
sudo xcode-select --switch /Applications/Xcode_10.app/Contents/Developer
python3 $(Build.SourcesDirectory)/tools/ci_build/build.py --build_dir $(Build.BinariesDirectory) --enable_onnx_tests --skip_submodule_sync --parallel --build_shared_lib --disable_contrib_ops --config Debug Release
displayName: 'Build and Test OnnxRuntime lib for MacOS'

- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
condition: and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI'))

- template: templates/clean-agent-build-directory-step.yml
- template: templates/mac-ci.yml
parameters:
AgentPool : 'Hosted macOS High Sierra'
DoNugetPack: 'false'
BuildCommand: 'python3 $(Build.SourcesDirectory)/tools/ci_build/build.py --use_openmp --build_dir $(Build.BinariesDirectory) --build_wheel --skip_submodule_sync --parallel --build_shared_lib --disable_contrib_ops --enable_onnx_tests --config Debug RelWithDebInfo'
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
numpy==1.15.0
numpy==1.18.0
requests==2.21.0
scipy
mypy
Expand Down