Repository navigation
Conversation
|
I independently checked 2f1d3cf on CPU: all 176 transform tests pass. Twelve additional float32/float64 scalar/vector-event cases across three batch shapes also pass with transform caching disabled. For inputs spanning -4 to 3, inverse recovery agrees with the input, the log Jacobian agrees with an autograd-derived derivative, and transformed log probabilities agree with that independently computed change-of-variables expression. Gradients remain finite in these cases. The checks cover ordinary negative/zero/positive outputs, not behavior near floating-point saturation at the -1 boundary. This is a focused, AI-assisted check, not full-suite or GPU validation or maintainer approval. |
This branch has not been deployed
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.
Fixes #2806.
ELU maps the real line to
(-1, infinity), butELUTransformdeclares positive-only support. As a result,TransformedDistribution(..., validate_args=True).log_prob()rejects valid negative and zero outputs. Set the codomain togreater_than(-1.0)so distribution validation follows the transform's range.The regression tests cover the open lower boundary, float32/float64, batching, scalar/vector events, and log probabilities against the change-of-variables formula. All 14 new cases fail on unchanged
dev.Validation on Python 3.12.11 and PyTorch 2.14.1, CPU:
pytest tests/distributions/test_transforms.py -q: 176 passed (162 passed before the change).make formatandmake lint: passed, including mypy across 553 source files.make doctest: 75 passed.make docs: reached rendering but failed because the local Graphvizneatoexecutable is unavailable. GPU and full-project tests were not run locally.