Skip to content
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

JaxComplexPolySlab support #1698

Merged
merged 2 commits into from May 14, 2024
Merged

JaxComplexPolySlab support #1698

merged 2 commits into from May 14, 2024

Conversation

yaugenst-flex
Copy link

Closes #1675

Initial version of JaxComplexPolySlab. Works in principle, but still needs tests. Supports differentiation w.r.t. both vertices and slab_bounds.

@yaugenst-flex yaugenst-flex self-assigned this May 10, 2024
Copy link
Collaborator

@tylerflex tylerflex left a comment

Choose a reason for hiding this comment

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

Wow, this is looking really good! Thanks @yaugenst-flex . I think this turned out to be a lot more changes than I anticipated. So this pretty much makes JaxPolySlab dilation and sidewall operations traceable?

tidy3d/plugins/adjoint/components/geometry.py Show resolved Hide resolved
@yaugenst-flex
Copy link
Author

Wow, this is looking really good! Thanks @yaugenst-flex . I think this turned out to be a lot more changes than I anticipated. So this pretty much makes JaxPolySlab dilation and sidewall operations traceable?

Well, at least those that are used in the polyslab splitting routine, yeah. Although check_grads still fails sometimes, so there is something suspicious going on that I haven't quite figured out yet..

@tylerflex tylerflex added rc2 2nd pre-release 2.7 will go into version 2.7.* labels May 13, 2024
@yaugenst-flex yaugenst-flex force-pushed the yaugenst-flex/issue1675 branch 3 times, most recently from 8a01af0 to b64717f Compare May 13, 2024 18:36
@yaugenst-flex yaugenst-flex marked this pull request as ready for review May 14, 2024 12:21
@@ -1913,6 +1930,10 @@ def test_sidewall_angle_validator(log_capture, sidewall_angle, log_expected): #

jax_polyslab1 = JaxPolySlab(axis=POLYSLAB_AXIS, vertices=VERTICES, slab_bounds=(-1, 1))

msg = "'JaxPolySlab' does not yet perform the full adjoint gradient treatment "
for entry in td.log._static_cache:
Copy link
Collaborator

Choose a reason for hiding this comment

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

we have an assert_log_level and AssertLogLevel (context manager version) in tests/utils. But this is probably fine.

@tylerflex tylerflex merged commit 6ad528b into pre/2.7 May 14, 2024
16 checks passed
@tylerflex tylerflex deleted the yaugenst-flex/issue1675 branch May 14, 2024 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.7 will go into version 2.7.* rc2 2nd pre-release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants