From b0853d169b1fbd7c0c079d54c944ccf6401bd876 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Monta=C3=B1ana=20G=C3=B3mez?= Date: Wed, 20 Nov 2024 21:14:19 +0100 Subject: [PATCH] Remove mdlp submodule --- .gitmodules | 4 ---- CMakeLists.txt | 5 ++++- gitmodules | 5 ----- lib/Files | 2 +- lib/catch2 | 2 +- lib/json | 2 +- lib/libxlsxwriter | 2 +- lib/mdlp | 2 +- sample/CMakeLists.txt | 3 ++- sample/sample.cpp | 2 +- src/CMakeLists.txt | 11 ++++++----- src/common/Discretization.h | 2 +- src/manage/ManageScreen.cpp | 2 +- tests/TestUtils.h | 2 +- 14 files changed, 21 insertions(+), 25 deletions(-) diff --git a/.gitmodules b/.gitmodules index 4278b52..611cb45 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,10 +10,6 @@ [submodule "lib/libxlsxwriter"] path = lib/libxlsxwriter url = https://github.com/jmcnamara/libxlsxwriter.git -[submodule "lib/mdlp"] - path = lib/mdlp - url = https://github.com/rmontanana/mdlp - update = merge [submodule "lib/folding"] path = lib/folding url = https://github.com/rmontanana/folding diff --git a/CMakeLists.txt b/CMakeLists.txt index e6278c4..1574a72 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,7 +68,6 @@ endif (ENABLE_CLANG_TIDY) # External libraries - dependencies of Platform # --------------------------------------------- add_git_submodule("lib/argparse") -add_git_submodule("lib/mdlp") find_library(XLSXWRITER_LIB NAMES libxlsxwriter.dylib libxlsxwriter.so PATHS ${Platform_SOURCE_DIR}/lib/libxlsxwriter/lib) message("XLSXWRITER_LIB=${XLSXWRITER_LIB}") @@ -77,7 +76,11 @@ find_library(PyClassifiers NAMES libPyClassifiers PyClassifiers libPyClassifiers find_path(PyClassifiers_INCLUDE_DIRS REQUIRED NAMES pyclassifiers PATHS ${Platform_SOURCE_DIR}/../lib/include) find_library(BayesNet NAMES libBayesNet BayesNet libBayesNet.a PATHS ${Platform_SOURCE_DIR}/../lib/lib REQUIRED) find_path(Bayesnet_INCLUDE_DIRS REQUIRED NAMES bayesnet PATHS ${Platform_SOURCE_DIR}/../lib/include) +find_library(FImdlp NAMES libfimdlp.a REQUIRED) +find_path(FImdlp_INCLUDE_DIRS REQUIRED NAMES fimdlp) +message(STATUS "FImdlp=${FImdlp}") +message(STATUS "FImdlp_INCLUDE_DIRS=${FImdlp_INCLUDE_DIRS}") message(STATUS "PyClassifiers=${PyClassifiers}") message(STATUS "PyClassifiers_INCLUDE_DIRS=${PyClassifiers_INCLUDE_DIRS}") message(STATUS "BayesNet=${BayesNet}") diff --git a/gitmodules b/gitmodules index 39cd6d1..394a867 100644 --- a/gitmodules +++ b/gitmodules @@ -1,8 +1,3 @@ -[submodule "lib/mdlp"] - path = lib/mdlp - url = https://github.com/rmontanana/mdlp - main = main - update = merge [submodule "lib/catch2"] path = lib/catch2 main = v2.x diff --git a/lib/Files b/lib/Files index a531692..a4329f5 160000 --- a/lib/Files +++ b/lib/Files @@ -1 +1 @@ -Subproject commit a5316928d408266aa425f64131ab0f592b010a8d +Subproject commit a4329f5f9dfdb18ee3faa63bd5b665f2f253b8d2 diff --git a/lib/catch2 b/lib/catch2 index 4e8d92b..506276c 160000 --- a/lib/catch2 +++ b/lib/catch2 @@ -1 +1 @@ -Subproject commit 4e8d92bf02f7d1c8006a0e7a5ecabd8e62d98502 +Subproject commit 506276c59217429c93abd2fe9507c7f45eb81072 diff --git a/lib/json b/lib/json index 960b763..378e091 160000 --- a/lib/json +++ b/lib/json @@ -1 +1 @@ -Subproject commit 960b763ecd144f156d05ec61f577b04107290137 +Subproject commit 378e091795a70fced276cd882bd8a6a428668fe5 diff --git a/lib/libxlsxwriter b/lib/libxlsxwriter index cf887d6..6f2ac4a 160000 --- a/lib/libxlsxwriter +++ b/lib/libxlsxwriter @@ -1 +1 @@ -Subproject commit cf887d65ce31c74ce6fdc6f3c6163c1cc206e910 +Subproject commit 6f2ac4af23879c3d660b0fe689f423c19f8457d1 diff --git a/lib/mdlp b/lib/mdlp index 2db60e0..7d62d6a 160000 --- a/lib/mdlp +++ b/lib/mdlp @@ -1 +1 @@ -Subproject commit 2db60e007d70da876379373c53b6421f281daeac +Subproject commit 7d62d6af4a6ca944a3bbde0b61f651fd4b2d3f57 diff --git a/sample/CMakeLists.txt b/sample/CMakeLists.txt index 4c11760..4000699 100644 --- a/sample/CMakeLists.txt +++ b/sample/CMakeLists.txt @@ -10,6 +10,7 @@ include_directories( ${CMAKE_BINARY_DIR}/configured_files/include ${PyClassifiers_INCLUDE_DIRS} ${Bayesnet_INCLUDE_DIRS} + ${FImdlp_INCLUDE_DIRS} ) add_executable(PlatformSample sample.cpp ${Platform_SOURCE_DIR}/src/main/Models.cpp) -target_link_libraries(PlatformSample "${PyClassifiers}" "${BayesNet}" mdlp ${Python3_LIBRARIES} "${TORCH_LIBRARIES}" ${LIBTORCH_PYTHON} Boost::python Boost::numpy) \ No newline at end of file +target_link_libraries(PlatformSample "${PyClassifiers}" "${BayesNet}" "${Fimdlp}" ${Python3_LIBRARIES} "${TORCH_LIBRARIES}" ${LIBTORCH_PYTHON} Boost::python Boost::numpy) \ No newline at end of file diff --git a/sample/sample.cpp b/sample/sample.cpp index 982fefd..0619a27 100644 --- a/sample/sample.cpp +++ b/sample/sample.cpp @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include #include #include "Models.h" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a3fd165..be5642a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -12,6 +12,7 @@ include_directories( ${CMAKE_BINARY_DIR}/configured_files/include ${PyClassifiers_INCLUDE_DIRS} ${Bayesnet_INCLUDE_DIRS} + ${FImdlp_INCLUDE_DIRS} ## Platform ${Platform_SOURCE_DIR}/src ${Platform_SOURCE_DIR}/results @@ -26,7 +27,7 @@ add_executable( reports/ReportExcel.cpp reports/ReportBase.cpp reports/ExcelFile.cpp results/Result.cpp ) -target_link_libraries(b_best Boost::boost "${PyClassifiers}" "${BayesNet}" mdlp ${Python3_LIBRARIES} "${TORCH_LIBRARIES}" ${LIBTORCH_PYTHON} Boost::python Boost::numpy "${XLSXWRITER_LIB}") +target_link_libraries(b_best Boost::boost "${PyClassifiers}" "${BayesNet}" "${Fimdlp}" ${Python3_LIBRARIES} "${TORCH_LIBRARIES}" ${LIBTORCH_PYTHON} Boost::python Boost::numpy "${XLSXWRITER_LIB}") # b_grid set(grid_sources GridSearch.cpp GridData.cpp) @@ -35,7 +36,7 @@ add_executable(b_grid commands/b_grid.cpp ${grid_sources} common/Datasets.cpp common/Dataset.cpp common/Discretization.cpp main/HyperParameters.cpp main/Models.cpp ) -target_link_libraries(b_grid ${MPI_CXX_LIBRARIES} "${PyClassifiers}" "${BayesNet}" mdlp ${Python3_LIBRARIES} "${TORCH_LIBRARIES}" ${LIBTORCH_PYTHON} Boost::python Boost::numpy) +target_link_libraries(b_grid ${MPI_CXX_LIBRARIES} "${PyClassifiers}" "${BayesNet}" "${Fimdlp}" ${Python3_LIBRARIES} "${TORCH_LIBRARIES}" ${LIBTORCH_PYTHON} Boost::python Boost::numpy) # b_list add_executable(b_list commands/b_list.cpp @@ -44,7 +45,7 @@ add_executable(b_list commands/b_list.cpp reports/ReportExcel.cpp reports/ExcelFile.cpp reports/ReportBase.cpp reports/DatasetsExcel.cpp reports/DatasetsConsole.cpp reports/ReportsPaged.cpp results/Result.cpp results/ResultsDatasetExcel.cpp results/ResultsDataset.cpp results/ResultsDatasetConsole.cpp ) -target_link_libraries(b_list "${PyClassifiers}" "${BayesNet}" mdlp ${Python3_LIBRARIES} "${TORCH_LIBRARIES}" ${LIBTORCH_PYTHON} Boost::python Boost::numpy "${XLSXWRITER_LIB}") +target_link_libraries(b_list "${PyClassifiers}" "${BayesNet}" "${Fimdlp}" ${Python3_LIBRARIES} "${TORCH_LIBRARIES}" ${LIBTORCH_PYTHON} Boost::python Boost::numpy "${XLSXWRITER_LIB}") # b_main set(main_sources Experiment.cpp Models.cpp HyperParameters.cpp Scores.cpp) @@ -54,7 +55,7 @@ add_executable(b_main commands/b_main.cpp ${main_sources} reports/ReportConsole.cpp reports/ReportBase.cpp results/Result.cpp ) -target_link_libraries(b_main "${PyClassifiers}" "${BayesNet}" mdlp ${Python3_LIBRARIES} "${TORCH_LIBRARIES}" ${LIBTORCH_PYTHON} Boost::python Boost::numpy) +target_link_libraries(b_main "${PyClassifiers}" "${BayesNet}" "${Fimdlp}" ${Python3_LIBRARIES} "${TORCH_LIBRARIES}" ${LIBTORCH_PYTHON} Boost::python Boost::numpy) # b_manage set(manage_sources ManageScreen.cpp OptionsMenu.cpp ResultsManager.cpp) @@ -66,4 +67,4 @@ add_executable( results/Result.cpp results/ResultsDataset.cpp results/ResultsDatasetConsole.cpp main/Scores.cpp ) -target_link_libraries(b_manage "${TORCH_LIBRARIES}" "${XLSXWRITER_LIB}" mdlp "${BayesNet}") +target_link_libraries(b_manage "${TORCH_LIBRARIES}" "${XLSXWRITER_LIB}" "${Fimdlp}" "${BayesNet}") diff --git a/src/common/Discretization.h b/src/common/Discretization.h index 4a4b061..5ad636c 100644 --- a/src/common/Discretization.h +++ b/src/common/Discretization.h @@ -7,7 +7,7 @@ #include #include #include -#include +#include namespace platform { class Discretization { public: diff --git a/src/manage/ManageScreen.cpp b/src/manage/ManageScreen.cpp index 61b1322..6726e39 100644 --- a/src/manage/ManageScreen.cpp +++ b/src/manage/ManageScreen.cpp @@ -12,7 +12,7 @@ #include "reports/ReportExcel.h" #include "reports/ReportExcelCompared.h" #include -#include "CPPFImdlp.h" +#include namespace platform { const std::string STATUS_OK = "Ok."; diff --git a/tests/TestUtils.h b/tests/TestUtils.h index f984905..aea25d6 100644 --- a/tests/TestUtils.h +++ b/tests/TestUtils.h @@ -6,7 +6,7 @@ #include #include #include -#include "CPPFImdlp.h" +#include bool file_exists(const std::string& name); std::pair, map> discretize(std::vector& X, mdlp::labels_t& y, std::vector features);