Commit 3185f02
authored
ci: install pinned torch before requirements-ci.txt on macOS (#19342)
### Summary
`setup-macos.sh` runs `install_pip_dependencies` before
`install_pytorch_and_domains`. That order lets torchsr's transitive
torch dep get pulled from PyPI before the pinned source-built or
S3-cached torch lands; `install_pytorch_and_domains` then overwrites the
wrong-source torch.
The overwrite is small in the current state, but the same race forced
--no-cache-dir`. That cascaded reinstalls of every torch transitive dep,
pushed the macOS unittest past its 60-minute timeout, until #19334
reverted it.
Reorder so `install_pip_dependencies` runs after
`install_pytorch_and_domains`. With torch already at the pinned version,
torchsr's dep is satisfied and pip skips re-downloading. Removes the
structural footgun so any future re-land of centralized torch install
does not need `--force-reinstall`.
Also rewrite two adjacent comments:
- Add a comment above `install_pytorch_and_domains` recording the
ordering rationale.
- Drop the now-misleading "We build PyTorch from source here" comment
that drifted above `install_executorch`; replace with one explaining why
`install_executorch --use-pt-pinned-commit` is correct (torch is already
installed).
Authored with Claude Code.
### Test plan
CI1 parent ada8e35 commit 3185f02
2 files changed
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
120 | 119 | | |
121 | 120 | | |
122 | 121 | | |
| |||
125 | 124 | | |
126 | 125 | | |
127 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
128 | 131 | | |
129 | 132 | | |
130 | | - | |
131 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
132 | 138 | | |
133 | 139 | | |
134 | 140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
130 | 134 | | |
131 | 135 | | |
132 | 136 | | |
| |||
0 commit comments