Commit Graph
3556 Commits
Author SHA1 Message Date
conradsnicta 799937bda8 rework LLM section as per mlpack
Build and Test / CPU (push) Waiting to run
Build and Test / CUDA (push) Waiting to run
Build and Test / OpenCL (push) Waiting to run
2026-02-02 01:11:15 +01:00
conradsnicta 612fd94c9c add note on code generated via LLMs 2025-12-17 05:39:34 +01:00
Ryan Curtin 30dbb05379 Add new block for next release to HISTORY.md. 2025-12-16 09:48:09 -05:00
Ryan Curtin 356be31685 Update and release version 3.11.0.
Build and Test / CPU (push) Waiting to run
Build and Test / CUDA (push) Waiting to run
Build and Test / OpenCL (push) Waiting to run
3.11.0
2025-12-16 09:48:09 -05:00
Ryan Curtin eba232499f Revert "Release version 3.11.0: "Sunny Day" (#447)" (#448)
This reverts commit db5cef9823.
2025-12-15 08:58:16 -05:00
Ryan Curtin db5cef9823 Release version 3.11.0: "Sunny Day" (#447)
* Update and release version 3.11.0.

* Add new block for next release to HISTORY.md.
2025-12-13 07:46:44 -06:00
Ranjodh SinghandRyan Curtin b5f49dc419 Implement DeltaBarDelta using refactored GradientDescent. (#440)
* Refactor GradientDescent to GradientDescentType<UpdatePolicyType, DecayPolicyType>

* Add DeltaBarDeltaUpdate

* Update Docs

* Add Tests

* Use clamp instead of find and fill

* Try to fix CI Failure

* Update History.md

* Simplify and Correct DeltaBarDelta Description

* Revert inadvertent code change

* Simplify description in optmizer docs too

* initialize isInitialized :)

* Address review suggestions

* Add MomentumDeltaBarDelta

* Change minStepSize to minGain

* Address Review Comments

* Increase test iterations to fix CI failure

* Apply suggestions from code review

Co-authored-by: Ryan Curtin <ryan@ratml.org>

* Fix a typo

---------

Co-authored-by: Ryan Curtin <ryan@ratml.org>
2025-12-11 09:26:54 -05:00
arminsch 117f8b8e75 fix missing return in aug_lagrangian (#446) 2025-11-13 09:36:14 -05:00
Ranjodh Singh b4b403e122 Fix an off by one issue affecting number of iterations in multiple optimizers (#443) 2025-11-11 05:33:12 +00:00
Ryan Curtin 9aebc1d2e4 Add new block for next release to HISTORY.md. 2025-09-30 14:02:53 -04:00
Ryan Curtin 136d8136c2 Update and release version 3.10.0.
Build and Test / CPU (push) Waiting to run
Build and Test / CUDA (push) Waiting to run
Build and Test / OpenCL (push) Waiting to run
3.10.0
2025-09-30 14:02:53 -04:00
Xiaochuan YeandRyan Curtin b22e53f3c8 Refactor calculatedObjectives in NSGA2 optimizer (#434)
* Refactor calculatedObjectives in NSGA2 optimizer

Signed-off-by: yexiaochuan <tap91624@gmail.com>

* Use Mat instead of Cube.

---------

Signed-off-by: yexiaochuan <tap91624@gmail.com>
Co-authored-by: Ryan Curtin <ryan@ratml.org>
2025-09-25 08:34:16 -04:00
Ryan Curtin a8f6e7833c Deprecate the Lambda() and Sigma() functions for AugLagrangian (#439)
* Deprecate the Lambda() and Sigma() functions for AugLagrangian.

* Add utility struct to differentiate between matrices and callbacks.

* Update HISTORY.

* Fix overload issues with LRSDP and new AugLagrangian types.

* Fix some documentation to kick off another build.  (I think there was an issue with dealgood.)

* Remove spaces to kick the build off again.
2025-09-25 08:33:51 -04:00
Ryan Curtin 9fa90f1091 Merge Bandicoot tests with other tests (#438)
* Normalize step size to the batch size used.

* Update history.

* Don't use if constexpr.

* Fix all step sizes in tests to account for new behavior.

* Retune DemonSGD tests to reduce failure probability.

* Merge Bandicoot tests into existing TEMPLATE_TEST_CASEs.

* Fix merge artifact.

* Fix compilation errors.

* Fix MOEAD test to be more robust.

* Oops, fix missing colon.

* Fix compilation issues.

* Remove arma:: for randu call.

* Try to fix AppVeyor build.

* Bump version number to fix mlpack integration build.

* Adapt FBS/FISTA/FASTA to bandicoot tests.

* Keep bandicoot implementation separate.

* Print which tests take a long time so I can prune down the runtime.

* Remove some tests that take a long long time.

* Filter out some more long-running GPU tests.
2025-09-22 13:03:14 -04:00
Ryan Curtin 37b057dce0 Add proximal gradient optimizers: FBS, FISTA, and FASTA (#427)
* Implement forward-backward splitting (FBS) and some proximal operators.

* Minor cleanups for FrankWolfe.

* Allow FunctionTest() to take instantiated functions.

* Some minor fixes to some test functions.

* Add tests for FBS and proximal operators.

* Clean up documentation.

* Add documentation for FBS to optimizers.md.

* Add some documentation about proximal operators and functions.

* Fix header guard name.

* Remove unused member.

* Some minor FBS cleanups.

* Add QuadraticFunction for testing.

* Try to clean up L1 constraint application a little bit.

* Add FISTA and tests.

* Document FISTA.

* Remove inaccurate comment.

* Clean up to match Beck and Teboulle paper instead of FASTA paper.

* Some minor efficiency cleanups.

* Add debugged and working FASTA implementation.

* Add documentation for FASTA.

* Make L1Constraint tests robust to the element type.

* Minor fixes for compilation and tests.

* Try to fix AppVeyor build.

* Bump version number to fix mlpack integration build.

* Add changelog entry for FBS/FISTA/FASTA.

* Fixes for FP16 compilation and failing tests.

* Fix compilation issue.

* Add instantiated versions of tolerances for older compilers / C++14.

* Adjust tolerances.

* Try to make MSVC happy with where values are defined vs. declared.

* Make sure that bandicoot is included if needed.
2025-09-18 09:15:57 -04:00
Ryan Curtin 8151354884 Remove deprecated functionality for ensmallen 3.x release. (#435)
* Remove deprecated functionality for the ensmallen 3.x release.

* Bump version so that anyone doing version checks gets correct details.

* Update HISTORY.md.

* Use clearer documentation for how to convert old code.

* Try to fix AppVeyor build.

* Some changes to make the IPOP-CMAES RastriginFunction test faster.
2025-09-16 14:36:08 -04:00
Ryan Curtin 308d1690c7 Fix compilation warnings. (#432) 2025-09-11 14:42:56 -04:00
Ryan Curtin a4ec8b564f Normalize step size to the batch size used (#431)
* Normalize step size to the batch size used.

* Update history.

* Don't use if constexpr.

* Fix all step sizes in tests to account for new behavior.

* Retune DemonSGD tests to reduce failure probability.

* Fix merge artifact.

* Fix MOEAD test to be more robust.
2025-09-08 20:06:05 -04:00
3b4e1e261c Test FP16 support when available with Armadillo (#426)
* Add CMake modules to find Bandicoot libraries and includes.

* Add initial GitHub Actions to build against Bandicoot and run the tests.

* 1. Add type proxies to select the right type based on the used backend and datatype.
2. Update IQN optimizer to build against Armadillo and Bandicoot.
3. Update IQN test cases to test against Armadillo and Bandicoot backend.
4. Update logisitic regression function, to support Armadillo and Bandicoot.

* Refactor CNE optimizer and tests cases to work with Armadillo and Bandicoot datatypes.

* Refactor Katyusha optimizer and tests cases to work with Armadillo and Bandicoot datatypes.

* Refactor optimizers to work with Armadillo and Bandicoot datatypes:

1. AdaBelief
2. AdaBound
3. AMSBound
4. AdaGrad
5. Adam
6. Adamax
7. AMSGrad
8. Nadam
9. Nadamax
10. OptimisticAdam
11. Eve
12. FTML
13. LBFGS
14. Lookahead
15. Padam
16. QHAdam
17. SMORMS3
18. SpaleraSGD
19. SPSA
20. SWATS
21. WNGrad
22. Yogi
23. MomentumSGD
24. NesterovMomentum
25. QuasiHyperbolic
26. SGD
27. SGDR
28. SnapshotSGDR
29. CNE
30. CMAES
31. ActiveCMAES
32. PSO
33. LBestPSO
34. MOEAD
35. AugmentedLagrangian

* Refactor optimizers to work with Armadillo and Bandicoot datatypes:
1. AdaDelta
2. AdaSqrt
3. BigBatchSGD
4. CoordinateDescent (CD)
5. GradientDescent
6. GridSearch
7. NSGA2
8. ParallelSGD

* Refactor optimizers to work with Armadillo and Bandicoot datatypes:
1. DifferentialEvolution (DE)
2. RMSProp
3. SimulatedAnnealing (SA)
4. SARAH
5. SARAH+
6. SVRG
7. BarzilaiBorweinDecay
8. DemonAdam
9. DemonSGD

* Use inverse transform sampling to replicating arma::randg sampling since randg is not supported in Bandicoot.

* Apply suggestions from code review by @rcurtin.

Co-authored-by: Ryan Curtin <ryan@ratml.org>

* Group test cases and fix indentations.

* Update optimizer reference styling.

* Add option to build against Bandicoot (by default we build against Bandicoot if found).

* Mention AugLagrangianType constructor in the optimizer documentation, that allows to use a different datatype i.e. arma::fvec or coot::fvec.

* Use data type specific element type for the bounds parameter.

* Make sure we follow the max character line limitation from the style guide.

Co-authored-by: Ryan Curtin <ryan@ratml.org>

* Remove backports for outdates armadillo versions.

* Indentation fixes.

* Indentation fixes.

* Use the correct data type during testing.

* Do not use the namespace twice.

* Test against CPU/OpenCL/CUDA backend.

* Use the correct test case type.

* We don't need Bandicoot when we test against Armadillo (CPU) backend.

* Use the correct minimal Bandicoot version.

Co-authored-by: Ryan Curtin <ryan@ratml.org>

* Comment on the added proxies.

* Merge arma and coot traits into a single file.

* Fix deprecation warning from newer Armadillo.

* Fix spacing.

* Add logging output for PSO.

* Adapt problems to be templatized.

* Templatize tests to use ENS_TEST_TYPES.

* Fix name of AdaGrad in the documentation.

* Apply suggestions from code review.

Co-authored-by: Ryan Curtin <ryan@ratml.org>

* Update about half the optimizers to use FP16.

* Refactor ForwardType into two different structures to avoid std::conditional.

* Minor changes to get tests to pass on the Pi.

* Remove unused proxies.

* Update the other half of the optimizers to use FP16.

* Minor fixes to work on non-emulated FP16.

* Update to arma::hmat and enable sparse types.

* Make CMake standard easily configurable.

* Revert CategoryType to arma::Row<size_t> since that should always stay on the CPU.

* Add convenience IsMatrixType<> struct.

* Catch underflow for RMSprop.

* Revert to norm()-only implementation for gradient norm computation.

* Remove proxies, use using instead.

* Older Armadillo versions don't support changing sparse-to-dense and also element types.

* Remove sort_index() proxy and use using instead.

* Oops, fix compatibility conv_to implementation.

* Fix divide by zero condition.

* Individually accessed vector, so keep vector on the CPU, for faster access.

* Apply suggestions from code review

Co-authored-by: Ryan Curtin <ryan@ratml.org>

* Kepp the indicies on the CPU.

* Apply suggestions from code review.

Co-authored-by: Ryan Curtin <ryan@ratml.org>

* Remove outdated test case.

* Use initialization list for the velocity vector.

* Apply suggestions from code review

Co-authored-by: Ryan Curtin <ryan@ratml.org>

* Readd removed test cases for MOEAD.

* Use sort_index for sorting that is supported for both armadillo and bandicoot.

* Revert changes to Parallel SGD optimizer, no benefit to upload to the GPU.

* Only reset if we haven't reached the end of the iterations.

* Use accu to the the sum of the vector.

* Use clamp instead of min, for a more efficient computation.

* Add missing data type.

* Use ENS_HAVE_COOT instead of USE_COOT and automatically detect when Bandicoot has already been included.

* Fix incorrect initialization list.

* Remove unnecessary GetFillType<MatType>::zeros, which does not work for sparse matrices.

* Clean up the last few proxy functions.

* Refactor problems to avoid adding extra template parameters.

* NSGA2: introduce a new Optimize function that takes the front and the paretoSet, so we can avoid introducing new template parameters.

* MOEAD: introduce a new Optimize function that takes the front and the paretoSet, so we can avoid introducing new template parameters.

* Remove unnecessary lr matrix.

* Minor cleanups for SA.

* Clean up member initialization for PSO.

* Update documentation for multi-objective optimizers.

* Update API for Snapshots().

* Keep the MOEAD front indices on the CPU, to be more efficient.

* Remove class template parameter for the bound parameter, to make the optimizer class easier.

* Use the correct location for the bandicoot wrapper.

* No need to set the backend for testing, we will test whatever was available during compilation.

* Use the correct def to enable the bandicoot backend.

* use the correct name for the def.

* Fixes so that Bandicoot actually gets detected and compiled in correctly.

* Oops, fix merge.

* Add tolerances for Bandicoot matrices.

* Fix missing typedef.

* Fix some failing tests.

* Fix minor compilation issues.

* Fix compilation errors and warnings.

* Minor issues discovered in self-review.

* Oops, fix missing type.

* Reduce batch size to try and prevent NaNs.

---------

Co-authored-by: Marcus Edel <marcus@urgs.org>
Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de>
2025-09-07 07:38:32 -04:00
conradsnicta 8579b392b2 use .index_min() instead of the deprecated form .min(index) (#436) 2025-09-03 09:37:50 -04:00
Ryan Curtin 198525ca7a Overhaul documentation for callbacks. 2025-08-31 20:31:32 -04:00
Marcus EdelandRyan Curtin b77cf519c1 Bandicoot intergration (#425)
* Add CMake modules to find Bandicoot libraries and includes.

* Add initial GitHub Actions to build against Bandicoot and run the tests.

* 1. Add type proxies to select the right type based on the used backend and datatype.
2. Update IQN optimizer to build against Armadillo and Bandicoot.
3. Update IQN test cases to test against Armadillo and Bandicoot backend.
4. Update logisitic regression function, to support Armadillo and Bandicoot.

* Refactor CNE optimizer and tests cases to work with Armadillo and Bandicoot datatypes.

* Refactor Katyusha optimizer and tests cases to work with Armadillo and Bandicoot datatypes.

* Refactor optimizers to work with Armadillo and Bandicoot datatypes:

1. AdaBelief
2. AdaBound
3. AMSBound
4. AdaGrad
5. Adam
6. Adamax
7. AMSGrad
8. Nadam
9. Nadamax
10. OptimisticAdam
11. Eve
12. FTML
13. LBFGS
14. Lookahead
15. Padam
16. QHAdam
17. SMORMS3
18. SpaleraSGD
19. SPSA
20. SWATS
21. WNGrad
22. Yogi
23. MomentumSGD
24. NesterovMomentum
25. QuasiHyperbolic
26. SGD
27. SGDR
28. SnapshotSGDR
29. CNE
30. CMAES
31. ActiveCMAES
32. PSO
33. LBestPSO
34. MOEAD
35. AugmentedLagrangian

* Refactor optimizers to work with Armadillo and Bandicoot datatypes:
1. AdaDelta
2. AdaSqrt
3. BigBatchSGD
4. CoordinateDescent (CD)
5. GradientDescent
6. GridSearch
7. NSGA2
8. ParallelSGD

* Refactor optimizers to work with Armadillo and Bandicoot datatypes:
1. DifferentialEvolution (DE)
2. RMSProp
3. SimulatedAnnealing (SA)
4. SARAH
5. SARAH+
6. SVRG
7. BarzilaiBorweinDecay
8. DemonAdam
9. DemonSGD

* Use inverse transform sampling to replicating arma::randg sampling since randg is not supported in Bandicoot.

* Apply suggestions from code review by @rcurtin.

Co-authored-by: Ryan Curtin <ryan@ratml.org>

* Group test cases and fix indentations.

* Update optimizer reference styling.

* Add option to build against Bandicoot (by default we build against Bandicoot if found).

* Mention AugLagrangianType constructor in the optimizer documentation, that allows to use a different datatype i.e. arma::fvec or coot::fvec.

* Use data type specific element type for the bounds parameter.

* Make sure we follow the max character line limitation from the style guide.

Co-authored-by: Ryan Curtin <ryan@ratml.org>

* Remove backports for outdates armadillo versions.

* Indentation fixes.

* Indentation fixes.

* Use the correct data type during testing.

* Do not use the namespace twice.

* Test against CPU/OpenCL/CUDA backend.

* Use the correct test case type.

* We don't need Bandicoot when we test against Armadillo (CPU) backend.

* Use the correct minimal Bandicoot version.

Co-authored-by: Ryan Curtin <ryan@ratml.org>

* Comment on the added proxies.

* Merge arma and coot traits into a single file.

* Apply suggestions from code review.

Co-authored-by: Ryan Curtin <ryan@ratml.org>

* Refactor ForwardType into two different structures to avoid std::conditional.

* Remove unused proxies.

* Revert CategoryType to arma::Row<size_t> since that should always stay on the CPU.

* Add convenience IsMatrixType<> struct.

* Individually accessed vector, so keep vector on the CPU, for faster access.

* Apply suggestions from code review

Co-authored-by: Ryan Curtin <ryan@ratml.org>

* Kepp the indicies on the CPU.

* Apply suggestions from code review.

Co-authored-by: Ryan Curtin <ryan@ratml.org>

* Remove outdated test case.

* Use initialization list for the velocity vector.

* Apply suggestions from code review

Co-authored-by: Ryan Curtin <ryan@ratml.org>

* Readd removed test cases for MOEAD.

* Use sort_index for sorting that is supported for both armadillo and bandicoot.

* Revert changes to Parallel SGD optimizer, no benefit to upload to the GPU.

* Only reset if we haven't reached the end of the iterations.

* Use accu to the the sum of the vector.

* Use clamp instead of min, for a more efficient computation.

* Add missing data type.

* Use ENS_HAVE_COOT instead of USE_COOT and automatically detect when Bandicoot has already been included.

* Fix incorrect initialization list.

* Remove unnecessary GetFillType<MatType>::zeros, which does not work for sparse matrices.

* Clean up the last few proxy functions.

* Refactor problems to avoid adding extra template parameters.

* NSGA2: introduce a new Optimize function that takes the front and the paretoSet, so we can avoid introducing new template parameters.

* MOEAD: introduce a new Optimize function that takes the front and the paretoSet, so we can avoid introducing new template parameters.

* Remove unnecessary lr matrix.

* Minor cleanups for SA.

* Clean up member initialization for PSO.

* Update documentation for multi-objective optimizers.

* Update API for Snapshots().

* Keep the MOEAD front indices on the CPU, to be more efficient.

* Remove class template parameter for the bound parameter, to make the optimizer class easier.

* Use the correct location for the bandicoot wrapper.

* No need to set the backend for testing, we will test whatever was available during compilation.

* Use the correct def to enable the bandicoot backend.

* use the correct name for the def.

* Fixes so that Bandicoot actually gets detected and compiled in correctly.

* Oops, fix merge.

* Oops, don't forget to resize the responses.

* Add new Optimize(...) method to AGEMOEA that takes the front and pareto set as input.

---------

Co-authored-by: Ryan Curtin <ryan@ratml.org>
2025-08-31 13:42:57 -04:00
Ryan Curtin d840de83c0 Add new block for next release to HISTORY.md. 2025-05-02 08:55:13 -04:00
Ryan Curtin 8ec25593b8 Update and release version 2.22.2. 2.22.2 2025-05-02 08:55:13 -04:00
conradsnicta 64ad05df10 update HISTORY.md (#424)
add #422 to HISTORY.md
2025-05-01 09:39:30 -04:00
Dirk Eddelbuettel ea9c291bed Set cmake version range to 3.5...4.0 (#422) 2025-04-30 03:16:31 +02:00
conradsnicta 78680bc819 increase tolerance (#420) 2025-02-26 13:45:24 +01:00
conradsnicta 7e81ed37b9 fix include (#419) 2025-02-26 13:44:19 +01:00
Ryan Curtin 7791091f2d Don't reset the objective estimate on the last iteration (#417) 2024-12-31 08:08:19 +01:00
James J Balamuta b0e33483fb Merge pull request #416 from rcurtin/specify-minimum-arma-versio
List minimum Armadillo version in README
2024-12-12 11:21:22 -08:00
Ryan CurtinandDirk Eddelbuettel 6f5f7467b4 Update README.md
Co-authored-by: Dirk Eddelbuettel <edd@debian.org>
2024-12-11 09:08:57 -05:00
Ryan Curtin e961819f33 List minimum Armadillo version in README. 2024-12-11 08:32:01 -05:00
Ryan Curtin 55ee7d5d7d Merge pull request #415 from rcurtin/release-2.22.1
Release version 2.22.1: "E-Bike Excitement"
2024-12-02 19:26:37 -05:00
Ryan Curtin 0243c0b92d Add new block for next release to HISTORY.md. 2024-12-02 14:51:33 -05:00
Ryan Curtin 65e359a29f Update and release version 2.22.1. 2.22.1 2024-12-02 14:51:33 -05:00
Ryan Curtin fa58c90e0f Merge pull request #414 from rcurtin/update-history
Add an entry in the HISTORY for #413
2024-12-02 14:51:04 -05:00
Ryan Curtin 052f58e6bb Simplify compilation options to also work on gcc. 2024-12-02 13:28:28 -05:00
Ryan Curtin 18d383f503 Add an entry in the HISTORY for #413. 2024-12-02 09:18:47 -05:00
Ryan Curtin 92468ea52f Merge pull request #413 from coatless-mlpack/bugfix/unused-variables
Bugfix/unused variables
2024-11-30 17:32:27 -05:00
James J Balamuta c456e8e6f0 Correct deletion location 2024-11-30 06:43:53 +00:00
James J Balamuta 77c6b06172 Also incorporate the Wunused-private-field flag 2024-11-30 05:55:49 +00:00
James J Balamuta f0aa97c769 Add to compilation settings for non-MSVC -Wunused-variable 2024-11-30 05:53:46 +00:00
James J Balamuta fcafecc1f7 Remove unused variable declarations to quiet -Wunused-variable compiler error 2024-11-30 05:49:55 +00:00
Ryan Curtin 9406243954 Add new block for next release to HISTORY.md. 2024-11-29 13:51:28 -05:00
Ryan Curtin 2c163f0655 Update and release version 2.22.0. 2.22.0 2024-11-29 13:51:28 -05:00
beny-bee 6ac2f6b462 IPOP and BIPOP restart mechanisms (#403) 2024-11-29 03:25:55 +01:00
Dirk Eddelbuettel 7bff76651d Merge pull request #409 from mlpack/feature/arma_14.2.0_change
Armadillo 14.2.0 deprecation changes to (index) .min() and .max()
2024-11-20 14:58:03 -06:00
Dirk Eddelbuettel b19f75e6c8 Update HISTORY.md [ci skip] 2024-11-19 14:02:16 -06:00
Dirk Eddelbuettel 0211ca3840 Update one deprected .max(k) call to .index_max() 2024-11-18 08:17:10 -06:00
Dirk Eddelbuettel 2753047455 Update from deprecated .min(ind) to .index_min()
This is an Armadillo 14.2.0 change that creates a fair amount of compilation
noise for mlpack right now.

There are likely more changes to be made but this will check the mechanics.
2024-11-18 08:06:30 -06:00