Skip to content

Generalized Cauchy direction and box constraints#554

Open
mateuszbaran wants to merge 116 commits intomasterfrom
mbaran/gcp
Open

Generalized Cauchy direction and box constraints#554
mateuszbaran wants to merge 116 commits intomasterfrom
mbaran/gcp

Conversation

@mateuszbaran
Copy link
Member

@mateuszbaran mateuszbaran commented Nov 28, 2025

This is a WIP PR that implements the GCP idea to L-BFGS and maybe some other solvers, so that they can be used in the presence of box constraints on the Euclidean part of the manifold. The constraints are handled similarly to L-BFGS-B (although not all Euclidean tricks are applied).

TODO:

  • a full example of working with a box domain
  • code coverage

The implementation was prepared in collaboration with @paprzybysz .

@mateuszbaran mateuszbaran added enhancement WIP Work in Progress (for a pull request) labels Nov 28, 2025
@codecov
Copy link

codecov bot commented Nov 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (88c7db6) to head (a192dcc).

Additional details and impacted files
@@            Coverage Diff             @@
##            master      #554    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           91        92     +1     
  Lines         9975     10661   +686     
==========================================
+ Hits          9975     10661   +686     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mateuszbaran
Copy link
Member Author

I've generalized the GCD subsolver to handle Hyperrectangle at any position, and also potentially multiple hyperrectangles in a product manifold. This comes at a slight performance cost because now we have dynamic dispatch when accessing a component that is avoidable but only with a much more convoluted code. I'm not exactly certain this is the right call but it makes the solver more generic and harder to use wrongly.

Copy link
Member

@kellertuer kellertuer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing a few typos along the way and tightening a few parameter types along the way (I am usually a bit unsure when to type kwargs and when not.

Interesting that the *get_cost(problem, state)` did not yet exist, but sure I see points where that might be nice to have.

Besides that I read the new HZ part (but not more yet) and added a few comments.

@mateuszbaran
Copy link
Member Author

I think I've roughly addressed all recent.

@mateuszbaran
Copy link
Member Author

I have also added a simple direction-based stepsize limiting that can be used in solvers that don't approximate the Hessian to limit the stepsize.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Ready-for-Review A label for pull requests that are feature-ready

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow specifying a small positive constant as the lower limit of y-s products in QN

2 participants