Skip to content

fix: PYAUTO_DISABLE_JAX env var was being overridden#425

Merged
Jammy2211 merged 1 commit intomainfrom
feature/fix-jax-disable-override
Apr 7, 2026
Merged

fix: PYAUTO_DISABLE_JAX env var was being overridden#425
Jammy2211 merged 1 commit intomainfrom
feature/fix-jax-disable-override

Conversation

@Jammy2211
Copy link
Copy Markdown
Collaborator

Summary

AnalysisDataset.__init__ had self._use_jax = use_jax which overwrote the env var check in Analysis.__init__. This meant PYAUTO_DISABLE_JAX=1 had no effect — JAX JIT compilation still ran, adding ~3.5s per likelihood evaluation during smoke tests.

Fix: apply the env var check before passing use_jax to super(), and remove the stale override (its comment said "Can be deleted after relevant AutoFIT PR merged" — PR #1184 is now merged).

API Changes

None — bug fix only.

Test Plan

  • All 245 PyAutoLens tests pass
  • imaging/modeling.py search.fit: 5.9s → 0.6s

🤖 Generated with Claude Code

…x assignment

AnalysisDataset.__init__ had `self._use_jax = use_jax` at line 112
which overwrote the env var check in Analysis.__init__. This meant
PYAUTO_DISABLE_JAX=1 had no effect — JAX JIT compilation still ran,
adding ~3.5s of overhead per likelihood evaluation.

Fix: apply the env var check at the top of AnalysisDataset.__init__
before passing use_jax to super(). Remove the stale override (its
comment said "Can be deleted after relevant AutoFIT PR merged" —
PR #1184 is now merged).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Jammy2211 Jammy2211 merged commit d6df5c9 into main Apr 7, 2026
2 checks passed
@Jammy2211 Jammy2211 deleted the feature/fix-jax-disable-override branch April 7, 2026 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant