From 6d5add3b7c8f0aa810b03006f7dff7d56d1cf3c1 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Sun, 12 Apr 2026 12:14:50 +0100 Subject: [PATCH] refactor: drop PYAUTO_DISABLE_CRITICAL_CAUSTICS in favor of PYAUTO_FAST_PLOTS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The retired env var is now a no-op — PYAUTO_FAST_PLOTS=1 handles both tight_layout skipping and critical curve/caustic overlay skipping. Co-Authored-By: Claude Opus 4.6 --- CLAUDE.md | 7 +++---- config/build/env_vars.yaml | 3 +-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 91179cce..f2cddf97 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -28,15 +28,14 @@ Jupyter notebooks mirror the scripts in `notebooks/` and use `# %%` markers to s PYAUTOFIT_TEST_MODE=1 python scripts/imaging/modeling.py ``` -**Fast smoke tests**: For maximum speed, combine test mode with small datasets and disabled critical curves: +**Fast smoke tests**: For maximum speed, combine test mode with small datasets and fast plots: ```bash -PYAUTOFIT_TEST_MODE=2 PYAUTO_WORKSPACE_SMALL_DATASETS=1 PYAUTO_DISABLE_CRITICAL_CAUSTICS=1 PYAUTO_FAST_PLOTS=1 python scripts/imaging/modeling.py +PYAUTOFIT_TEST_MODE=2 PYAUTO_WORKSPACE_SMALL_DATASETS=1 PYAUTO_FAST_PLOTS=1 python scripts/imaging/modeling.py ``` - `PYAUTO_WORKSPACE_SMALL_DATASETS=1` — caps all grids/masks to 15x15 pixels at 0.6"/px, making simulators and all downstream computations dramatically faster. Delete `dataset/` when toggling this variable. -- `PYAUTO_DISABLE_CRITICAL_CAUSTICS=1` — skips critical curve and caustic overlay computation in plots. -- `PYAUTO_FAST_PLOTS=1` — skips `plt.tight_layout()` in subplot functions, avoiding expensive matplotlib font/text metrics computation. +- `PYAUTO_FAST_PLOTS=1` — skips `plt.tight_layout()` and critical curve/caustic overlay computation in subplot functions. **Codex / sandboxed runs**: when running from Codex or any restricted environment, set writable cache directories so `numba` and `matplotlib` do not fail on unwritable home or source-tree paths: diff --git a/config/build/env_vars.yaml b/config/build/env_vars.yaml index 2853f947..f10171b2 100644 --- a/config/build/env_vars.yaml +++ b/config/build/env_vars.yaml @@ -11,9 +11,8 @@ defaults: PYAUTOFIT_TEST_MODE: "2" # 0=normal, 1=reduced iterations, 2=skip sampler (fastest) PYAUTO_WORKSPACE_SMALL_DATASETS: "1" # Cap grids/masks to 15x15, reduce MGE gaussians - PYAUTO_DISABLE_CRITICAL_CAUSTICS: "1" # Skip critical curve/caustic overlays in plots PYAUTO_DISABLE_JAX: "1" # Force use_jax=False, avoid JIT compilation overhead - PYAUTO_FAST_PLOTS: "1" # Skip tight_layout() in subplots + PYAUTO_FAST_PLOTS: "1" # Skip tight_layout() + critical curve/caustic overlays JAX_ENABLE_X64: "True" # Enable 64-bit precision in JAX NUMBA_CACHE_DIR: "/tmp/numba_cache" # Writable cache dir for numba MPLCONFIGDIR: "/tmp/matplotlib" # Writable config dir for matplotlib