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

add/update type hints for JAX wrapper of adjoint solver #2190

Merged
merged 2 commits into from
Aug 11, 2022

Conversation

oskooi
Copy link
Collaborator

@oskooi oskooi commented Aug 8, 2022

This PR adds new and also updates existing type hints for all functions which make up the JAX wrapper of the adjoint solver. Several of these changes are necessary because #1855 modified the API for meep._get_gradients replacing the forward and adjoint field arguments of type numpy.ndarray with meep.DftFields.

The function gather_design_region_fields is removed because it is no longer used.

cc @ianwilliamson

@codecov-commenter
Copy link

codecov-commenter commented Aug 8, 2022

Codecov Report

Merging #2190 (c4b4cb6) into master (2aa9164) will increase coverage by 0.15%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #2190      +/-   ##
==========================================
+ Coverage   73.09%   73.25%   +0.15%     
==========================================
  Files          17       17              
  Lines        4906     4894      -12     
==========================================
- Hits         3586     3585       -1     
+ Misses       1320     1309      -11     
Impacted Files Coverage Δ
python/adjoint/utils.py 93.24% <100.00%> (+11.84%) ⬆️
python/adjoint/wrapper.py 98.46% <100.00%> (ø)

@stevengj
Copy link
Collaborator

Since @ianwilliamson is okay with this PR, LGTM.

@stevengj stevengj merged commit ea43f83 into NanoComp:master Aug 11, 2022
@oskooi oskooi deleted the jax_wrapper_fixes branch August 11, 2022 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants