Commit 511085b
fix(viz): make _compute_critical_curve_lines failures loud, not silent
The bare `except Exception: return None, None, None, None` in
_compute_critical_curve_lines silently swallowed ZeroSolver failures
during model fits, which is the root cause behind two recent viz
default reverts:
- PyAutoGalaxy abd7b717 (2026-04-19): zero_contour YAML default
reverted because critical curves silently vanished on HPC.
- PyAutoFit #1280 (2026-05-17): use_jax_for_visualization=True
default reverted because Euclid source planes wrote all-zero.
Both shared the same shape - a JAX-trace failure inside the viz
path that the broad except masked. Tighten so:
- ModuleNotFoundError (jax_zero_contour missing): silent (already
warned upstream in plot_utils).
- ValueError (no zero crossings in eigenvalue grid): silent (the
curves genuinely do not exist for the model).
- Anything else: WARNING log with exc_info=True so the next
regression of this class fails loud.
Closes PyAutoLabs/PyAutoGalaxy#433 alongside the PyAutoGalaxy
companion PR.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent ccf3f1b commit 511085b
2 files changed
Lines changed: 73 additions & 0 deletions
File tree
- autolens/imaging/plot
- test_autolens/imaging/plot
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
52 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
53 | 68 | | |
54 | 69 | | |
55 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| 6 | + | |
5 | 7 | | |
| 8 | + | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
| |||
156 | 159 | | |
157 | 160 | | |
158 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
0 commit comments