-
Notifications
You must be signed in to change notification settings - Fork 9
fix: ensure bounds vmaps as best as possible, more equinox errors, types for __eq__, _BoundsD/I
#250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
beckermr
wants to merge
77
commits into
main
Choose a base branch
from
bounds-fix-again-all-static
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
fix: ensure bounds vmaps as best as possible, more equinox errors, types for __eq__, _BoundsD/I
#250
Changes from 16 commits
Commits
Show all changes
77 commits
Select commit
Hold shift + click to select a range
68c6938
fix: redo bounds again for dynamic usages
beckermr 9d9dc80
style: please the dog
beckermr 956f778
fix: only apply ~ to array bool
beckermr 03c7869
fix: try dynamic children
beckermr 231fdb2
fix: ensure bounds iuncludes tests are done properly
beckermr 97b8823
fix: cast in a different way
beckermr 997dadf
fix: finish dynamic bounds impl
beckermr 0774b6a
fix: be sure to test everything
beckermr 80f7327
fix: get bools right
beckermr 9012a3e
fix: wrong tracing branch; remove test
beckermr 1abee57
refactor: only need one of these
beckermr 6718b24
Apply suggestion from @beckermr
beckermr f8d2c00
Apply suggestion from @beckermr
beckermr 2b7634f
Apply suggestion from @beckermr
beckermr e2a4fac
test: update to latest test submodule
beckermr 93eb30f
fix: ensure we handle branches on bounds eq properly
beckermr e44d8df
fix: this needs to be a float
beckermr ef586a3
fix: ensure we can FFT OK
beckermr 618e137
Update jax_galsim/bounds.py
beckermr 01f893c
Update jax_galsim/bounds.py
beckermr 9d6f2fa
fix: use latest submodule
beckermr 13e0266
test: update to latest submodule
beckermr 2a9c0e7
fix: use to_galsim for fpacking
beckermr ac4e000
fix: do not convert all bounds props to arrays
beckermr 004ada8
fix: put back variable pytree def
beckermr 7f97f11
fix: make sure to send fits headers to galsim
beckermr a5fc11e
Apply suggestion from @beckermr
beckermr a0d0ba6
Merge branch 'typing-inits-cleanup' into bounds-fix-again-all-static
beckermr 996a5fb
Merge branch 'typing-inits-cleanup' into bounds-fix-again-all-static
beckermr 2143616
Merge branch 'main' into bounds-fix-again-all-static
beckermr fea3aec
fix: add back isStatic method
beckermr 1a8f579
test: ensure api tests are correct
beckermr 053de86
style: remove extra blank space changes
beckermr 51efa74
Apply suggestion from @beckermr
beckermr cb9d084
Apply suggestion from @beckermr
beckermr 63fe4b3
Apply suggestion from @beckermr
beckermr d0aab7e
fix: allow python bool for static bounds eq
beckermr 9f99b92
fix: start on eq using jax bool values in most cases
beckermr 0485a14
Apply suggestion from @beckermr
beckermr f642c26
fix: remove extra prints
beckermr f3d8e25
Merge branch 'bounds-fix-again-all-static' of https://github.com/GalS…
beckermr 7d176a7
fix: return JAX bools for rest of things
beckermr 1bf4a5d
fix: bool conversion in pos comp
beckermr 4703099
fix: bool conversion in pos comp
beckermr de2bb72
test: update to latest submodule
beckermr 29df9c3
doc: add docs
beckermr 2d53ab0
doc: be a bit more specific
beckermr 1c94cf3
fix: dead code
beckermr 95f0ae9
test: add test of bool eq api
beckermr 0d07661
test: add test of bool eq api
beckermr dea6915
test: add tests of bounds and vmap
beckermr 1671b37
test: add tests of bounds and vmap
beckermr 946958c
Apply suggestion from @beckermr
beckermr 860a419
test: more tests for bounds and vmap
beckermr f312d87
Apply suggestion from @beckermr
beckermr 8e7280f
test: ensure we have proper logic here
beckermr a9ef07f
Apply suggestions from code review
beckermr 401e540
doc: clarify
beckermr 0a1ddd1
test: more tests for bnds int and vmap
beckermr aa8d587
test: add tests for type conversion
beckermr 4922f21
test: more tests for bounds set
beckermr 2d48748
test: fix bounds api tests
beckermr 64af33a
fix: sharpen tests
beckermr a7efe2d
doc: add comment
beckermr eb2748a
fix: rename for clarity
beckermr 215b412
test: add tests of includes and simpler bounds init
beckermr 863a99e
test: run faster?
beckermr 137edd1
test: use more splits
beckermr 6a5a37d
test: fewer splits, more workers
beckermr c7348ef
test: less logging
beckermr 7b35ae8
test: try four xdist only
beckermr b71db8b
Apply suggestion from @beckermr
beckermr 642b4ae
Apply suggestion from @beckermr
beckermr caa1e42
fix: implement _BoundsD/I
beckermr 2a1a36d
Merge branch 'bounds-fix-again-all-static' of https://github.com/GalS…
beckermr d9af535
test: just a bit faster
beckermr afe868f
fix: do not cat this giant file
beckermr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| import jax | ||
| import jax.numpy as jnp | ||
| import numpy as np | ||
|
|
||
| import jax_galsim | ||
|
|
||
|
|
||
| @jax.vmap | ||
| @jax.jit | ||
| def _make_bounds_float(xmin, ymin, xmax, ymax): | ||
| bds = jax_galsim.BoundsD(xmin=xmin, ymin=ymin, xmax=xmax, ymax=ymax) | ||
| return bds, bds.isDefined() | ||
|
|
||
|
|
||
| def test_bounds_jax_vmap_isdefined_float(): | ||
| xmin = jnp.array([9, 10, 11, 12]) | ||
| xmax = jnp.array([12, 11, 10, 9]) | ||
| ymin = jnp.array([9, 11, 10, 12]) | ||
| ymax = jnp.array([10, 10, 10, 10]) | ||
| bds, isdef = _make_bounds_float(xmin, ymin, xmax, ymax) | ||
| np.testing.assert_array_equal(bds.isDefined(), isdef, strict=True) |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.