Skip to content

Conversation

@tillahoffmann
Copy link
Collaborator

Following on from #1751, this PR adds a test that the result of calling biject_to satisfies the desired constraint. It also updates the correlation matrix constraint to reduce sensitivity to numerical errors. cc @kylejcaron

Copy link
Member

@fehiepsi fehiepsi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @tillahoffmann! while you are on this transform test, could you also change the global jax arrays in this file to numpy arrays? We don't want to execute jax code before setting global information like platform or precision.

@fehiepsi fehiepsi merged commit 4dbc625 into pyro-ppl:master Mar 30, 2024
(constraints.circular, (3,)),
(constraints.complex, (3,)),
(constraints.corr_cholesky, (10, 10)),
(constraints.corr_matrix, (21,)),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tillahoffmann This test is failing in my system with jax dev. Could we relax this to 15 (which passes)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. I can send a mini PR or integrate it into #1538?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either of them sounds good to me. Thanks, Till!

@tillahoffmann tillahoffmann deleted the biject-to-test branch April 12, 2024 21:19
OlaRonning pushed a commit to aleatory-science/numpyro that referenced this pull request May 6, 2024
* Verify result of `biject_to` satisfies the constraint.

* Replace global `jax.numpy` arrays by `numpy` arrays.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants