Repository navigation
Commit 813145d
authored
Skip the Core ML wheel test on Python 3.14 (pytorch#21841)
## The problem
The Python 3.14 wheel jobs on Linux x86_64 and macOS fail in their smoke
test with:
```
ModuleNotFoundError: No module named 'coremltools'
```
The reason is that the wheel does not declare `coremltools` on Python
3.14, because that release
publishes no build for it. The declaration in `setup.py` already says
so:
```
coremltools==9.0; (platform_system == 'Darwin' or platform_system == 'Linux') and python_version < '3.14'
```
But the two wheel smoke tests run a Core ML case unconditionally:
```
.ci/scripts/wheel/test_linux.py backend=Backend.CoreMlExportOnly
.ci/scripts/wheel/test_macos.py backend=Backend.CoreMlExportAndTest
```
So on 3.14 that case fails on the missing import rather than testing
Core ML at all. The other
platforms are unaffected, because no other wheel test script runs a Core
ML case.
The pin cannot simply be raised. The first `coremltools` release with
any Python 3.14 file is a
development release, which pip will not choose unless it is explicitly
asked for pre-releases.
## The fix
Skip that one case on Python 3.14 and print why, leaving the rest of the
smoke test in place:
```python
if sys.version_info < (3, 14):
model_tests.append(
test_base.ModelTest(model=Model.Mv3, backend=Backend.CoreMlExportOnly)
)
else:
print("Skipping the Core ML case: coremltools has no Python 3.14 build")
```
The XNNPACK case still runs on every version, so the wheel is still
exercised on 3.14. This is the
smallest change that matches what the wheel actually installs.
## Testing
Verified:
- Read the failing job logs and confirmed the missing `coremltools`
import is what stops the test.
- Confirmed `setup.py` already excludes `coremltools` on 3.14, so the
test was asking for something
the wheel does not ship.
- Confirmed no wheel test script other than these two names a Core ML
backend, which matches the
aarch64 and Windows jobs getting past this stage.
- Both files parse, and lint and formatting are clean.
Not verified:
- A full wheel build or its smoke tests on Python 3.14.1 parent 79e3eae commit 813145d
2 files changed
Lines changed: 35 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
50 | 55 | | |
51 | 56 | | |
52 | 57 | | |
53 | | - | |
54 | | - | |
55 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
21 | 27 | | |
22 | 28 | | |
23 | 29 | | |
24 | | - | |
25 | | - | |
26 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
0 commit comments