Skip to content

fix: keep JAX enabled for jax_assertions/ scripts in smoke runner (Cluster G)#24

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/jax-assertions-env-override
May 7, 2026
Merged

fix: keep JAX enabled for jax_assertions/ scripts in smoke runner (Cluster G)#24
Jammy2211 merged 1 commit into
mainfrom
feature/jax-assertions-env-override

Conversation

@Jammy2211
Copy link
Copy Markdown
Collaborator

Summary

scripts/jax_assertions/fitness_dispatch.py crashed with AttributeError: Analysis has no attribute _jitted_fit_from (raised by Analysis.__getattr__ at analysis.py:135) when run through the smoke runner.

Root cause: the runner's env_vars.yaml defaults set PYAUTO_DISABLE_JAX=1 globally, and Analysis.__init__ silently flips both use_jax and use_jax_for_visualization to False whenever that env var is set. fit_for_visualization then early-returns without caching _jitted_fit_from, and the next assertion (analysis._jitted_fit_from is not None) hits the library's __getattr__ which raises AttributeError.

The four scripts under scripts/jax_assertions/ exist specifically to assert JAX behavior. Disabling JAX for them makes their assertions vacuous at best, broken at worst.

This was Cluster G of the recent release-prep triage. The user's initial hypothesis was a library API drift (_jitted_fit_from renamed or no longer cached), but the library is actually intact — the bug is purely an env-var policy mismatch in the workspace_test runner's defaults.

Files Changed

  • config/build/env_vars.yaml — append one override block. Pattern jax_assertions/ (trailing slash, substring match per the file's convention) unsets PYAUTO_DISABLE_JAX for all four current scripts in that folder (fitness_dispatch, nested, pytrees, enable_pytrees) and any future siblings. Mirrors the existing database/scrape/general / features/assertion override patterns.

Per memory feedback_env_vars_yaml_overrides.md: fix smoke env-var conflicts via env_vars.yaml overrides, not by mutating os.environ in the script.

Test Plan

  • Reproduced pre-fix: PYAUTO_DISABLE_JAX=1 python3 scripts/jax_assertions/fitness_dispatch.pyAttributeError: Analysis has no attribute _jitted_fit_from at line 85.
  • Verified post-fix manually by emulating the runner's merged env (all other defaults present, PYAUTO_DISABLE_JAX absent) — script exits 0 with fitness_dispatch: all assertions passed. The actual env_vars.yaml override is consumed by PyAutoBuild's runner; the next mega-run will exercise it end-to-end.

🤖 Generated with Claude Code

scripts/jax_assertions/fitness_dispatch.py crashed with
`AttributeError: Analysis has no attribute _jitted_fit_from` when run
through the smoke runner. Root cause: env_vars.yaml `defaults` set
PYAUTO_DISABLE_JAX=1 globally, and Analysis.__init__ silently flips
both use_jax and use_jax_for_visualization to False whenever that env
var is set. fit_for_visualization then early-returns without caching
_jitted_fit_from, and the next assertion (`analysis._jitted_fit_from
is not None`) hits the library's __getattr__ which raises AttributeError.

The four scripts under jax_assertions/ exist specifically to assert
JAX behavior — disabling JAX makes their assertions vacuous. Add an
override that unsets PYAUTO_DISABLE_JAX for the jax_assertions/
pattern. Substring match covers all current siblings (fitness_dispatch,
nested, pytrees, enable_pytrees) and any future ones.

Per memory `feedback_env_vars_yaml_overrides.md` — fix smoke env-var
conflicts in env_vars.yaml, not by mutating os.environ in the script.

Verified locally: pre-fix repro is `PYAUTO_DISABLE_JAX=1 python3
scripts/jax_assertions/fitness_dispatch.py` → AttributeError. Post-fix
the runner will apply the new override and run the script with
PYAUTO_DISABLE_JAX unset; manually emulating that env (the other
defaults applied, DISABLE_JAX absent) the script exits 0 with
"fitness_dispatch: all assertions passed".

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label May 7, 2026
@Jammy2211 Jammy2211 merged commit 5d80674 into main May 7, 2026
4 checks passed
@Jammy2211 Jammy2211 deleted the feature/jax-assertions-env-override branch May 7, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-release PR queued for the next release build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant