diff --git a/config/build/env_vars_release.yaml b/config/build/env_vars_release.yaml new file mode 100644 index 0000000..0bf4795 --- /dev/null +++ b/config/build/env_vars_release.yaml @@ -0,0 +1,71 @@ +# Per-script environment variable configuration for the RELEASE-FIDELITY +# validation run (Heart's workspace-validation.yml, mode=release — the M3 +# wheel-based release-fidelity path). Distinct from env_vars.yaml, which is the +# `smoke` profile used by the per-PR CI gate. +# +# The `release` profile runs REAL searches (PYAUTO_TEST_MODE="0" — each +# script's own n_like_max caps keep this bounded) at full resolution. +# Spec + acceptance table: PyAutoHeart/docs/release_validation.md. +# +# "defaults" are applied to every script on top of the inherited environment. +# Every var this profile cares about is given an EXPLICIT value in "defaults" +# (not left absent) — the runner only ever *sets* keys it's given, it never +# clears unrelated inherited env vars, so an absent key silently falls through +# to whatever the calling process already had (a leftover smoke-mode "1" from +# an earlier step, a developer's local shell, ...). Pinning everything here +# — including PYAUTO_SMALL_DATASETS="0" / PYAUTO_FAST_PLOTS="0" for full-res, +# real plots — makes the profile self-contained regardless of the caller's +# environment. +# +# "overrides" then only ever `set:` a var to flip it away from this profile's +# own default for specific scripts — never `unset:` a var that "defaults" +# already pins, since unsetting just re-exposes the same inherited-env gap +# `defaults` exists to close. In practice that leaves PYAUTO_DISABLE_JAX as +# the only var any override here still needs to touch (PYAUTO_TEST_MODE="0" +# and the full-res/real-plot defaults already satisfy every other unset the +# smoke profile's env_vars.yaml needs). +# +# Pattern convention (same as no_run.yaml): +# - Patterns containing '/' do a substring match against the file path +# including extension (so patterns may end in `.py` to anchor against +# the script form, e.g. `imaging/visualization.py` matches only the +# `.py` script, not `imaging/visualization_jax.py`). +# - Patterns without '/' match the file stem exactly. + +defaults: + PYAUTO_TEST_MODE: "0" # real searches (each script caps its own n_like_max) + PYAUTO_SMALL_DATASETS: "0" # full-res grids/masks (release fidelity, not smoke) + PYAUTO_FAST_PLOTS: "0" # real plots (release fidelity, not smoke) + PYAUTO_DISABLE_JAX: "1" # force use_jax=False by default; JAX-specific folders re-enable below + PYAUTO_SKIP_WORKSPACE_VERSION_CHECK: "1" # TestPyPI dev version won't match the workspace pin + 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 + +overrides: + # JAX likelihood/gradient scripts test JIT compilation — need JAX enabled + # (already full-res/real-plots by default above). + - pattern: "jax_likelihood_functions/" + set: { PYAUTO_DISABLE_JAX: "0" } + - pattern: "jax_grad/" + set: { PYAUTO_DISABLE_JAX: "0" } + # visualization_jax scripts (imaging/interferometer/ellipse/quantity) and + # modeling_visualization_jit scripts (imaging/interferometer/ellipse) + # exercise the jit-cached fit_for_visualization path and must run with JAX + # enabled — PYAUTO_DISABLE_JAX="1" would silently flip use_jax flags off. + # PYAUTO_TEST_MODE="0" (real Nautilus run) and full-res/real-plots are + # already this profile's defaults. + - pattern: "imaging/visualization_jax" + set: { PYAUTO_DISABLE_JAX: "0" } + - pattern: "ellipse/visualization_jax" + set: { PYAUTO_DISABLE_JAX: "0" } + - pattern: "ellipse/modeling_visualization_jit" + set: { PYAUTO_DISABLE_JAX: "0" } + - pattern: "imaging/modeling_visualization_jit" + set: { PYAUTO_DISABLE_JAX: "0" } + - pattern: "interferometer/visualization_jax" + set: { PYAUTO_DISABLE_JAX: "0" } + - pattern: "interferometer/modeling_visualization_jit" + set: { PYAUTO_DISABLE_JAX: "0" } + - pattern: "quantity/visualization_jax" + set: { PYAUTO_DISABLE_JAX: "0" }