Repository navigation
Commit 60f908a
committed
Keep the caller's numpy when setting up the Core ML backend
backends/apple/coreml/scripts/install_requirements.sh clones coremltools
and installs its reqs/build.pip before building the mlmodel library.
That file pins numpy==2.0.0 for Python 3.9 to 3.12, so running the script
silently downgrades numpy in the caller's environment.
pandas 3.1.0 now requires numpy>=2.0.2, so after the downgrade
`import pandas` fails, and anything that imports the ExecuTorch devtools
(for example examples/apple/coreml/scripts/export.py) breaks with
"Please upgrade numpy to >= 2.0.2". Every Core ML job in CI hits this.
Configuring and building mlmodel only needs numpy (for its include path)
and setuptools (to build the bundled kmeans1d helper). Install just those,
unpinned, so an existing numpy is left alone.
Test plan: in a fresh Python 3.12 venv with numpy 2.4.6 and pandas 3.1.0,
ran the script before and after this change.
- Before: mlmodel builds, numpy drops to 2.0.0, `import pandas` fails.
- After: mlmodel builds, the protobuf sources are copied, numpy stays
2.4.6, `import pandas` works.1 parent 6368414 commit 60f908a
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
82 | 84 | | |
83 | | - | |
| 85 | + | |
84 | 86 | | |
85 | 87 | | |
86 | 88 | | |
| |||
0 commit comments