cavalab / brush

An interpretable machine learning library
http://cavalab.org/brush/
GNU General Public License v3.0
2 stars 0 forks source link

Optimizer tests #32

Closed gAldeia closed 1 year ago

gAldeia commented 1 year ago

This pull request adds new tests for optimization:

These tests were added for both C++ and Python versions.

Note: the Prod tests uses the C++23 literal suffix for std::size_t when declaring the hash values (UZ suffixes at the end of hashes). For example: https://github.com/cavalab/brush/blob/2f1155100477289612337f6b657dfd9c52d5911c/tests/cpp/test_optimization.cpp?plain=1#L345-L359 This can be avoided if needed, just let me know.

Python tests were using fixtures and parameterized tests to avoid repeating the same structure over and over again. This pull request implements a fixture class and parameterized tests using Gtest.

After this, I plan to delete the optimizer_tests branch.

lacava commented 1 year ago

Thanks! I think we should avoid C++23, we're already having trouble supporting parts of C++20.

gAldeia commented 1 year ago

You are right. I removed the suffix feature from C++23 that I was using in the code!