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
Deprecate Function::jacobian, Function::derivative #1777
Comments
make way, casadi 4.0 is here.. |
I think we have since long moved away from |
@jgillis When this is implemented, parts of the unit tests will be obsolete. Preferred solution? Remove, refactor or replace with new unit tests? |
Note that the idea is to use the (more user-friendly) functions operating on expressions instead: MatType jacobian(const MatType &ex, const MatType &arg, bool symmetric=false); Potentially, we could change the signature for these to take a dictionary: MatType jacobian(const MatType &ex, const MatType &arg, const Dict& opts=Dict()); Then the user could set a parameter to force a particular AD mode for example: J = jacobian(f, x, {'ad':'forward'}) # Force the use of forward mode AD This feels more intuitive than setting "ad weight" parameters... |
Its fine if you purge, provided that you link to this issue. I will review |
This would be an alternative to ad_weight not a replacement? |
I think I'd like to remove "ad_weight" as a user-settable option. It would remain internally and in Callback. The only time you would use it right now is to force an AD mode, but if there is a more user-friendly way of doing that, it's no longer needed. |
@jgillis I deprecated There are so many unit tests that depend on them so just deleting them would leave the test framework severely crippled... Maybe you can have a look. There are also some examples that have not been updated to 3.0 syntax:
|
The functions for generating derivative functions in Function are currently difficult to use and, if kept, will need to have their signatures changed to align with the corresponding changes to the internal classes.
Since #1774 introduces a much easier to use and much more flexible way to generate derivatives, we can simply deprecate these functions instead of trying to update the signatures or maintain backwards compatibility. Already now, these functions are of internal character and avoided in examples.
The text was updated successfully, but these errors were encountered: