Skip to content
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

Huge Make-Over, Version 0.0.2 #19

Merged
merged 17 commits into from
Mar 12, 2024
Merged

Huge Make-Over, Version 0.0.2 #19

merged 17 commits into from
Mar 12, 2024

Conversation

manuelbb-upb
Copy link
Owner

RBF Surrogate Models

The internals of how RBF Surrogates are constructed has been redone.
As before, the construction is based off “Derivative-Free Optimization Algorithms For Computationally Expensive Functions,” (Wild, 2009).
In the old version, I did not really care for the matrix factorizations.
Finding a poised set of points for fully-linear interpolation needs repeated QR factorizations
of the point matrix.
Afterwards, additional points are found by updating the Cholesky factorization of
some symmetric matrix product involving the RBF Gram matrix.

  • To save allocations, the QR factorizations now make use of structures similar to
    those in FastLapackInterface.
    Once I manage to make a pull request
    to avoid even more allocations, we can also make FastLapackInterface a dependency.
  • The Cholesky factorization is now updated by using the formulas from the reference,
    and the factors are used to compute the surrogate coefficients.
  • In both cases, buffers are pre-allocated to support a maximum number of interpolation
    points, and we work with views mainly.
    Such temporary buffers are stored in RBFTrainingBuffers.
  • An RBFModel now only needs RBFParameters for successful training and
    reproducible evaluation.
    Most importantly, evaluation is decoupled from the RBFDatabase!!
    In older versions, we would view into the database to query interpolation points.
    These are now copied instead, so that changes to the database don't invalidate a model.
  • With commit cc709fa
    we can thus share a database in multiple optimization runs.
  • As an aside, there is a whole new backend for RBFs, which can be used in a standalone manner, too.

For most of the RBF related changes, commit ab5cba8
is most relevant.

Other changes
  • There likely was a bug in how descent directions were computed.
    In old versions, I tried to avoid the computation of an initial steplength by making it part
    of the descent direction sub-problem, but accounting for the change in criticality measure
    did not work out well.
    Commit f1386c2
    makes things look a bit more elegant.
  • At some point in time, I messed up affine scaling. Should work now, and there is tests for it.
  • Threaded parallel execution is now supported internally (but improvised).
  • Lots of tests.
  • Changes to AbstractNonlinearOperator interface.
    A new AbstractNonlinearOperatorWrapper <: AbstractNonlinearOperator.
  • New defaults in AlgorithmOptions. Stopping based mainly on minimum radius.
  • A new return type (ReturnObject).

This is a pretty massiv commit, sorry.
There is now a near-standalone backend providing `RBFSurrogate`,
similar to Flux/Lux models.
We use the same methods for `RBFModel`.
It still needs some interface definitions, but evaluation and
construction appears to work well.
Actually did some profiling.
Enabling `T<:Number` in `RBFParamaters` and `RBFTrainingBuffers`
allows for automatic differentiation and testing with
`ForwardDiff`.
This commit introduces `@ignoraise` and `@ignorebreak` to propagate
objects of type `AbstractStoppingCriterion`.
The need arose in handling stopping based on maximum number of
function evaluations.
The tests were broken and log messages wrong.
I have also made the `check_num_calls` function a bit simpler, but
the interface does not seem ideal yet.
Now intersecting polyhedron before backtracking.
Additionally: Simplication(?) of some types.
This required new wrappers.
@manuelbb-upb manuelbb-upb merged commit 54e6f02 into main Mar 12, 2024
1 check passed
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