Skip to content

feat: add skip_latents() to test_mode helpers#109

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/test-mode-skip-latents
May 24, 2026
Merged

feat: add skip_latents() to test_mode helpers#109
Jammy2211 merged 1 commit into
mainfrom
feature/test-mode-skip-latents

Conversation

@Jammy2211
Copy link
Copy Markdown
Collaborator

Summary

Adds a skip_latents() helper to autoconf/test_mode.py, mirroring the existing skip_visualization() / skip_checks() pattern. Returns True when any PYAUTO_TEST_MODE level is active (test-mode fits mock the underlying samples, so latent values are not meaningful) and can also be triggered independently via PYAUTO_SKIP_LATENTS=1 for real-mode fits where the user wants to bypass the post-fit compute_latent_samples pass.

Consumed by PyAutoFit's SearchUpdater._compute_latent_samples short-circuit (PyAutoLabs/PyAutoFit#1294). Tracking issue: PyAutoLabs/PyAutoFit#1294.

API Changes

Added autoconf.test_mode.skip_latents() returning a bool. No other surface affected — purely additive.

See full details below.

Test Plan

  • python -m pytest test_autoconf/ passes (95/95).
  • Downstream PyAutoFit consumer test (test_autofit/non_linear/search/test_updater.py) imports and uses it cleanly.
Full API Changes (for automation & release notes)

Added

  • autoconf.test_mode.skip_latents() -> bool — returns is_test_mode() or os.environ.get("PYAUTO_SKIP_LATENTS", "0") == "1". Composes the existing is_test_mode() trigger with a new PYAUTO_SKIP_LATENTS env-var override.

Removed / Renamed / Changed

None.

Migration

None. Existing callers of is_test_mode(), skip_visualization(), skip_checks(), skip_fit_output() are unaffected.

🤖 Generated with Claude Code

New env-var-gated helper alongside skip_visualization() / skip_checks().
Returns True when any PYAUTO_TEST_MODE level is active, or when
PYAUTO_SKIP_LATENTS=1 is set explicitly. Consumed by PyAutoFit's
SearchUpdater._compute_latent_samples short-circuit (PyAutoLabs/PyAutoFit#1294).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label May 24, 2026
@Jammy2211 Jammy2211 merged commit 9cccd0e into main May 24, 2026
6 checks passed
@Jammy2211 Jammy2211 deleted the feature/test-mode-skip-latents branch May 24, 2026 13:22
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