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

Differentiable local field projection #1822

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

yaugenst-flex
Copy link
Collaborator

@yaugenst-flex yaugenst-flex commented Jul 11, 2024

No description provided.

@yaugenst-flex yaugenst-flex self-assigned this Jul 11, 2024
@yaugenst-flex yaugenst-flex force-pushed the yaugenst-flex/autograd-farfield branch 4 times, most recently from 9e2bc35 to cecf530 Compare July 17, 2024 14:32
@tylerflex
Copy link
Collaborator

👀

@yaugenst-flex yaugenst-flex marked this pull request as ready for review July 31, 2024 20:38
@yaugenst-flex yaugenst-flex requested a review from tylerflex July 31, 2024 20:40
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.

a few comments. I'm mostly a little confused about the base.py stuff?

@yaugenst-flex yaugenst-flex force-pushed the yaugenst-flex/autograd-farfield branch 4 times, most recently from 260293e to b387268 Compare August 2, 2024 11:48
@tylerflex tylerflex linked an issue Aug 2, 2024 that may be closed by this pull request
@tylerflex tylerflex added 2.7 will go into version 2.7.* .2 labels Aug 2, 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.

Some comments.. Mostly things I thought could be refactored, renamed, simplified.

Otherwise I think it's consistent / correct. Only thing I'm not 100% sure on is in the DataArray.static property.

vals = self.values if self.values.size == 0 else np.vectorize(getval)(self.values)

will getval work if self.values is a np.ndarray of dtype=object?

otherwise feeling pretty good about it in its current state

@yaugenst-flex yaugenst-flex force-pushed the yaugenst-flex/autograd-farfield branch 3 times, most recently from 65ff9c3 to 5542fff Compare August 5, 2024 11:56
@tylerflex tylerflex added .3 and removed .2 labels Aug 5, 2024
@yaugenst-flex yaugenst-flex force-pushed the yaugenst-flex/autograd-farfield branch 3 times, most recently from 5ec140c to 2fe0315 Compare August 7, 2024 19:57
@yaugenst-flex yaugenst-flex force-pushed the yaugenst-flex/autograd-farfield branch from 2fe0315 to 5bb4a0a Compare August 14, 2024 11:11
@yaugenst-flex yaugenst-flex force-pushed the yaugenst-flex/autograd-farfield branch 3 times, most recently from de9a4ba to 3cd6ae9 Compare August 30, 2024 19:02
@yaugenst-flex yaugenst-flex force-pushed the yaugenst-flex/autograd-farfield branch 2 times, most recently from 52b3b7f to 77c5973 Compare September 3, 2024 15:25
@tylerflex tylerflex mentioned this pull request Sep 3, 2024
11 tasks
@yaugenst-flex yaugenst-flex force-pushed the yaugenst-flex/autograd-farfield branch from c770e70 to c5a5caa Compare September 4, 2024 09:04
@yaugenst-flex
Copy link
Collaborator Author

yaugenst-flex commented Sep 4, 2024

@tylerflex There are some changes to DataArray properties here. The naming and mechanics of these are probably not ideal, but since it's not user facing let's address them in the DataArray refactor? We'll end up changing most of these things anyways.
Also, #1939 lists this for 2.8rc1, should I rebase on pre/2.8? Although I think it makes sense to include this only with the gradient fixes in develop. So either as part of 2.7.3 or rebase to pre/2.8 only after develop is merged.

@tylerflex
Copy link
Collaborator

Also, #1939 lists this for 2.8rc1, should I rebase on pre/2.8? Although I think it makes sense to include this only with the gradient fixes in develop. So either as part of 2.7.3 or rebase to pre/2.8 only after develop is merged.

@momchil-flex what do you think? basically there were some changes in my (recently merged) #1923 that Yannick used in this PR. So ideally we would do another develop -> pre/2.8 merge before Yannick rebases against 2.8?

@momchil-flex
Copy link
Collaborator

@yaugenst-flex what do you think will be simplest? I'm already running notebook tests for 2.7.3 and since it's hard to tell if this PR may not have various small effects, I'd rather not include it for now. However we could merge it to develop after 2.7.3 and then eventually into pre/2.8, or we can merge develop into pre/2.8 again and then you rebase the PR. Either way it will likely only come out in 2.8.0rc1 since we may not do any other 2.7. patches, but if we did the first approach would put it in there too.

@yaugenst-flex
Copy link
Collaborator Author

@momchil-flex I think it makes sense either way to merge develop into pre/2.8 after the 2.7.3 release so we keep them somewhat in sync. I'll rebase to pre/2.8 after that, shouldn't be a problem.

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.

Looks really good! thanks @yaugenst-flex . I dont know if you want @QimingFlex to look at the field projection bits? I couldn't understand most of the physics of the operations, but did follow through the code and thought it looked good.

@yaugenst-flex
Copy link
Collaborator Author

Hey @QimingFlex, would be great if you could have a quick look at the field projection bits in this PR, I reworked some of it to more easily accomodate autograd. I did try to make sure that all of the field projection values that come out of this are still exactly the same as before, but it wouldn't hurt to have another pair of eyes on it.

@yaugenst-flex yaugenst-flex force-pushed the yaugenst-flex/autograd-farfield branch 2 times, most recently from c064c42 to 862d5b8 Compare September 9, 2024 06:09
@QimingFlex
Copy link
Contributor

QimingFlex commented Sep 10, 2024

Hi @yaugenst-flex ,looks good to me, just a few questions regarding the surface current computation.

@yaugenst-flex yaugenst-flex force-pushed the yaugenst-flex/autograd-farfield branch from 862d5b8 to 963335b Compare September 27, 2024 07:22
@yaugenst-flex yaugenst-flex force-pushed the yaugenst-flex/autograd-farfield branch from 9dbad53 to 6f6e8b8 Compare October 24, 2024 17:24
@yaugenst-flex yaugenst-flex added .6 and removed .3 labels Oct 25, 2024
@yaugenst-flex yaugenst-flex force-pushed the yaugenst-flex/autograd-farfield branch from c8cc84d to 08ca4d6 Compare October 27, 2024 19:31
@yaugenst-flex yaugenst-flex merged commit 42070df into develop Oct 28, 2024
15 checks passed
@yaugenst-flex yaugenst-flex deleted the yaugenst-flex/autograd-farfield branch October 28, 2024 08:48
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.* .6
Projects
None yet
Development

Successfully merging this pull request may close these issues.

adjoint Field projection monitor support
4 participants