symforce icon indicating copy to clipboard operation
symforce copied to clipboard

API of `Codegen.with_jacobians` is confusing

Open aaron-skydio opened this issue 2 years ago • 1 comments

It's pretty unintuitive IMO that with_jacobians defaults to all the inputs, but the first output. I'm honestly not sure why we did this - maybe because sometimes the second output is is_valid? Even when writing this I initially wrote this issue description backwards assuming it was just the first input (because the last input is often epsilon). I think it's probably more confusing to just include the first one, and we should default to all?

Example: https://colab.research.google.com/drive/1Jm3pkngrmUxxJ5wbzBlAEJI6ERhliRTk?usp=sharing

aaron-skydio avatar Feb 25 '23 04:02 aaron-skydio

Another note here:

Also, I gave output_names which I figured would mean that those outputs get generated.

aaron-skydio avatar Feb 27 '23 21:02 aaron-skydio