-
Notifications
You must be signed in to change notification settings - Fork 26
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
Objective deriv_mode
using thing.dim_x
results in different Jacobian size
#1276
Comments
And probably another related issue is that if we have a single objective, the deriv mode being blocked or batched shouldn't cause a difference, right? If so, we may need an additional logic for set_derivatives to use batched since it is more suited for jac_chunk_size's checks. |
hm, what is the error with the ATF one? |
This one, errorif(
self._jac_chunk_size not in ["auto", None]
and self._deriv_mode == "blocked",
ValueError,
"'jac_chunk_size' was passed into ObjectiveFunction, but the "
"ObjectiveFunction is using 'blocked' deriv_mode, so sub-objective "
"'jac_chunk_size' are used to compute each sub-objective's Jacobian, "
"`ignoring the ObjectiveFunction's 'jac_chunk_size'.",
) The set resolution and added Poincare parameters make the I would try to change where to give the |
How does adding poincare parameters cause the mode to change to rev? the dim_x of the objective is only the Rlmn Zlmn lambda LMN, and the dimf is set by the grid size? Maybe these shuld be warnings though instead of error, I dont like that it can pop up like this |
No, |
I think this is because it uses |
I see a few different cases:
What do we want the behavior to be for the combos marked above? |
Yeah, what I mean is if user doesn't specify |
Possible fix:
I think this avoids any explicit conflicts, and makes the default of "auto/auto" generally pretty efficient/smart |
I am fine with this comment above |
The
deriv_mode
of each objective is decided by comparing the objectivesdim_f
to the half of thedim_x
of the thing it is optimizing. After merging #1052 to the Poincare branch, I realized that the extra Poincare variables switch some objectives fromfwd
torev
mode auto-diff which is probably ok, but I had to removejac_chunk_size
argument fromtest_ATF_results
since it was triggering one of the errors related tojac_chunk_size
andderiv_mode
consistencies.Any thoughts on this?
The text was updated successfully, but these errors were encountered: