Commit Graph
4 Commits
Author SHA1 Message Date
Ryan CurtinandDirk Eddelbuettel e70a04fbba Add Docker deployment documentation (#3907)
* Add a first attempt at explicitly using Jenkinsfiles.

* A first attempt...

* Put code in a script block.

* Add first attempt at link check job pipeline.

* Hopefully correct shell block.

* Install git.

* Install packages as root.

* Use custom image that already has dependencies installed.

* Try processing the JUnit results.

* Fix syntax (hopefully).

* Try to get the build to set its status on Github.

* Try and see if I can get the snippet build to run too.

* A first attempt at reviving the static code analysis build.

* Refactor style check job a bit.

* Try to clean up other files and have them set statuses.

* Set status in script blocks.

* Fix directory (this may not fix my problem).

* Should I load in the script step?

* Maybe I can just load it without a name.

* Maybe I have my path wrong.

* Will this work?  Just a test...

* Try using a plugin instead.

* And if I define the function manually at the top?

* Maybe this will fix the load.

* Try to turn unstable into failed.

* Hopefully fix documentation builds.

* Fix script blocks.

* Maybe fix static code analysis job.

* Try to adapt PR number variable.

* First attempt at cross-compilation job.

* Try to fix some syntax.

* Clean workspaces after build.

* Try to put the matrix in the right place.

* Another attempt at the matrix configuration.

* Maybe I have to nest it deeper.

* Maybe I have to clean always?

* What we need is more tabbing.

* Use try/catch to handle failed junit processing.

* Better handling of environment variables.

* Try a differernt approach than try/catch.

* Try to get some more information about ccache.

* Is it possible we could store the ccache at a higher level?

* Maybe I have the variable name wrong.

* Clean the cross-compilation workspace.

* Try mounting the ccache so it can be shared across multiple jobs.

* Always pull images.

* We need to run on the same node.

* Run on only one core.

* Try building in the Docker container in a different way.

* Do I have the order backwards?

* Can I run anything at all in the container?

* The static code analysis job isn't helpful.

* Try to set the user of the docker container.

* Rebuild the Docker container instead.

* Always pull an updated image.

* Download any necessary dependencies too.

* Oops, use the correct CMake options.

* Fix line break in the wrong place.

* Make sure to use the correct architecture.

* We can't use MATCHES, that is a regex.

* Oops, we need to use STREQUAL.

* Bump to an older version since newer versions don't have gfortran.

* Try to run the tests on the target.

* Correct syntax.

* Okay, I'm not allowed to generate a stage name.

* Try cleaning the workspace at the start of the build.

* Okay, so I just can't depend on the workspace cleaning job, wonderful.

* Try and add the passphrase correctly.

* Fix path for memory checks.

* Fix path to test.

* Fix PR number variable.

* Try to fix path for test copying.

* Try to get the PR number correct.

* Try and centralize where the link cache is stored.

* Why is it being printed strangely?

* Is there some weird restriction where this all has to be on one line?

* Always publish the HTML, and fix a link.

* Try to fix SSH host key check.

* Make the reports directory.

* Try to fix file parsing.

* Try to enable ccache.

* Try to set ccache directory correctly.

* Try to get the full pipeline set up correctly for cross-compilation.

* Fix path to test data.

* Allow debug builds when cross-compiling.

* Remember to unpack all the test data!

* Fail tests when the data isn't there.

* Maybe I can use find instead.

* Double escape for backslash?

* What if we just run the test?

* Port Catch2 improvement for junit runner.

See https://github.com/catchorg/Catch2/commit/c29e198eab0ccdb190495397854b937677385e2e.

* Re-enable junit testing (hopefully it will work now).

* Output directly to the xml file.

* Try to clean up regex.

* Try to set IN PROGRESS status.

* Could it be called RUNNING?

* I guess I don't get access to set jobs in progress through this API.

* Fix regex for test name extraction.

* Try to clean up Jenkinsfiles.

* Fix parameter name.

* Maybe fix syntax?

* Does it work without keyword arguments?

* Correctly accept named parameters.

* Abort previous builds to reduce load on Jenkins.

* Use optimization when compiling.

* Fix syntax for abortPrevious.

* Fix missing closing brace...

* Update links in CI documentation and try to fix memory check job.

* Add Docker deployment page.

* Fix link.

* Fix missing link in pipeline.

* Apply suggestions from code review

Co-authored-by: Dirk Eddelbuettel <edd@debian.org>

* Try to get some more information on the build failure.

* Fix link that now redirects.

* Try to get some more information about why we are not linking against OpenBLAS.

* I think the variable name was wrong, we will see...

* Clean things up since the build should work now.

---------

Co-authored-by: Dirk Eddelbuettel <edd@debian.org>
2025-03-12 16:49:34 -04:00
b5e3284cf5 Bootstrap strategy for RandomForest (#3829)
* Added sequential bootstrapping to random forest.

* Fixed namespace.

* Fixed style checks.

* Fixed compilation issue.

* Comply to __libcpp_random_is_valid_urng

* Incorporated review feedback

* Corrected style checks.

* Reverted documentation.

* Made constructor implicit to catch armadillo template optimizations

* Fixed compilation error.

* Fixed style check.

* Fixed compilation error.

* Align argument lists between public and private Train function.

* Explicitly state template use to help GCC

* Fixed style check.

* Added name to contributor list.

* Changed indicator matrix to interval matrix

* Updated docs, implementation and testing after code review.

* Fixed style warnings.

* Updated documentation.

* Update src/mlpack/methods/random_forest/bootstrap.hpp

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

* Update doc/user/methods/random_forest.md

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

* Incorporating code review feedback

* Changed based on code review feedback

* reduced computational complexity.

* resolved conflict.

* resolved conflict

* Reworked after review

* Avoiding recomputation of the concurrency vector for speed-up.

* Resolve merge conflict

* fixed style

* fixed style

* Remove assert statement

* Update src/mlpack/tests/random_forest_test.cpp

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

* Update src/mlpack/tests/random_forest_test.cpp

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

* Integrated changes after code review.

* Fixed style

* Resolved conflict

* Update doc/user/methods/random_forest.md

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

* Update doc/user/methods/random_forest.md

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

* Update src/mlpack/methods/random_forest/bootstrap.hpp

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

* Update src/mlpack/methods/random_forest/bootstrap.hpp

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

* Update doc/user/methods/random_forest.md

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

* Update doc/user/methods/random_forest.md

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

* Update src/mlpack/methods/random_forest/bootstrap.hpp

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

* Update src/mlpack/methods/random_forest/bootstrap.hpp

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

* Incorporated review comments.

* Fixed styling issues

* Restart style checks

* Update src/mlpack/tests/random_forest_test.cpp

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

* Reworked documentation from review comments

* Fixed style check

* Update doc/user/methods/random_forest.md

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

* Update HISTORY.md

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

* Update doc/user/methods/random_forest.md

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

* Update src/mlpack/methods/random_forest/bootstrap.hpp

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

* Update src/mlpack/methods/random_forest/bootstrap.hpp

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

* Update doc/user/methods/random_forest.md

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

* Update doc/user/methods/random_forest.md

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

* Reworked example amd unit test.

* fixed build

* fixed documentation build

* Fixing style check build

* fixing style checks

* fixing check build

* Fix minor compilation issues with example, and make it give output.

---------

Co-authored-by: Felix Patschkowski <felix.patschkowski@itecequipment.com>
Co-authored-by: Ryan Curtin <ryan@ratml.org>
Co-authored-by: Felix Patschkowski <felix.patschkowski@gmail.com>
2025-03-10 16:02:19 +01:00
Omar Shrit 2076090a08 Fix small bug in finding mlpack if downloaded as dependency (#3900)
* Fix small bug in finding mlpack

Since mlpack include is inside a `src/` directory, this is make it more
complicated for CMake to find mlpack path if it is pulled as a dependency
by the user. Therefore, to fix this we are setting directly the
INCLUDE_PATH as the SEARCH_PATH as long as mlpack.hpp is found.

Other minor fixes are related to if /else logic. This will allow to set the
directories when we find the library in a second round.

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Fix minor things

Signed-off-by: Omar Shrit <omar@avontech.fr>

---------

Signed-off-by: Omar Shrit <omar@avontech.fr>
2025-02-28 09:26:10 +01:00
Omar ShritandRyan Curtin 58115633dd Add Findmlpack.cmake (#3872)
* Add Findmlack.cmake

I opened this PR, because it was so difficult to revive the old one.

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Adding the comments from the previous PR

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Add the docs again

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Add depedencies functions

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Make the filename compatible with the standard

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Move the dependencies search from CMakeLists

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Remove MATHJAX

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Refactor the CMake into dependencies

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Remove Findarmadillo since it exist in CMake

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Remove Arpack as well, already in the main stream

Signed-off-by: Omar Shrit <omar@avontech.fr>

* This needs to go, tooo old

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Move cereal and ensmallen to mlpack

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Get rid of the empty files

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Remove Doxygen generation file

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Finish Findmlpack.cmake file

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Increase Cmake version to 3.11 to avoid the warning

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Add POST_BUILD to get rid of the warning

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Remove really old support for MACOS 11 and 9

This is more like 15 years old already

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Already specified no need to do it again

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Fix according to comments from @rcurtin

Signed-off-by: Omar Shrit <omar@avontech.fr>

* add message for armadillo

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Try to fix windows and cross CI at the same time

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Let us add brutally STB and Armadillo

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Remove STB image independant file from here

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Adding more into findmlpack

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Move things from CMake as they are not directly relevant

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Move the autdownloader to findmlpack

Signed-off-by: Omar Shrit <omar@avontech.fr>

* remove the autodownload

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Remove cmakeextras, added for obsure reasons

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Remove license for really old stuff

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Re-order the file how it should be

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Move out of dependency

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Remove Dependencies, as it is no longer used

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Add stb to this file again

Signed-off-by: Omar Shrit <omar@avontech.fr>

* reorganize functions

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Add find armadillo

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Remove Dependencies files and autdownload

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Make it use the internal functions

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Finishing most of the cmake modifications

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Fix a couple of last things

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Change the name and remove old file

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Fix all comments left by @rcurtin

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Fix the docs for each of the function

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Move the cross compilation to inside fetch and make it as an auto detect

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Cut the parts that are refactored

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Fix function name

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Remove the ""

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Update doc/embedded/crosscompile_example.md

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

* Update CMake/mlpack.cmake

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

* Update CMake/mlpack.cmake

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

* Update CMake/mlpack.cmake

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

* Update CMake/mlpack.cmake

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

* Update CMake/mlpack.cmake

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

* Update CMake/mlpack.cmake

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

* Update doc/embedded/crosscompile_example.md

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

* Update doc/embedded/crosscompile_example.md

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

* Update doc/embedded/crosscompile_example.md

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

* Update doc/embedded/crosscompile_example.md

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

* Update doc/embedded/crosscompile_example.md

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

* Update doc/embedded/crosscompile_example.md

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

* Update doc/embedded/crosscompile_example.md

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

* Update doc/embedded/crosscompile_example.md

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

* Update doc/embedded/crosscompile_example.md

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

* Update doc/embedded/crosscompile_example.md

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

* Update doc/embedded/crosscompile_example.md

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

* Update doc/embedded/crosscompile_example.md

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

* Update doc/embedded/crosscompile_example.md

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

* Update doc/embedded/crosscompile_example.md

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

* Fix text and code

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Apply comments from @rcurtin

Signed-off-by: Omar Shrit <omar@avontech.fr>

* modify CMakeLists accordingly

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Add PR in the history

Signed-off-by: Omar Shrit <omar@avontech.fr>

* Update CMake/mlpack.cmake

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

* Update CMake/mlpack.cmake

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

* Update doc/embedded/crosscompile_example.md

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

* Update HISTORY.md

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

* Update doc/embedded/crosscompile_example.md

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

---------

Signed-off-by: Omar Shrit <omar@avontech.fr>
Co-authored-by: Ryan Curtin <ryan@ratml.org>
2025-02-25 21:00:53 +01:00