Skip to content

Commit 2214aab

Browse files
authored
[Build] skip python tests when python version is 3.14 (#26500)
This is a follow up change for #26397: (1) Enable python 3.14 for webgpu package (2) Skip python tests for python 3.14 just like in python cuda package pipelines. onnx package does not support python 3.14 right now, so python tests depending on onnx will fail. Example error in python package pipeline: ``` Traceback (most recent call last): File "E:\_work\1\s\build\Release\Release\onnx_backend_test_series.py", line 14, in <module> import onnx ModuleNotFoundError: No module named 'onnx' ``` This is a temporary walkaround to unblock python packaging pipeline for python 3.14. We can re-enable the test after onnx next release (in a few weeks?)
1 parent 049cbdf commit 2214aab

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

tools/ci_build/github/azure-pipelines/stages/py-cpu-packaging-stage.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -177,15 +177,18 @@ stages:
177177
workingDirectory: '$(Build.ArtifactStagingDirectory)'
178178
displayName: 'unzip the package'
179179
180+
180181
- powershell: |
181-
python -m pip uninstall -y onnxruntime onnxruntime-gpu -qq
182-
Get-ChildItem -Path $(Build.ArtifactStagingDirectory)/*.whl | foreach {pip --disable-pip-version-check install --upgrade $_.fullname tabulate}
183-
Remove-Item -Recurse -Force onnxruntime
184-
if ("$(ExtraParam)" -contains "--use_azure") {
185-
$env:path="$(Build.SourcesDirectory)\build\${{ parameters.cmake_build_type }}\_deps\vcpkg-src\installed\x64-windows\bin;$(Build.SourcesDirectory)\build\${{ parameters.cmake_build_type }}\_deps\vcpkg-src\installed\x86-windows\bin;$env:path"
186-
python onnxruntime_test_python_azure.py
187-
}
188-
python onnx_backend_test_series.py
182+
if ("$(PythonVersion)" -notcontains "3.14") {
183+
python -m pip uninstall -y onnxruntime onnxruntime-gpu -qq
184+
Get-ChildItem -Path $(Build.ArtifactStagingDirectory)/*.whl | foreach {pip --disable-pip-version-check install --upgrade $_.fullname tabulate}
185+
Remove-Item -Recurse -Force onnxruntime
186+
if ("$(ExtraParam)" -contains "--use_azure") {
187+
$env:path="$(Build.SourcesDirectory)\build\${{ parameters.cmake_build_type }}\_deps\vcpkg-src\installed\x64-windows\bin;$(Build.SourcesDirectory)\build\${{ parameters.cmake_build_type }}\_deps\vcpkg-src\installed\x86-windows\bin;$env:path"
188+
python onnxruntime_test_python_azure.py
189+
}
190+
python onnx_backend_test_series.py
191+
}
189192
workingDirectory: '$(Build.SourcesDirectory)\build\${{ parameters.cmake_build_type }}\${{ parameters.cmake_build_type }}'
190193
displayName: 'Run Python Tests'
191194

tools/ci_build/github/azure-pipelines/stages/py-webgpu-packaging-stage.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ parameters:
2323
- '3.11'
2424
- '3.12'
2525
- '3.13'
26+
- '3.14'
2627

2728
stages:
2829
- ${{ each python_version in parameters.PythonVersions }}:

tools/ci_build/github/azure-pipelines/stages/py-win-webgpu-stage.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ stages:
131131
132132
- stage: Win_py_webgpu_Wheels_${{ replace(parameters.PYTHON_VERSION,'.','_') }}_Tests
133133
dependsOn: Win_py_webgpu_Wheels_${{ replace(parameters.PYTHON_VERSION,'.','_') }}_Build
134+
# Skip this stage for Python 3.14 for now until onnx package support python 3.14.
135+
condition: and(succeeded(), ne('${{ parameters.PYTHON_VERSION }}', '3.14'))
134136
jobs:
135137
- job: Win_py_webgpu_Wheels_${{ replace(parameters.PYTHON_VERSION,'.','_') }}_Tests
136138
workspace:

0 commit comments

Comments
 (0)