Skip to content

[WIP] correct maxsense in instantiate_function #146

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

avinashresearch1
Copy link

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

Add any other context about the problem here.

@avinashresearch1
Copy link
Author

Start to fix #9

@Vaibhavdixit02 Could I ask a couple of questions on expected semantics of OptimizationFunction.

  • I see that OptimizationBase.instantiate_function constructs wrappers around f.grad etc. IIUC grad is meant to be provided by the user. For the case where sense = MaxSense, do we assume that they have provided grad, hess etc. respecting the correct sense?
  • If so, that would meanwe only need to worry about the cases where we do the AD.

It appears we need to back calculate the sol.objective for the dfifferent solvers. Some already account for MaxSense but others require explicit specification.

SciML/Optimization.jl#925

I wanted to confirm that this is what is expected.

@avinashresearch1 avinashresearch1 changed the title fix: correct maxsense in instantiate_function [WIP] correct maxsense in instantiate_function Jun 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant