Change ORT nightly python packages' name (#22450)

### Description
Our nightly CPU python package's name is "ort-nightly" instead of
"onnxruntime". It was because of some historical reasons. Tensorflow was
like that.
Now we would prefer to make them the same.
Do this change for all nightly python packages, including CPU,
GPU(CUDA), and maybe others.


### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
This commit is contained in:
Jian Chen 2024-10-15 18:44:59 -07:00 committed by GitHub
parent a5e85a950c
commit af00a20f8a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 11 additions and 22 deletions

View file

@ -129,8 +129,6 @@ class MachineInfo:
related_packages = [
"onnxruntime-gpu",
"onnxruntime",
"ort-nightly-gpu",
"ort-nightly",
"onnx",
"transformers",
"protobuf",

View file

@ -249,11 +249,7 @@ def save_results(results, filename):
installed_packages = pkg_resources.working_set
installed_packages_list = sorted(
[
f"{i.key}=={i.version}"
for i in installed_packages
if i.key in ["ort-nightly-gpu", "ort-nightly", "onnxruntime", "onnxruntime-gpu"]
]
[f"{i.key}=={i.version}" for i in installed_packages if i.key in ["onnxruntime", "onnxruntime-gpu"]]
)
ort_pkg_name = ""

View file

@ -291,11 +291,7 @@ def save_results(results, filename):
installed_packages = pkg_resources.working_set
installed_packages_list = sorted(
[
f"{i.key}=={i.version}"
for i in installed_packages
if i.key in ["ort-nightly-gpu", "ort-nightly", "onnxruntime", "onnxruntime-gpu"]
]
[f"{i.key}=={i.version}" for i in installed_packages if i.key in ["onnxruntime", "onnxruntime-gpu"]]
)
ort_pkg_name = ""
ort_pkg_version = ""

View file

@ -1,3 +1,4 @@
#!/bin/bash
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
@ -91,7 +92,6 @@ fi
if [ "$run_install" = true ] ; then
pip uninstall --yes ort-nightly ort-gpu-nightly
pip uninstall --yes onnxruntime
pip uninstall --yes onnxruntime-gpu
if [ "$run_cpu_fp32" = true ] || [ "$run_cpu_int8" = true ]; then

View file

@ -49,7 +49,6 @@ def parse_arg_remove_string(argv, arg_name_equal):
# Any combination of the following arguments can be applied
if parse_arg_remove_boolean(sys.argv, "--nightly_build"):
package_name = "ort-nightly"
nightly_build = True
wheel_name_suffix = parse_arg_remove_string(sys.argv, "--wheel_name_suffix=")
@ -89,10 +88,10 @@ elif parse_arg_remove_boolean(sys.argv, "--use_azure"):
pass
elif parse_arg_remove_boolean(sys.argv, "--use_qnn"):
is_qnn = True
package_name = "onnxruntime-qnn" if not nightly_build else "ort-nightly-qnn"
package_name = "onnxruntime-qnn"
if is_rocm or is_migraphx:
package_name = "onnxruntime-rocm" if not nightly_build else "ort-rocm-nightly"
package_name = "onnxruntime-rocm"
# PEP 513 defined manylinux1_x86_64 and manylinux1_i686
# PEP 571 defined manylinux2010_x86_64 and manylinux2010_i686

View file

@ -216,7 +216,7 @@ jobs:
- ${{ if eq(parameters.EnablePython, true) }}:
- powershell: |
python3 -m pip uninstall -y ort-nightly-gpu ort-nightly onnxruntime onnxruntime-gpu onnxruntime-training onnxruntime-directml ort-nightly-directml -qq
python3 -m pip uninstall -y onnxruntime onnxruntime-gpu onnxruntime-training onnxruntime-directml -qq
Get-ChildItem -Path dist/*.whl | foreach {pip --disable-pip-version-check install --upgrade $_.fullname}
workingDirectory: '$(Build.BinariesDirectory)\${{ parameters.BuildConfig }}\${{ parameters.BuildConfig }}'

View file

@ -241,7 +241,7 @@ stages:
**/*.dll
- powershell: |
python -m pip uninstall -y ort-nightly-gpu ort-nightly onnxruntime onnxruntime-gpu -qq
python -m pip uninstall -y onnxruntime onnxruntime-gpu -qq
Get-ChildItem -Path $(Build.ArtifactStagingDirectory)/*.whl | foreach {pip --disable-pip-version-check install --force-reinstall --upgrade $_.fullname tabulate}
python -m pip install protobuf==3.18.1
Remove-Item -Recurse -Force onnxruntime
@ -334,7 +334,7 @@ stages:
rm -rf $(Build.BinariesDirectory)/Release/onnxruntime $(Build.BinariesDirectory)/Release/pybind11
sudo rm -f /build /onnxruntime_src
sudo ln -s $(Build.SourcesDirectory) /onnxruntime_src
python3 -m pip uninstall -y ort-nightly-gpu ort-nightly onnxruntime onnxruntime-gpu onnxruntime-training onnxruntime-directml ort-nightly-directml -qq
python3 -m pip uninstall -y onnxruntime onnxruntime-gpu onnxruntime-training onnxruntime-directml -qq
cp $(Build.SourcesDirectory)/tools/ci_build/github/linux/docker/scripts/manylinux/requirements.txt $(Build.BinariesDirectory)/requirements.txt
# Test ORT with the latest ONNX release.
sed -i "s/git+http:\/\/github\.com\/onnx\/onnx.*/onnx/" $(Build.BinariesDirectory)/requirements.txt
@ -497,7 +497,7 @@ stages:
**/*.dll
- powershell: |
python -m pip uninstall -y ort-nightly-gpu ort-nightly onnxruntime onnxruntime-gpu -qq
python -m pip uninstall -y onnxruntime onnxruntime-gpu -qq
Get-ChildItem -Path $(Build.ArtifactStagingDirectory)/*.whl | foreach {pip --disable-pip-version-check install --upgrade $_.fullname tabulate}
Remove-Item -Recurse -Force onnxruntime
python onnx_backend_test_series.py

View file

@ -241,7 +241,7 @@ stages:
continueOnError: true
- powershell: |
python -m pip uninstall -y ort-nightly-gpu ort-nightly onnxruntime onnxruntime-gpu -qq
python -m pip uninstall -y onnxruntime onnxruntime-gpu -qq
Get-ChildItem -Path $(Build.ArtifactStagingDirectory)/*.whl | foreach {pip --disable-pip-version-check install --upgrade $_.fullname tabulate}
Remove-Item -Recurse -Force onnxruntime
if ("$(ExtraParam)" -contains "--use_azure") {

View file

@ -259,7 +259,7 @@ stages:
arguments: -cpu_arch x64 -install_prefix $(Build.BinariesDirectory)\${{ parameters.cmake_build_type }}\installed -build_config ${{ parameters.cmake_build_type }}
- powershell: |
python -m pip uninstall -y ort-nightly-gpu ort-nightly onnxruntime onnxruntime-gpu -qq
python -m pip uninstall -y onnxruntime onnxruntime-gpu -qq
Get-ChildItem -Path $(Build.ArtifactStagingDirectory)/*cp${{ replace(parameters.PYTHON_VERSION,'.','') }}*.whl | foreach {pip --disable-pip-version-check install --upgrade $_.fullname tabulate}
mkdir -p $(Agent.TempDirectory)\ort_test_data
Copy-Item -Path $(Build.sourcesDirectory)/onnxruntime/test/python/onnx_backend_test_series.py -Destination $(Agent.TempDirectory)\ort_test_data