Repository navigation
fix(latent): report the exceptions the latent engine swallows (PyAutoLens#732) - #1600
Merged
Merged
Conversation
…Lens#732) `latent_samples_from` turns a latent function that raises into a NaN row so one bad sample cannot abort the batch. It did so silently: when the function raised on every sample (the Euclid `vis_lp` case -- a `jax.jit` trace failure on the model's assertion check), the only symptom was "no finite latent samples remained after masking" with the cause lost. Count the per-sample failures and keep the first traceback; after the batch warn "raised on N of M samples" with that traceback, and when every sample raised say the latent function is broken for this model rather than blaming the samples. Masking behaviour is unchanged. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FFSFgEBiZc7kTRutfK1RsN
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
Companion to PyAutoLabs/PyAutoLens#734 (issue PyAutoLabs/PyAutoLens#732).
latent_samples_fromturns a latent function that raises into a NaN row so one bad sample cannot abort the batch. It did so silently: on the Euclidvis_lpstage of RAL job 342398 the function raised on every sample (ajax.jittrace failure on the model's assertion check), every row became NaN, and the only symptom was "no finite latent samples remained after masking" with the cause lost. The masking itself was not at fault: it already drops an all-NaN column and greedily salvages anti-correlated NaNs.The engine now counts the per-sample failures and keeps the first traceback. After the batch it warns "raised on N of M samples" with that traceback, and when every sample raised it says the latent function is broken for this model rather than blaming the samples. Masking behaviour is unchanged.
API Changes
None — internal changes only (log output of
latent_samples_from).Test Plan
test_new_path_skips_arbitrary_exception_samplesnow asserts the warning carries the count and the exception texttest_every_sample_raising_names_the_cause_instead_of_a_blank_block— every sample raising returnsNoneand the warning names the every-sample case with the tracebackmain: 2539 passed, 25 skippedFull API Changes (for automation & release notes)
Changed Behaviour
autofit.non_linear.analysis.latent.latent_samples_from— logs a warning with the failure count and first traceback when the latent function raised on any sample; the "no finite latent samples remained" warning names the every-sample caseGenerated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code
https://claude.ai/code/session_01FFSFgEBiZc7kTRutfK1RsN
Generated by Claude Code