Commit 8676782
Pages: pre-warm matplotlib font cache in parent before spawning subprocesses
The font cache build takes 30-60 s on a fresh CI runner inside
`import matplotlib.pyplot as plt`. When this long initialization coincides
with Metal GPU loading (_m1_gpu_ops) in the same process it causes SIGSEGV.
Fix: run the matplotlib import and a dummy figure in the parent (orchestrator)
process which never touches Metal. The cache is written to disk so every
notebook subprocess finds it already built, making plt's import instant and
eliminating the Metal ↔ matplotlib initialization overlap.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 2e7c6d4 commit 8676782
1 file changed
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
163 | 179 | | |
164 | 180 | | |
165 | 181 | | |
| |||
0 commit comments