fix: keep JAX enabled for jax_assertions/ scripts in smoke runner (Cluster G)#24
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scripts/jax_assertions/fitness_dispatch.pycrashed withAttributeError: Analysis has no attribute _jitted_fit_from(raised byAnalysis.__getattr__atanalysis.py:135) when run through the smoke runner.Root cause: the runner's env_vars.yaml
defaultssetPYAUTO_DISABLE_JAX=1globally, andAnalysis.__init__silently flips bothuse_jaxanduse_jax_for_visualizationtoFalsewhenever that env var is set.fit_for_visualizationthen early-returns without caching_jitted_fit_from, and the next assertion (analysis._jitted_fit_from is not None) hits the library's__getattr__which raisesAttributeError.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_fromrenamed 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. Patternjax_assertions/(trailing slash, substring match per the file's convention) unsetsPYAUTO_DISABLE_JAXfor all four current scripts in that folder (fitness_dispatch,nested,pytrees,enable_pytrees) and any future siblings. Mirrors the existingdatabase/scrape/general/features/assertionoverride patterns.Per memory
feedback_env_vars_yaml_overrides.md: fix smoke env-var conflicts via env_vars.yaml overrides, not by mutatingos.environin the script.Test Plan
PYAUTO_DISABLE_JAX=1 python3 scripts/jax_assertions/fitness_dispatch.py→AttributeError: Analysis has no attribute _jitted_fit_fromat line 85.PYAUTO_DISABLE_JAXabsent) — script exits 0 withfitness_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